[PATCH v4 net RESEND] net/sonic: Fix some resource leaks in error handling paths

2021-01-02 Thread Finn Thain
Sonic Ethernet device for the XT2000 board.") Fixes: efcce839360f ("[PATCH] macsonic/jazzsonic network drivers update") Signed-off-by: Christophe JAILLET Signed-off-by: Finn Thain --- Changed since v3: - Update commit log. Changed since v2: - Dropped whitespace change. --- driv

Re: [Intel-wired-lan] [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-25 Thread Finn Thain
On Wed, 25 Nov 2020, Nick Desaulniers wrote: > On Wed, Nov 25, 2020 at 1:33 PM Finn Thain wrote: > > > > Or do you think that a codebase can somehow satisfy multiple checkers > > and their divergent interpretations of the language spec? > > Have we found any case

Re: [Intel-wired-lan] [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-25 Thread Finn Thain
On Wed, 25 Nov 2020, Nick Desaulniers wrote: > On Wed, Nov 25, 2020 at 1:33 PM Finn Thain > wrote: > > > > Or do you think that a codebase can somehow satisfy multiple checkers > > and their divergent interpretations of the language spec? > > Have we found any c

Re: [Intel-wired-lan] [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-25 Thread Finn Thain
On Wed, 25 Nov 2020, Nick Desaulniers wrote: > So developers and distributions using Clang can't have > -Wimplicit-fallthrough enabled because GCC is less strict (which has > been shown in this thread to lead to bugs)? We'd like to have nice > things too, you know. > Apparently the GCC devel

Re: [Intel-wired-lan] [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-24 Thread Finn Thain
On Wed, 25 Nov 2020, Miguel Ojeda wrote: > > The C standard has nothing to do with this. We use compiler extensions > of several kinds, for many years. Even discounting those extensions, the > kernel is not even conforming to C due to e.g. strict aliasing. I am not > sure what you are trying

Re: [Intel-wired-lan] [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-24 Thread Finn Thain
On Tue, 24 Nov 2020, Kees Cook wrote: > On Mon, Nov 23, 2020 at 08:31:30AM -0800, James Bottomley wrote: > > Really, no ... something which produces no improvement has no value at > > all ... we really shouldn't be wasting maintainer time with it because > > it has a cost to merge. I'm not sure

Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-23 Thread Finn Thain
On Mon, 23 Nov 2020, Joe Perches wrote: > On Tue, 2020-11-24 at 11:58 +1100, Finn Thain wrote: > > it's not for me to prove that such patches don't affect code > > generation. That's for the patch author and (unfortunately) for > > reviewers. > > Id

Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-23 Thread Finn Thain
On Mon, 23 Nov 2020, Miguel Ojeda wrote: > On Mon, 23 Nov 2020, Finn Thain wrote: > > > On Sun, 22 Nov 2020, Miguel Ojeda wrote: > > > > > > > > It isn't that much effort, isn't it? Plus we need to take into > > > account the future

Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-22 Thread Finn Thain
On Sun, 22 Nov 2020, Miguel Ojeda wrote: > > It isn't that much effort, isn't it? Plus we need to take into account > the future mistakes that it might prevent, too. We should also take into account optimisim about future improvements in tooling. > So even if there were zero problems found

Re: [RFC] MAINTAINERS tag for cleanup robot

2020-11-22 Thread Finn Thain
On Sun, 22 Nov 2020, Joe Perches wrote: > On Sun, 2020-11-22 at 08:49 -0800, James Bottomley wrote: > > We can enforce sysfs_emit going forwards > > using tools like checkpatch > > It's not really possible for checkpatch to find or warn about > sysfs uses of sprintf. checkpatch is really just a

Re: [RFC] clang tooling cleanups

2020-10-28 Thread Finn Thain
On Tue, 27 Oct 2020, t...@redhat.com wrote: > This rfc will describe > An upcoming treewide cleanup. > How clang tooling was used to programatically do the clean up. > Solicit opinions on how to generally use clang tooling. > This tooling is very impressive. It makes possible an idea that I ha

Re: [PATCH 1/9] kernel: add a PF_FORCE_COMPAT flag

2020-09-19 Thread Finn Thain
On Sat, 19 Sep 2020, Arnd Bergmann wrote: > On Sat, Sep 19, 2020 at 6:21 PM Andy Lutomirski wrote: > > On Fri, Sep 18, 2020 at 8:16 AM Christoph Hellwig wrote: > > > On Fri, Sep 18, 2020 at 02:58:22PM +0100, Al Viro wrote: > > > > Said that, why not provide a variant that would take an explicit

[PATCH] net: bmac: Fix stack corruption panic in bmac_probe()

2020-05-17 Thread Finn Thain
ohnson Signed-off-by: Finn Thain --- This choice of 'Fixes' tag is (of course) debatable. Other possible choices might be 1da177e4c3f4 ("Linux-2.6.12-rc2"), c3ff2a5193fa ("powerpc/32: add stack protector support") and so on. --- drivers/net/ethernet/apple/bmac.c | 2 +-

Re: net/sonic: Software evolution around the application of coding standards

2020-05-13 Thread Finn Thain
On Wed, 13 May 2020, Markus Elfring wrote: > some developers care to improve the compliance with the current > standard at various source code places, don't they? > This thread appears to be circular. Before I abandon it as folly, perhaps you would answer one more question. Out of all of the s

Re: net/sonic: Fix some resource leaks in error handling paths

2020-05-12 Thread Finn Thain
On Tue, 12 May 2020, Markus Elfring wrote: > > Markus, if you were to write a patch to improve upon coding-style.rst, > > who should review it? > > All involved contributors have got chances to provide constructive > comments. But how could someone be elevated to "involved contributor" if thei

Re: net/sonic: Fix some resource leaks in error handling paths

2020-05-11 Thread Finn Thain
On Mon, 11 May 2020, Markus Elfring wrote: > > If you can't determine when the bug was introduced, > > I might be able to determine also this information. > This is tantamount to an admission of duplicity. > > > how can you criticise a patch for the lack of a Fixes tag? > > I dared to point

Re: net/sonic: Fix some resource leaks in error handling paths

2020-05-10 Thread Finn Thain
On Sun, 10 May 2020, Markus Elfring wrote: > > > > Do you know when these bugs were introduced? > > I suggest to take another look at a provided tag “Fixes”. If you can't determine when the bug was introduced, how can you criticise a patch for the lack of a Fixes tag? > To which commit would y

Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-10 Thread Finn Thain
On Sun, 10 May 2020, Markus Elfring wrote: > Christophe Jaillet proposed to complete the exception handling also for this > function implementation. > I find that such a software correction is qualified for this tag. > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documen

Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-09 Thread Finn Thain
On Fri, 8 May 2020, Jakub Kicinski wrote: > On Fri, 8 May 2020 19:25:57 +0200 Christophe JAILLET wrote: > > @@ -527,8 +531,9 @@ static int mac_sonic_platform_remove(struct > > platform_device *pdev) > > struct sonic_local* lp = netdev_priv(dev); > > > > unregister_netdev(dev); > > -

Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-09 Thread Finn Thain
On Sat, 9 May 2020, Markus Elfring wrote: > > While at it, rename a label in order to be slightly more informative and > > split some too long lines. > > Would you like to add the tag 'Fixes' to the change description? > Sorry but I don't follow your reasoning here. Are you saying that this ne

Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-08 Thread Finn Thain
On Fri, 8 May 2020, Jakub Kicinski wrote: > On Fri, 8 May 2020 19:25:57 +0200 Christophe JAILLET wrote: > > Only macsonic has been compile tested. I don't have the needed setup to > > compile xtsonic > > Well, we gotta do that before we apply the patch :S > I've compiled xtsonic.c with this

Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-08 Thread Finn Thain
#x27;jazz_sonic_probe()'") which was for > 'jazzsonic.c'. > > Suggested-by: Finn Thain > Signed-off-by: Christophe JAILLET Thanks. Reviewed-by: Finn Thain > --- > Only macsonic has been compile tested. I don't have the needed setup to > compil

Re: [PATCH net] macmace: Set platform device coherent_dma_mask

2018-05-11 Thread Finn Thain
On Fri, 11 May 2018, Michael Schmitz wrote: > > I wasn't proposing to follow platform_device_register() with the mask > assignment, I see. > but rather to use the same strategy from the Coldfire FEC patch > (f61e64310b75): set pdev.dev.coherent_dma_mask and pdev.dev.dma_mask > _before_ calli

Re: [PATCH net] macmace: Set platform device coherent_dma_mask

2018-05-10 Thread Finn Thain
On Fri, 11 May 2018, Michael Schmitz wrote: > > I'm afraid using platform_device_register() (which you already use for > the SCC devices) is the only option handling this on a per-device basis > without touching platform core code, while at the same time keeping the > DMA mask setup out of dev

Re: [PATCH net] macmace: Set platform device coherent_dma_mask

2018-05-10 Thread Finn Thain
On Fri, 11 May 2018, Michael Schmitz wrote: > > > Which begs the question: why can' you set up all Nubus bus devices' > > > DMA masks in nubus_device_register(), or nubus_add_board()? > > > > I am expecting to see the same WARNING from the nubus sonic driver but > > it hasn't happened yet, so I

Re: [PATCH net] macmace: Set platform device coherent_dma_mask

2018-05-10 Thread Finn Thain
On Fri, 11 May 2018, Michael Schmitz wrote: > > > Perhaps you can add a new helper > > > (platform_device_register_simple_dma()?) that takes the DMA mask, > > > too? ... > > > > So far, it looks like macmace and macsonic would be the only callers > > of this new API call. > > > > What's worse,

Re: [PATCH net] macmace: Set platform device coherent_dma_mask

2018-05-09 Thread Finn Thain
On Thu, 3 May 2018, Geert Uytterhoeven wrote: > > Perhaps you can add a new helper > (platform_device_register_simple_dma()?) that takes the DMA mask, too? Would there be enough potential callers in future to justify that API? It seems that there haven't been many in the past. I found four user

Re: [PATCH net] macmace: Set platform device coherent_dma_mask

2018-05-09 Thread Finn Thain
On Thu, 3 May 2018, Christoph Hellwig wrote: > On Thu, May 03, 2018 at 10:46:56AM +0200, Geert Uytterhoeven wrote: > > Perhaps you can add a new helper > > (platform_device_register_simple_dma()?) that takes the DMA mask, too? > > With people setting the mask to kill the WARNING splat, this may

Re: [PATCH net] macmace: Set platform device coherent_dma_mask

2018-05-03 Thread Finn Thain
On Thu, 3 May 2018, Geert Uytterhoeven wrote: > > --- a/drivers/net/ethernet/apple/macmace.c > > +++ b/drivers/net/ethernet/apple/macmace.c > > @@ -203,6 +203,10 @@ static int mace_probe(struct platform_device *pdev) > > unsigned char checksum = 0; > > int err; > > > > + err

[PATCH net] macsonic: Set platform device coherent_dma_mask

2018-05-02 Thread Finn Thain
Set the device's coherent_dma_mask to avoid a WARNING splat. Please see commit 205e1b7f51e4 ("dma-mapping: warn when there is no coherent_dma_mask"). Cc: linux-m...@lists.linux-m68k.org Signed-off-by: Finn Thain --- drivers/net/ethernet/natsemi/macsonic.c | 4 1 file change

[PATCH net] macmace: Set platform device coherent_dma_mask

2018-05-02 Thread Finn Thain
Set the device's coherent_dma_mask to avoid a WARNING splat. Please see commit 205e1b7f51e4 ("dma-mapping: warn when there is no coherent_dma_mask"). Cc: linux-m...@lists.linux-m68k.org Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/net/ethernet/apple/macmace.c |

Re: [PATCH 06/40] proc: introduce proc_create_single{,_data}

2018-04-25 Thread Finn Thain
On Wed, 25 Apr 2018, Christoph Hellwig wrote: > > -/* > - * /proc/nubus stuff > - */ > - I don't think that the introduction of proc_create_single{,_data} alters the value of that comment. That comment and similar comments in the same file do have a purpose, which is to keep separate the /pro

Re: [PATCH v3 00/10] New network driver for Amiga X-Surf 100 (m68k)

2018-04-17 Thread Finn Thain
On Wed, 18 Apr 2018, Michael Schmitz wrote: > All, > > just noticed belatedly that the Makefile hunk of patch 9 does no > longer apply cleanly in 4.17-rc1, sorry. My series was based on 4.16. > I'll resend that one, OK? > I might end up simpler to resend the whole series -- > Cheers, > > Mi

Re: [PATCH 04/10] net: ax88796: Add block_input/output hooks to ax_plat_data

2018-04-17 Thread Finn Thain
On Wed, 18 Apr 2018, Michael Schmitz wrote: > I think this is a false positive - we're encouraged to provide the > full parameter list for functions, so the sreuct sk_buff* can't be > avoided. > I don't think it's a false positive. I think ax88796.h would need to #include . You may be able to

Re: [PATCH 06/47] net: smsc: remove m32r specific smc91x configuration

2018-03-14 Thread Finn Thain
On Wed, 14 Mar 2018, Nicolas Pitre wrote: > On Wed, 14 Mar 2018, Arnd Bergmann wrote: > > > The m32r architecture is getting removed, so this part can be > > cleaned up as well. > > > > Signed-off-by: Arnd Bergmann > > Acked-by: Nicolas Pitre > > > --- > > drivers/net/ethernet/smsc/Kconfig

[PATCH net 3/4] net/mac89x0: Fix and modernize log messages

2018-03-01 Thread Finn Thain
Fix log message fragments that no longer produce the desired output since the behaviour of printk() was changed. Add missing printk severity levels. Drop deprecated "out of memory" message as per checkpatch advice. Signed-off-by: Finn Thain --- drivers/net/ethernet/cirrus/mac8

[PATCH net 2/4] net/mac89x0: Convert to platform_driver

2018-03-01 Thread Finn Thain
Apparently these Dayna cards don't have a pseudoslot declaration ROM which means they can't be probed like NuBus cards. Cc: Geert Uytterhoeven Signed-off-by: Finn Thain Acked-by: Geert Uytterhoeven --- arch/m68k/mac/config.c| 4 +++ drivers/net/Space.c

[PATCH net 0/4] Fixes, cleanup and modernization for mac89x0 driver

2018-03-01 Thread Finn Thain
Changes since v4 of combined patch series: - Removed redundant and non-portable MACH_IS_MAC tests. - Added acked-by tags from Geert Uytterhoeven. - Omitted patches unrelated to mac89x0 driver. Finn Thain (4): net/mac89x0: Remove redundant code net/mac89x0: Convert to platform_driver net

[PATCH net 4/4] net/mac89x0: Replace custom debug logging with netif_* calls

2018-03-01 Thread Finn Thain
Adopt the conventional style of debug logging because it is both shorter and more flexible. Remove the 'version_printed' flag as the version will be printed only once anyway (when the module loads). Signed-off-by: Finn Thain --- drivers/net/ethernet/cirrus/mac8

[PATCH net 1/4] net/mac89x0: Remove redundant code

2018-03-01 Thread Finn Thain
Signed-off-by: Finn Thain --- drivers/net/ethernet/cirrus/mac89x0.c | 32 1 file changed, 32 deletions(-) diff --git a/drivers/net/ethernet/cirrus/mac89x0.c b/drivers/net/ethernet/cirrus/mac89x0.c index 977d4c2c759d..4fe0ae93ab36 100644 --- a/drivers/net

[PATCH net 0/2] Fixes, cleanup and modernization for macmace driver

2018-02-27 Thread Finn Thain
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

[PATCH net 1/2] net/macmace: Drop redundant MACH_IS_MAC test

2018-02-27 Thread Finn Thain
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 Signed-off-by: Finn Thain --- drivers/net/ethernet/apple/macmace.c | 16 +--- 1 file changed, 1 inse

[PATCH net 2/2] net/macmace: Fix and clean up log messages

2018-02-27 Thread Finn Thain
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 Signed-off-by: Finn Thai

[PATCH net 3/4] net/sonic: Clean up and modernize log messages

2018-02-24 Thread Finn Thain
homas Bogendoerfer Cc: Chris Zankel Tested-by: Stan Johnson Signed-off-by: Finn Thain --- Only the macsonic.c changes have been tested. The other changes are similar but untested. --- drivers/net/ethernet/natsemi/jazzsonic.c | 13 - drivers/net/ethernet/natsemi/macsonic.c

[PATCH net 4/4] net/sonic: Replace custom debug logging with netif_* calls

2018-02-24 Thread Finn Thain
Eliminate duplicated debug code by moving it into the core driver. Don't log the only valid silicon revision number (it's in the source). Cc: Thomas Bogendoerfer Cc: Chris Zankel Tested-by: Stan Johnson Signed-off-by: Finn Thain --- Only the sonic.[ch] and macsonic.c changes have b

[PATCH net 0/4] Fixes, cleanup and modernization for SONIC ethernet drivers

2018-02-24 Thread Finn Thain
Changes since v4 of combined patch series: - Removed redundant and non-portable MACH_IS_MAC tests. - Omitted patches unrelated to SONIC drivers. - Dropped changes to the 'version_printed' logic and debug message text. Finn Thain (4): net/macsonic: Convert to nubus_driver net/macs

[PATCH net 1/4] net/macsonic: Convert to nubus_driver

2018-02-24 Thread Finn Thain
This resolves an old issue preventing any NuBus SONIC NICs from working in a Mac with an on-board SONIC device. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/net/ethernet/natsemi/macsonic.c | 173 ++-- 1 file changed, 119 insertions(+), 54 deletions

[PATCH net 2/4] net/macsonic: Drop redundant MACH_IS_MAC test

2018-02-24 Thread Finn Thain
The MACH_IS_MAC test is redundant here because the platform device won't get registered unless MACH_IS_MAC. Cc: Geert Uytterhoeven Signed-off-by: Finn Thain --- drivers/net/ethernet/natsemi/macsonic.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/natsemi/macso

[PATCH] net/smc9194: Remove bogus CONFIG_MAC reference

2018-02-21 Thread Finn Thain
"[PATCH] add m68k dependencies to net driver config".) Signed-off-by: Finn Thain --- drivers/net/ethernet/smsc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/smsc/Kconfig b/drivers/net/ethernet/smsc/Kconfig index 63aca9f847e1..4c2f612e4414 10

Re: [PATCH net 2/4] net/8390: Fix msg_enable patch snafu

2018-02-19 Thread Finn Thain
On Mon, 19 Feb 2018, David Miller wrote: > > On Mon, 19 Feb 2018, David Miller wrote: > > > >> > The lib8390 module parameter 'msg_enable' doesn't do anything > >> > useful: it causes an ancient version string to be logged. > >> > >> Since you are removing the last reference to this 'version' s

Re: [PATCH net 2/4] net/8390: Fix msg_enable patch snafu

2018-02-19 Thread Finn Thain
On Mon, 19 Feb 2018, David Miller wrote: > From: Finn Thain > Date: Sun, 18 Feb 2018 21:39:17 -0500 (EST) > > > The lib8390 module parameter 'msg_enable' doesn't do anything useful: > > it causes an ancient version string to be logged. > > Since y

[PATCH net 2/4] net/8390: Fix msg_enable patch snafu

2018-02-18 Thread Finn Thain
om the same patch. Cc: Russell King Fixes: c45f812f0280 ("8390 : Replace ei_debug with msg_enable/NETIF_MSG_* feature") Tested-by: Stan Johnson Signed-off-by: Finn Thain --- Only the mac8390.c and lib8390.c changes have been tested. The other changes are similar but untested. --- d

[PATCH net 4/4] net/mac8390: Fix log messages

2018-02-18 Thread Finn Thain
Use dev_foo() to log the slot number instead of the unexpanded "eth%d" format string. Disambiguate the two identical "Card type %s is unsupported" messages. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/net/ethernet/8390/mac8390.c | 36 +--

[PATCH net 3/4] net/mac8390: Convert to nubus_driver

2018-02-18 Thread Finn Thain
This resolves an old bug that constrained this driver to no more than one card. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/net/Space.c | 3 - drivers/net/ethernet/8390/mac8390.c | 139 +--- include/net/Space.h

[PATCH net 1/4] net/8390: Remove redundant make dependencies

2018-02-18 Thread Finn Thain
of 8390.o were introduced in commit 644570b83026 ("8390: Move the 8390 related drivers"). Cc: Greg Ungerer Cc: Geert Uytterhoeven Signed-off-by: Finn Thain Acked-by: Geert Uytterhoeven --- drivers/net/ethernet/8390/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH net 0/4] Fixes, cleanup and modernization for 8390 ethernet drivers

2018-02-18 Thread Finn Thain
Changes since v4 of combined patch series: - Removed redundant and non-portable MACH_IS_MAC tests. - Added acked-by tags from Geert Uytterhoeven. - Omitted patches unrelated to 8390 drivers. Finn Thain (4): net/8390: Remove redundant make dependencies net/8390: Fix msg_enable patch snafu

Re: [PATCH net v4 02/13] net/8390: Fix msg_enable patch snafu

2018-02-15 Thread Finn Thain
On Wed, 14 Feb 2018, David Miller wrote: > > Have you considered that implementing the ethtool hooks in the core > > driver might allow removal of all 8390 driver 'msg_enable' module > > parameters and msglevel ethtool hooks added by c45f812f0280, excepting > > those in the core driver? But eve

Re: [PATCH net v4 02/13] net/8390: Fix msg_enable patch snafu

2018-02-14 Thread Finn Thain
On Tue, 13 Feb 2018, David Miller wrote: > > I think you have overlooked those modules which offer no way to set > > p->msg_enable, i.e. ax88796, axnet_cs, etherh, hydra, mac8390, > > mcf8390, pcnet_cs and zorro8390. > > Then that's a bug, we have a very simple easy to implement interface for

Re: [PATCH net v4 09/13] net/mac8390: Convert to nubus_driver

2018-02-12 Thread Finn Thain
On Mon, 12 Feb 2018, Geert Uytterhoeven wrote: > On Mon, Feb 12, 2018 at 4:08 AM, Finn Thain > wrote: > > This resolves an old bug that constrained this driver to no more than > > one card. > > > > Tested-by: Stan Johnson > > Signed-off-by: Finn Thain &g

Re: [PATCH net v4 02/13] net/8390: Fix msg_enable patch snafu

2018-02-12 Thread Finn Thain
On Mon, 12 Feb 2018, David Miller wrote: > From: Finn Thain > Date: Sun, 11 Feb 2018 22:08:43 -0500 (EST) > > > The lib8390 module parameter 'msg_enable' doesn't do anything useful: > > it causes an ancient version string to be logged. > > Not true. &

[PATCH net v4 04/13] net/macmace: Fix and clean up log messages

2018-02-11 Thread Finn Thain
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 Signed-off-by: Finn Thai

[PATCH net v4 03/13] net/smc9194: Remove bogus CONFIG_MAC reference

2018-02-11 Thread Finn Thain
"[PATCH] add m68k dependencies to net driver config".) Signed-off-by: Finn Thain --- drivers/net/ethernet/smsc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/smsc/Kconfig b/drivers/net/ethernet/smsc/Kconfig index 63aca9f847e1..4c2f612e4414 10

[PATCH net v4 02/13] net/8390: Fix msg_enable patch snafu

2018-02-11 Thread Finn Thain
om the same patch. Cc: Russell King Fixes: c45f812f0280 ("8390 : Replace ei_debug with msg_enable/NETIF_MSG_* feature") Tested-by: Stan Johnson Signed-off-by: Finn Thain --- Only the mac8390.c and lib8390.c changes have been tested. The other changes are similar but untested. --- d

[PATCH net v4 06/13] net/mac89x0: Convert to platform_driver

2018-02-11 Thread Finn Thain
Apparently these Dayna cards don't have a pseudoslot declaration ROM which means they can't be probed like NuBus cards. Cc: Geert Uytterhoeven Signed-off-by: Finn Thain --- arch/m68k/mac/config.c| 4 ++ drivers/net/Space.c | 3 -- drivers/net/ether

[PATCH net v4 05/13] net/mac89x0: Remove dead or unreachable code

2018-02-11 Thread Finn Thain
Signed-off-by: Finn Thain --- drivers/net/ethernet/cirrus/mac89x0.c | 32 1 file changed, 32 deletions(-) diff --git a/drivers/net/ethernet/cirrus/mac89x0.c b/drivers/net/ethernet/cirrus/mac89x0.c index 977d4c2c759d..4fe0ae93ab36 100644 --- a/drivers/net

[PATCH net v4 08/13] net/mac89x0: Replace custom debug logging with netif_* calls

2018-02-11 Thread Finn Thain
Adopt the conventional style of debug logging because it is both shorter and more flexible. Signed-off-by: Finn Thain --- drivers/net/ethernet/cirrus/mac89x0.c | 47 +++ 1 file changed, 15 insertions(+), 32 deletions(-) diff --git a/drivers/net/ethernet/cirrus

[PATCH net v4 10/13] net/mac8390: Fix log messages

2018-02-11 Thread Finn Thain
Use dev_foo() to log the slot number instead of the unexpanded "eth%d" format string. Disambiguate the two identical "Card type %s is unsupported" messages. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/net/ethernet/8390/mac8390.c | 36 +--

[PATCH net v4 01/13] net/8390: Remove redundant make dependencies

2018-02-11 Thread Finn Thain
tterhoeven Signed-off-by: Finn Thain --- drivers/net/ethernet/8390/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/8390/Makefile b/drivers/net/ethernet/8390/Makefile index f975c2fc88a3..1d650e66cc6e 100644 --- a/drivers/net/ethernet/8390/Make

[PATCH net v4 07/13] net/mac89x0: Fix and modernize log messages

2018-02-11 Thread Finn Thain
Fix log message fragments that no longer produce the desired output since the behaviour of printk() was changed. Add missing printk severity levels. Drop deprecated "out of memory" message as per checkpatch advice. Signed-off-by: Finn Thain --- drivers/net/ethernet/cirrus/mac8

[PATCH net v4 09/13] net/mac8390: Convert to nubus_driver

2018-02-11 Thread Finn Thain
This resolves an old bug that constrained this driver to no more than one card. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/net/Space.c | 3 - drivers/net/ethernet/8390/mac8390.c | 138 ++-- include/net/Space.h

[PATCH net v4 00/13] Fixes, cleanup and modernization for some legacy ethernet NIC drivers

2018-02-11 Thread Finn Thain
obe messages logged after register_netdev(). Changes since v1: - Retained the once_is_enough test in mac89x0.c. - Added tested-by tags. - Moved netdev_info() call to correct branch in macmace.c. Finn Thain (13): net/8390: Remove redundant make dependencies net/8390: Fix msg_enable patch snafu

[PATCH net v4 12/13] net/sonic: Clean up and modernize log messages

2018-02-11 Thread Finn Thain
homas Bogendoerfer Cc: Chris Zankel Tested-by: Stan Johnson Signed-off-by: Finn Thain --- Only the macsonic.c changes have been tested. The other changes are similar but untested. --- drivers/net/ethernet/natsemi/jazzsonic.c | 13 drivers/net/ethernet/natsemi/macsonic.c

[PATCH net v4 11/13] net/macsonic: Convert to nubus_driver

2018-02-11 Thread Finn Thain
This resolves an old issue preventing any NuBus SONIC NICs from working in a Mac with an on-board SONIC device. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/net/ethernet/natsemi/macsonic.c | 172 ++-- 1 file changed, 118 insertions(+), 54 deletions

[PATCH net v4 13/13] net/sonic: Replace custom debug logging with netif_* calls

2018-02-11 Thread Finn Thain
Eliminate duplicated debug code by moving it into the core driver. Don't log the only valid silicon revision number (it's in the source). Cc: Thomas Bogendoerfer Cc: Chris Zankel Tested-by: Stan Johnson Signed-off-by: Finn Thain --- Only the sonic.[ch] and macsonic.c changes have b

