From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: use generic DMA mapping code in powerpc V4 Date: Mon, 4 Feb 2019 13:38:52 +0100 Message-ID: <20190204123852.GA10428@lst.de> References: <6f2d6bc9-696b-2cb1-8a4e-df3da2bd6c0a@xenosoft.de> <20190129161411.GA14022@lst.de> <20190129163415.GA14529@lst.de> <96762cd2-65fc-bce5-8c5b-c03bc3baf0a1@xenosoft.de> <20190201080456.GA15456@lst.de> <9632DCDF-B9D9-416C-95FC-006B6005E2EC@xenosoft.de> <594beaae-9681-03de-9f42-191cc7d2f8e3@xenosoft.de> <20190204075616.GA5408@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org Sender: "Linuxppc-dev" To: Christian Zigotzky , Olof Johansson Cc: linux-arch@vger.kernel.org, Darren Stevens , linux-kernel@vger.kernel.org, Julian Margetson , linux-mm@kvack.org, iommu@lists.linux-foundation.org, Paul Mackerras , linuxppc-dev@lists.ozlabs.org List-Id: linux-arch.vger.kernel.org On Mon, Feb 04, 2019 at 01:13:54PM +0100, Christian Zigotzky wrote: >>> Results: The X1000 and X5000 boot but unfortunately the P.A. Semi Ethernet >>> doesn't work. >> Are there any interesting messages in the boot log? Can you send me >> the dmesg? >> > Here you are: http://www.xenosoft.de/dmesg_X1000_with_DMA_updates.txt It seems like the pasemi driver fails to set a DMA mask, but seems otherwise 64-bit DMA capable. The old PPC code didn't verify the dma mask during the map operations, but the x86-derived generic code does. This patch just sets the DMA mask. Olof: does this look ok? The DMA device seems to not directly bound by the net driver, but not really used by anything else in tree either.. diff --git a/drivers/net/ethernet/pasemi/pasemi_mac.c b/drivers/net/ethernet/pasemi/pasemi_mac.c index d21041554507..d98bd447c536 100644 --- a/drivers/net/ethernet/pasemi/pasemi_mac.c +++ b/drivers/net/ethernet/pasemi/pasemi_mac.c @@ -1716,6 +1716,7 @@ pasemi_mac_probe(struct pci_dev *pdev, const struct pci_device_id *ent) err = -ENODEV; goto out; } + dma_set_mask(&mac->dma_pdev->dev, DMA_BIT_MASK(32)); mac->iob_pdev = pci_get_device(PCI_VENDOR_ID_PASEMI, 0xa001, NULL); if (!mac->iob_pdev) { From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from verein.lst.de ([213.95.11.211]:48732 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728510AbfBDMr5 (ORCPT ); Mon, 4 Feb 2019 07:47:57 -0500 Date: Mon, 4 Feb 2019 13:38:52 +0100 From: Christoph Hellwig Subject: Re: use generic DMA mapping code in powerpc V4 Message-ID: <20190204123852.GA10428@lst.de> References: <6f2d6bc9-696b-2cb1-8a4e-df3da2bd6c0a@xenosoft.de> <20190129161411.GA14022@lst.de> <20190129163415.GA14529@lst.de> <96762cd2-65fc-bce5-8c5b-c03bc3baf0a1@xenosoft.de> <20190201080456.GA15456@lst.de> <9632DCDF-B9D9-416C-95FC-006B6005E2EC@xenosoft.de> <594beaae-9681-03de-9f42-191cc7d2f8e3@xenosoft.de> <20190204075616.GA5408@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-arch-owner@vger.kernel.org List-ID: To: Christian Zigotzky , Olof Johansson Cc: linux-arch@vger.kernel.org, Darren Stevens , linux-kernel@vger.kernel.org, Julian Margetson , linux-mm@kvack.org, iommu@lists.linux-foundation.org, Paul Mackerras , linuxppc-dev@lists.ozlabs.org Message-ID: <20190204123852.LRG2EJxKWj5lbTm4Nw0TdwiZG0kEIdohDTalE91l61c@z> On Mon, Feb 04, 2019 at 01:13:54PM +0100, Christian Zigotzky wrote: >>> Results: The X1000 and X5000 boot but unfortunately the P.A. Semi Ethernet >>> doesn't work. >> Are there any interesting messages in the boot log? Can you send me >> the dmesg? >> > Here you are: http://www.xenosoft.de/dmesg_X1000_with_DMA_updates.txt It seems like the pasemi driver fails to set a DMA mask, but seems otherwise 64-bit DMA capable. The old PPC code didn't verify the dma mask during the map operations, but the x86-derived generic code does. This patch just sets the DMA mask. Olof: does this look ok? The DMA device seems to not directly bound by the net driver, but not really used by anything else in tree either.. diff --git a/drivers/net/ethernet/pasemi/pasemi_mac.c b/drivers/net/ethernet/pasemi/pasemi_mac.c index d21041554507..d98bd447c536 100644 --- a/drivers/net/ethernet/pasemi/pasemi_mac.c +++ b/drivers/net/ethernet/pasemi/pasemi_mac.c @@ -1716,6 +1716,7 @@ pasemi_mac_probe(struct pci_dev *pdev, const struct pci_device_id *ent) err = -ENODEV; goto out; } + dma_set_mask(&mac->dma_pdev->dev, DMA_BIT_MASK(32)); mac->iob_pdev = pci_get_device(PCI_VENDOR_ID_PASEMI, 0xa001, NULL); if (!mac->iob_pdev) {