All of lore.kernel.org
 help / color / mirror / Atom feed
* [4.4 regression] 46a7fd8a : pcnet32: use pci_set_dma_mask insted of pci_dma_supported
@ 2015-11-11  8:50 허종만
  2015-11-11 11:58 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: 허종만 @ 2015-11-11  8:50 UTC (permalink / raw)
  To: linux-kernel, hch, pcnet32

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=euc-kr, Size: 4723 bytes --]


Hi,

I'm using Fedora 23 Linux Guest on top of VMWare workstation (version 10), running on Windows 7 Host.

After pulling Merge branch 'akpm' from latest Linus git, my ethernet interface doesn't work.

>From dmesg, I can see that pcnet32 doesn't support 32bit PCI busmaster DMA, as follows.

[    1.616867] libphy: Fixed MDIO Bus: probed
[    1.616871] pcnet32: pcnet32.c:v1.35 21.Apr.2008 tsbogend@alpha.franken.de
[    1.617232] pcnet32: architecture does not support 32bit PCI busmaster DMA
[    1.617304] VMware vmxnet3 virtual NIC driver - version 1.4.3.0-k-NAPI

Without the commit, pcnet32 ethernet is recognized correctly.

[    1.173395] libphy: Fixed MDIO Bus: probed
[    1.173399] pcnet32: pcnet32.c:v1.35 21.Apr.2008 tsbogend@alpha.franken.de
[    1.173637] pcnet32: PCnet/PCI II 79C970A at 0x2000, 00:0c:29:07:e2:51 assigned IRQ 19
[    1.173746] pcnet32: eth0: registered as PCnet/PCI II 79C970A
[    1.173799] pcnet32: 1 cards_found
[    1.173802] VMware vmxnet3 virtual NIC driver - version 1.4.2.0-k-NAPI


Below is git bisect log.

46a7fd8a9b302116b3263bc8e47f8f08c0d3a2ca is the first bad commit
commit 46a7fd8a9b302116b3263bc8e47f8f08c0d3a2ca
Author: Christoph Hellwig <hch@lst.de>
Date:   Tue Nov 10 14:45:17 2015 -0800

    pcnet32: use pci_set_dma_mask insted of pci_dma_supported
    
    All drivers should be using dma_set_mask / pci_set_dma_mask to try to
    set the dma mask instead of just querying it.  Without that some iommu
    implementations may not work.
    
    pci_dma_supported is removed entirely, but dma_supported stays for
    dma_ops implementations for now.
    
    This patch (of 15):
    
    This ensures the dma mask that is supported by the driver is recorded
    in the device structure.
    
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Acked-by: Don Fry <pcnet32@frontier.com>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
    Cc: Alan Stern <stern@rowland.harvard.edu>
    Cc: Alexandre Courbot <acourbot@nvidia.com>
    Cc: Alexey Khoroshilov <khoroshilov@ispras.ru>
    Cc: Ben Skeggs <bskeggs@redhat.com>
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
    Cc: Dave Airlie <airlied@redhat.com>
    Cc: David Airlie <airlied@linux.ie>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: Hans Verkuil <hverkuil@xs4all.nl>
    Cc: Helge Deller <deller@gmx.de>
    Cc: Jiri Slaby <jslaby@suse.com>
    Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
    Cc: Pawel Osciak <pawel@osciak.com>
    Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
    Cc: Sergey Kozlov <serjk@netup.ru>
    Cc: Shradha Shah <sshah@solarflare.com>
    Cc: Solarflare linux maintainers <linux-net-drivers@solarflare.com>
    Cc: Steven Toth <stoth@kernellabs.com>
    Cc: Thierry Reding <treding@nvidia.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

:040000 040000 dd0a67b69180edc5243578c8504cd2bd5d4efe24 1f92cb3d86111d725f4cf6a84076e8d9eee04362 M	drivers