[PATCH v5 11/14] nubus: Rename struct nubus_dev

2018-01-13 Thread Finn Thain
ing struct nubus_dev as struct nubus_rsrc. "Functional resource" is the vendor's terminology so this helps avoid confusion. Cc: "David S. Miller" Cc: Bartlomiej Zolnierkiewicz Acked-by: Bartlomiej Zolnierkiewicz Tested-by: Stan Johnson Signed-off-by: Finn Thain ---

[PATCH v5 12/14] nubus: Adopt standard linked list implementation

2018-01-13 Thread Finn Thain
This increases code re-use and improves readability. Cc: "David S. Miller" Cc: Bartlomiej Zolnierkiewicz Acked-by: Bartlomiej Zolnierkiewicz Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/net/ethernet/8390/mac8390.c | 7 +++-- drivers/net/ethernet/cirrus/mac89x

[PATCH v5 13/14] nubus: Add expansion_type values for various Mac models

2018-01-13 Thread Finn Thain
d-by: Stan Johnson Signed-off-by: Finn Thain --- arch/m68k/include/asm/macintosh.h | 9 ++- arch/m68k/mac/config.c | 110 +--- drivers/net/ethernet/natsemi/macsonic.c | 8 +-- 3 files changed, 54 insertions(+), 73 deletions(-) diff --git a/arch/m6

