All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 0/2] Fixes, cleanup and modernization for macmace driver
@ 2018-02-28  4:22 ` Finn Thain
  0 siblings, 0 replies; 10+ messages in thread
From: Finn Thain @ 2018-02-28  4:22 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, linux-m68k, linux-kernel

Changes since v4 of combined patch series:
- Removed redundant and non-portable MACH_IS_MAC tests.
- Omitted patches unrelated to macmace driver.


Finn Thain (2):
  net/macmace: Drop redundant MACH_IS_MAC test
  net/macmace: Fix and clean up log messages

 drivers/net/ethernet/apple/macmace.c | 25 ++++---------------------
 1 file changed, 4 insertions(+), 21 deletions(-)

-- 
2.16.1

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

* [PATCH net 0/2] Fixes, cleanup and modernization for macmace driver
@ 2018-02-28  4:22 ` Finn Thain
  0 siblings, 0 replies; 10+ messages in thread
From: Finn Thain @ 2018-02-28  4:22 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, linux-m68k, linux-kernel

Changes since v4 of combined patch series:
- Removed redundant and non-portable MACH_IS_MAC tests.
- Omitted patches unrelated to macmace driver.


Finn Thain (2):
  net/macmace: Drop redundant MACH_IS_MAC test
  net/macmace: Fix and clean up log messages

 drivers/net/ethernet/apple/macmace.c | 25 ++++---------------------
 1 file changed, 4 insertions(+), 21 deletions(-)

-- 
2.16.1

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

* [PATCH net 2/2] net/macmace: Fix and clean up log messages
  2018-02-28  4:22 ` Finn Thain
@ 2018-02-28  4:22   ` Finn Thain
  -1 siblings, 0 replies; 10+ messages in thread
From: Finn Thain @ 2018-02-28  4:22 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, linux-m68k, linux-kernel

Don't log the unexpanded "eth%d" format string.
Log the chip revision in the probe message (consistent with mace.c).
Drop redundant debug messages for FIFO events recorded in the
interface statistics (also consistent with mace.c).

Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
---
 drivers/net/ethernet/apple/macmace.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/apple/macmace.c b/drivers/net/ethernet/apple/macmace.c
index 50a43e681a09..137cbb470af2 100644
--- a/drivers/net/ethernet/apple/macmace.c
+++ b/drivers/net/ethernet/apple/macmace.c
@@ -247,8 +247,8 @@ static int mace_probe(struct platform_device *pdev)
 	dev->netdev_ops		= &mace_netdev_ops;
 	dev->watchdog_timeo	= TX_TIMEOUT;
 
-	printk(KERN_INFO "%s: 68K MACE, hardware address %pM\n",
-	       dev->name, dev->dev_addr);
+	pr_info("Onboard MACE, hardware address %pM, chip revision 0x%04X\n",
+		dev->dev_addr, mp->chipid);
 
 	err = register_netdev(dev);
 	if (!err)