# git bisect log
git bisect start
# bad: [c5a37883f42be712a989e54d5d6c0159b0e56599] Merge branch 'akpm' (patches from Andrew)
git bisect bad c5a37883f42be712a989e54d5d6c0159b0e56599
# good: [ae36ce07abbdde3521dc0ef7e32143b88718cd21] Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
git bisect good ae36ce07abbdde3521dc0ef7e32143b88718cd21
# good: [be596aaa74090f553c61505ad03bb7a7460e5d23] Add current selection check.
git bisect good be596aaa74090f553c61505ad03bb7a7460e5d23
# good: [5dfe5b2c714a5bea0908c1e00da0e8e00535f55c] Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
git bisect good 5dfe5b2c714a5bea0908c1e00da0e8e00535f55c
# bad: [111be8b28d87769dfbde901602d262902575805d] cx88: use pci_set_dma_mask insted of pci_dma_supported
git bisect bad 111be8b28d87769dfbde901602d262902575805d
# good: [3368e8fbcda539e4f9d6cdb750f23c25021698c9] lib/string.c: add ULL suffix to the constant definition
git bisect good 3368e8fbcda539e4f9d6cdb750f23c25021698c9
# bad: [bad007bca7b7643fea786737071c86088ba2803b] tw68-core: use pci_set_dma_mask insted of pci_dma_supported
git bisect bad bad007bca7b7643fea786737071c86088ba2803b
# bad: [46a7fd8a9b302116b3263bc8e47f8f08c0d3a2ca] pcnet32: use pci_set_dma_mask insted of pci_dma_supported
git bisect bad 46a7fd8a9b302116b3263bc8e47f8f08c0d3a2ca
# first bad commit: [46a7fd8a9b302116b3263bc8e47f8f08c0d3a2ca] pcnet32: use pci_set_dma_mask insted of pci_dma_supportedÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* Re: [4.4 regression] 46a7fd8a : pcnet32: use pci_set_dma_mask insted of pci_dma_supported
  2015-11-11  8:50 [4.4 regression] 46a7fd8a : pcnet32: use pci_set_dma_mask insted of pci_dma_supported 허종만
@ 2015-11-11 11:58 ` Christoph Hellwig
  2015-11-16  4:21   ` Don Fry
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2015-11-11 11:58 UTC (permalink / raw)
  To: 허종만; +Cc: linux-kernel, pcnet32

Can you try the patch below?

diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet/amd/pcnet32.c
index e2afabf..7ccebae 100644
--- a/drivers/net/ethernet/amd/pcnet32.c
+++ b/drivers/net/ethernet/amd/pcnet32.c
@@ -1500,10 +1500,11 @@ pcnet32_probe_pci(struct pci_dev *pdev, const struct pci_device_id *ent)
 		return -ENODEV;
 	}
 
-	if (!pci_set_dma_mask(pdev, PCNET32_DMA_MASK)) {
+	err = pci_set_dma_mask(pdev, PCNET32_DMA_MASK);
+	if (err) {
 		if (pcnet32_debug & NETIF_MSG_PROBE)
 			pr_err("architecture does not support 32bit PCI busmaster DMA\n");
-		return -ENODEV;
+		return err;
 	}
 	if (!request_region(ioaddr, PCNET32_TOTAL_SIZE, "pcnet32_probe_pci")) {
 		if (pcnet32_debug & NETIF_MSG_PROBE)

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

* Re: [4.4 regression] 46a7fd8a : pcnet32: use pci_set_dma_mask insted of pci_dma_supported
  2015-11-11 11:58 ` Christoph Hellwig
@ 2015-11-16  4:21   ` Don Fry
  0 siblings, 0 replies; 3+ messages in thread
From: Don Fry @ 2015-11-16  4:21 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: 허종만, linux-kernel

On Wed, 2015-11-11 at 12:58 +0100, Christoph Hellwig wrote:
> Can you try the patch below?

Acked-by: Don Fry <pcnet32@frontier.com>
-- 
Since pci_set_dma_mask() returns the opposite of pci_dma_supported(),
this fix is required for proper operation.  The original patch in
October was faulty.
> 
> diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet/amd/pcnet32.c
> index e2afabf..7ccebae 100644
> --- a/drivers/net/ethernet/amd/pcnet32.c
> +++ b/drivers/net/ethernet/amd/pcnet32.c
> @@ -1500,10 +1500,11 @@ pcnet32_probe_pci(struct pci_dev *pdev, const struct pci_device_id *ent)
>  		return -ENODEV;
>  	}
>  
> -	if (!pci_set_dma_mask(pdev, PCNET32_DMA_MASK)) {
> +	err = pci_set_dma_mask(pdev, PCNET32_DMA_MASK);
> +	if (err) {
>  		if (pcnet32_debug & NETIF_MSG_PROBE)
>  			pr_err("architecture does not support 32bit PCI busmaster DMA\n");
> -		return -ENODEV;
> +		return err;
>  	}
>  	if (!request_region(ioaddr, PCNET32_TOTAL_SIZE, "pcnet32_probe_pci")) {
>  		if (pcnet32_debug & NETIF_MSG_PROBE)



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

end of thread, other threads:[~2015-11-16  4:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-11  8:50 [4.4 regression] 46a7fd8a : pcnet32: use pci_set_dma_mask insted of pci_dma_supported 허종만
2015-11-11 11:58 ` Christoph Hellwig
2015-11-16  4:21   ` Don Fry

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.