[PATCH v4 13/14] nubus: Add expansion_type values for various Mac models

2017-12-13 Thread Finn Thain
d-by: Stan Johnson Signed-off-by: Finn Thain --- arch/m68k/include/asm/macintosh.h | 9 ++- arch/m68k/mac/config.c | 110 +--- drivers/net/ethernet/natsemi/macsonic.c | 8 +-- 3 files changed, 54 insertions(+), 73 deletions(-) diff --git a/arch/m6

[PATCH v4 12/14] nubus: Adopt standard linked list implementation

2017-12-13 Thread Finn Thain
This increases code re-use and improves readability. Cc: "David S. Miller" Cc: Bartlomiej Zolnierkiewicz Acked-by: Bartlomiej Zolnierkiewicz Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/net/ethernet/8390/mac8390.c | 7 +++-- drivers/net/ethernet/cirrus/mac89x

[PATCH v4 11/14] nubus: Rename struct nubus_dev

2017-12-13 Thread Finn Thain
ing struct nubus_dev as struct nubus_rsrc. "Functional resource" is the vendor's terminology so this helps avoid confusion. Cc: "David S. Miller" Cc: Bartlomiej Zolnierkiewicz Acked-by: Bartlomiej Zolnierkiewicz Tested-by: Stan Johnson Signed-off-by: Finn Thain ---