@@ -589,7 +589,6 @@ static irqreturn_t mace_interrupt(int irq, void *dev_id)
 			else if (fs & (UFLO|LCOL|RTRY)) {
 				++dev->stats.tx_aborted_errors;
 				if (mb->xmtfs & UFLO) {
-					printk(KERN_ERR "%s: DMA underrun.\n", dev->name);
 					dev->stats.tx_fifo_errors++;
 					mace_txdma_reset(dev);
 				}
@@ -644,10 +643,8 @@ static void mace_dma_rx_frame(struct net_device *dev, struct mace_frame *mf)
 
 	if (frame_status & (RS_OFLO | RS_CLSN | RS_FRAMERR | RS_FCSERR)) {
 		dev->stats.rx_errors++;
-		if (frame_status & RS_OFLO) {
-			printk(KERN_DEBUG "%s: fifo overflow.\n", dev->name);
+		if (frame_status & RS_OFLO)
 			dev->stats.rx_fifo_errors++;
-		}
 		if (frame_status & RS_CLSN)
 			dev->stats.collisions++;
 		if (frame_status & RS_FRAMERR)
-- 
2.16.1

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

* [PATCH net 1/2] net/macmace: Drop redundant MACH_IS_MAC test
  2018-02-28  4:22 ` Finn Thain
@ 2018-02-28  4:22   ` Finn Thain
  -1 siblings, 0 replies; 10+ messages in thread
From: Finn Thain @ 2018-02-28  4:22 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, linux-m68k, linux-kernel, Geert Uytterhoeven

The MACH_IS_MAC test is redundant here because the platform device
won't get registered unless MACH_IS_MAC.
Adopt module_platform_driver() convention.

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
---
 drivers/net/ethernet/apple/macmace.c | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/drivers/net/ethernet/apple/macmace.c b/drivers/net/ethernet/apple/macmace.c
index f17a160dbff2..50a43e681a09 100644
--- a/drivers/net/ethernet/apple/macmace.c
+++ b/drivers/net/ethernet/apple/macmace.c
@@ -770,18 +770,4 @@ static struct platform_driver mac_mace_driver = {
 	},
 };
 
-static int __init mac_mace_init_module(void)
-{
-	if (!MACH_IS_MAC)
-		return -ENODEV;
-
-	return platform_driver_register(&mac_mace_driver);
-}
-
-static void __exit mac_mace_cleanup_module(void)
-{
-	platform_driver_unregister(&mac_mace_driver);
-}
-
-module_init(mac_mace_init_module);
-module_exit(mac_mace_cleanup_module);
+module_platform_driver(mac_mace_driver);
-- 
2.16.1

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

* [PATCH net 2/2] net/macmace: Fix and clean up log messages
@ 2018-02-28  4:22   ` Finn Thain
  0 siblings, 0 replies; 10+ messages in thread
From: Finn Thain @ 2018-02-28  4:22 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, linux-m68k, linux-kernel

Don't log the unexpanded "eth%d" format string.
Log the chip revision in the probe message (consistent with mace.c).
Drop redundant debug messages for FIFO events recorded in the
interface statistics (also consistent with mace.c).

Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
---
 drivers/net/ethernet/apple/macmace.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/apple/macmace.c b/drivers/net/ethernet/apple/macmace.c
index 50a43e681a09..137cbb470af2 100644
--- a/drivers/net/ethernet/apple/macmace.c
+++ b/drivers/net/ethernet/apple/macmace.c
@@ -247,8 +247,8 @@ static int mace_probe(struct platform_device *pdev)
 	dev->netdev_ops		= &mace_netdev_ops;
 	dev->watchdog_timeo	= TX_TIMEOUT;
 
-	printk(KERN_INFO "%s: 68K MACE, hardware address %pM\n",
-	       dev->name, dev->dev_addr);
+	pr_info("Onboard MACE, hardware address %pM, chip revision 0x%04X\n",
+		dev->dev_addr, mp->chipid);
 
 	err = register_netdev(dev);
 	if (!err)
@@ -589,7 +589,6 @@ static irqreturn_t mace_interrupt(int irq, void *dev_id)
 			else if (fs & (UFLO|LCOL|RTRY)) {
 				++dev->stats.tx_aborted_errors;
 				if (mb->xmtfs & UFLO) {
-					printk(KERN_ERR "%s: DMA underrun.\n", dev->name);
 					dev->stats.tx_fifo_errors++;
 					mace_txdma_reset(dev);
 				}
@@ -644,10 +643,8 @@ static void mace_dma_rx_frame(struct net_device *dev, struct mace_frame *mf)
 
 	if (frame_status & (RS_OFLO | RS_CLSN | RS_FRAMERR | RS_FCSERR)) {
 		dev->stats.rx_errors++;
-		if (frame_status & RS_OFLO) {
-			printk(KERN_DEBUG "%s: fifo overflow.\n", dev->name);
+		if (frame_status & RS_OFLO)
 			dev->stats.rx_fifo_errors++;
-		}
 		if (frame_status & RS_CLSN)
 			dev->stats.collisions++;
 		if (frame_status & RS_FRAMERR)
-- 
2.16.1

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

* [PATCH net 1/2] net/macmace: Drop redundant MACH_IS_MAC test
@ 2018-02-28  4:22   ` Finn Thain
  0 siblings, 0 replies; 10+ messages in thread
From: Finn Thain @ 2018-02-28  4:22 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, linux-m68k, linux-kernel, Geert Uytterhoeven

The MACH_IS_MAC test is redundant here because the platform device
won't get registered unless MACH_IS_MAC.
Adopt module_platform_driver() convention.

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
---
 drivers/net/ethernet/apple/macmace.c | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/drivers/net/ethernet/apple/macmace.c b/drivers/net/ethernet/apple/macmace.c
index f17a160dbff2..50a43e681a09 100644
--- a/drivers/net/ethernet/apple/macmace.c
+++ b/drivers/net/ethernet/apple/macmace.c
@@ -770,18 +770,4 @@ static struct platform_driver mac_mace_driver = {
 	},
 };
 