[PATCH v3 11/14] nubus: Rename struct nubus_dev

2017-12-04 Thread Finn Thain
ing struct nubus_dev as struct nubus_rsrc. "Functional resource" is the vendor's terminology so this helps avoid confusion. Cc: Bartlomiej Zolnierkiewicz Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/net/ethernet/8390/mac8390.c | 26 drivers/net/ethernet

[PATCH v3 12/14] nubus: Adopt standard linked list implementation

2017-12-04 Thread Finn Thain
This increases code re-use and improves readability. Cc: Bartlomiej Zolnierkiewicz Signed-off-by: Finn Thain Tested-by: Stan Johnson --- drivers/net/ethernet/8390/mac8390.c | 7 +++-- drivers/net/ethernet/cirrus/mac89x0.c | 6 +++-- drivers/net/ethernet/natsemi/macsonic.c | 8

[PATCH v3 13/14] nubus: Add expansion_type values for various Mac models

2017-12-04 Thread Finn Thain
Add an expansion slot attribute to allow drivers to properly handle cards like Comm Slot cards and PDS cards without declaration ROMs. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- arch/m68k/include/asm/macintosh.h | 9 ++- arch/m68k/mac/config.c | 110

[PATCH v2 11/13] nubus: Rename struct nubus_dev

2017-11-17 Thread Finn Thain
nubus_rsrc. "Functional resource" is the vendor's terminology so this helps to avoid confusion. Cc: Bartlomiej Zolnierkiewicz Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/net/ethernet/8390/mac8390.c | 26 drivers/net/ethernet/natsemi/macsonic.c | 22 +++--

[PATCH v2 12/13] nubus: Add expansion_type values for various Mac models

2017-11-17 Thread Finn Thain
Add an expansion slot attribute to allow drivers to properly handle cards like Comm Slot cards and PDS cards without declaration ROMs. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- arch/m68k/include/asm/macintosh.h | 9 ++- arch/m68k/mac/config.c | 110

Re: [PATCH 12/14] nubus: Rename struct nubus_dev

2017-11-13 Thread Finn Thain
On Mon, 13 Nov 2017, Geert Uytterhoeven wrote: > Hi Finn, > > On Sat, Nov 11, 2017 at 7:12 AM, Finn Thain > wrote: > > It is misleading to use "dev" to mean a functional resource. And in > > adopting the Linux Driver Model, struct nubus_board will embed a &g

[PATCH net v3 04/12] net/sonic: Clean up and modernize log messages

2017-11-10 Thread Finn Thain
: Finn Thain --- Only the macsonic.c changes have been tested. The other changes are similar but untested. --- drivers/net/ethernet/natsemi/jazzsonic.c | 13 drivers/net/ethernet/natsemi/macsonic.c | 54 ++-- drivers/net/ethernet/natsemi/xtsonic.c | 11

[PATCH net v3 03/12] net/mac8390: Convert to nubus_driver