-static int __init mac_mace_init_module(void)
-{
-	if (!MACH_IS_MAC)
-		return -ENODEV;
-
-	return platform_driver_register(&mac_mace_driver);
-}
-
-static void __exit mac_mace_cleanup_module(void)
-{
-	platform_driver_unregister(&mac_mace_driver);
-}
-
-module_init(mac_mace_init_module);
-module_exit(mac_mace_cleanup_module);
+module_platform_driver(mac_mace_driver);
-- 
2.16.1

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

* Re: [PATCH net 1/2] net/macmace: Drop redundant MACH_IS_MAC test
  2018-02-28  4:22   ` Finn Thain
@ 2018-02-28  9:24     ` Geert Uytterhoeven
  -1 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2018-02-28  9:24 UTC (permalink / raw)
  To: Finn Thain; +Cc: David S. Miller, netdev, linux-m68k, Linux Kernel Mailing List

On Wed, Feb 28, 2018 at 5:22 AM, Finn Thain <fthain@telegraphics.com.au> wrote:
> The MACH_IS_MAC test is redundant here because the platform device
> won't get registered unless MACH_IS_MAC.
> Adopt module_platform_driver() convention.
>
> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Finn Thain <fthain@telegraphics.com.au>

Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH net 1/2] net/macmace: Drop redundant MACH_IS_MAC test
@ 2018-02-28  9:24     ` Geert Uytterhoeven
  0 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2018-02-28  9:24 UTC (permalink / raw)
  To: Finn Thain; +Cc: David S. Miller, netdev, linux-m68k, Linux Kernel Mailing List

On Wed, Feb 28, 2018 at 5:22 AM, Finn Thain <fthain@telegraphics.com.au> wrote:
> The MACH_IS_MAC test is redundant here because the platform device
> won't get registered unless MACH_IS_MAC.
> Adopt module_platform_driver() convention.
>
> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Finn Thain <fthain@telegraphics.com.au>

Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH net 0/2] Fixes, cleanup and modernization for macmace driver
  2018-02-28  4:22 ` Finn Thain
@ 2018-02-28 17:00   ` David Miller
  -1 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2018-02-28 17:00 UTC (permalink / raw)
  To: fthain; +Cc: netdev, linux-m68k, linux-kernel

From: Finn Thain <fthain@telegraphics.com.au>
Date: Tue, 27 Feb 2018 23:22:32 -0500 (EST)

> Changes since v4 of combined patch series:
> - Removed redundant and non-portable MACH_IS_MAC tests.
> - Omitted patches unrelated to macmace driver.

Series applied, thank you.

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

* Re: [PATCH net 0/2] Fixes, cleanup and modernization for macmace driver
@ 2018-02-28 17:00   ` David Miller
  0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2018-02-28 17:00 UTC (permalink / raw)
  To: fthain; +Cc: netdev, linux-m68k, linux-kernel

From: Finn Thain <fthain@telegraphics.com.au>
Date: Tue, 27 Feb 2018 23:22:32 -0500 (EST)

> Changes since v4 of combined patch series:
> - Removed redundant and non-portable MACH_IS_MAC tests.
> - Omitted patches unrelated to macmace driver.

Series applied, thank you.

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

end of thread, other threads:[~2018-02-28 17:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-28  4:22 [PATCH net 0/2] Fixes, cleanup and modernization for macmace driver Finn Thain
2018-02-28  4:22 ` Finn Thain
2018-02-28  4:22 ` [PATCH net 2/2] net/macmace: Fix and clean up log messages Finn Thain
2018-02-28  4:22   ` Finn Thain
2018-02-28  4:22 ` [PATCH net 1/2] net/macmace: Drop redundant MACH_IS_MAC test Finn Thain
2018-02-28  4:22   ` Finn Thain
2018-02-28  9:24   ` Geert Uytterhoeven
2018-02-28  9:24     ` Geert Uytterhoeven
2018-02-28 17:00 ` [PATCH net 0/2] Fixes, cleanup and modernization for macmace driver David Miller
2018-02-28 17:00   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.