2017-11-10 Thread Finn Thain
Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/net/Space.c | 3 -- drivers/net/ethernet/8390/mac8390.c | 105 ++-- include/net/Space.h | 1 - 3 files changed, 53 insertions(+), 56 deletions(-) diff --git a

[PATCH net v3 02/12] net/mac89x0: Convert to platform_driver

2017-11-10 Thread Finn Thain
Apparently these Dayna cards don't have a pseudoslot declaration ROM which means they can't be probed like NuBus cards. Cc: Geert Uytterhoeven Signed-off-by: Finn Thain --- arch/m68k/mac/config.c| 4 +++ drivers/net/Space.c | 3 -- drivers/ne

[PATCH net v3 00/12] Fixes, cleanup and modernization for some legacy ethernet NIC drivers

2017-11-10 Thread Finn Thain
macmace.c. Changes since v2: - Modernize NuBus drivers by adopting the Linux Driver Model. - Use dev_foo() in NuBus drivers. - Don't log any probe messages after register_netdev(). Finn Thain (12): net/macsonic: Convert to nubus_driver net/mac89x0: Convert to platform_driver net/ma

[PATCH net v3 06/12] net/mac89x0: Remove dead or unreachable code

2017-11-10 Thread Finn Thain
Signed-off-by: Finn Thain --- drivers/net/ethernet/cirrus/mac89x0.c | 31 --- 1 file changed, 31 deletions(-) diff --git a/drivers/net/ethernet/cirrus/mac89x0.c b/drivers/net/ethernet/cirrus/mac89x0.c index 8a23d2fc0e28..c1a3d1aed037 100644 --- a/drivers/net

[PATCH net v3 05/12] net/sonic: Replace custom debug logging with netif_* calls

2017-11-10 Thread Finn Thain
Eliminate duplicated debug code by moving it into the core driver. Don't log the only valid silicon revision number (it's in the source). Cc: Thomas Bogendoerfer Cc: Chris Zankel Tested-by: Stan Johnson Signed-off-by: Finn Thain --- Only the sonic.[ch] and macsonic.c changes have b

[PATCH net v3 08/12] net/mac89x0: Replace custom debug logging with netif_* calls

2017-11-10 Thread Finn Thain
Signed-off-by: Finn Thain --- drivers/net/ethernet/cirrus/mac89x0.c | 52 --- 1 file changed, 18 insertions(+), 34 deletions(-) diff --git a/drivers/net/ethernet/cirrus/mac89x0.c b/drivers/net/ethernet/cirrus/mac89x0.c index 4575370d57db..9348c095c898 100644

[PATCH net v3 07/12] net/mac89x0: Fix and modernize log messages

2017-11-10 Thread Finn Thain
Fix log message fragments which no longer produce the desired output (since the behaviour of printk() was changed). Add missing printk severity levels. Drop deprecated "out of memory" message as per checkpatch advice. Signed-off-by: Finn Thain --- drivers/net/ethernet/cirrus/mac8

[PATCH net v3 01/12] net/macsonic: Convert to nubus_driver

2017-11-10 Thread Finn Thain
Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/net/ethernet/natsemi/macsonic.c | 170 ++-- 1 file changed, 118 insertions(+), 52 deletions(-) diff --git a/drivers/net/ethernet/natsemi/macsonic.c b/drivers/net/ethernet/natsemi/macsonic.c index

[PATCH net v3 11/12] net/macmace: Fix and clean up log messages

2017-11-10 Thread Finn Thain
Don't log unexpanded "eth%d". 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 Signed-off-by: Finn Thain --- drivers/net

[PATCH net v3 12/12] net/smc9194: Remove bogus CONFIG_MAC reference

2017-11-10 Thread Finn Thain
"[PATCH] add m68k dependencies to net driver config".) Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/net/ethernet/smsc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/smsc/Kconfig b/drivers/net/ethernet/smsc/Kconfig index 63

[PATCH net v3 09/12] net/8390: Fix redundant code

2017-11-10 Thread Finn Thain
ure") Tested-by: Stan Johnson Signed-off-by: Finn Thain --- Only the mac8390.c and lib8390.c changes have been tested. The other changes are similar but untested. --- drivers/net/ethernet/8390/ax88796.c | 3 --- drivers/net/ethernet/8390/axnet_cs.c | 2 -- drivers/net/ethe

[PATCH net v3 10/12] net/mac8390: Fix log messages

2017-11-10 Thread Finn Thain
Use dev_foo() and log the slot number instead of the unexpanded "eth%d". Disambiguate the two identical "Card type %s is unsupported" messages. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/net/ethernet/8390/mac8390.c | 36 +---

[PATCH 12/14] nubus: Rename struct nubus_dev

2017-11-10 Thread Finn Thain
e vendor's terminology and avoids confusion. Cc: Bartlomiej Zolnierkiewicz Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/net/ethernet/8390/mac8390.c | 12 ++-- drivers/net/ethernet/natsemi/macsonic.c | 4 +- drivers/nubus/nubus.c

  1   2   >