Re: [PATCH v9 3/5] mfd: ioc3: Add driver for SGI IOC3 chip

From: Jakub Kicinski
Date: Thu Oct 10 2019 - 23:00:25 EST


On Thu, 10 Oct 2019 16:59:49 +0200, Thomas Bogendoerfer wrote:
> dev = alloc_etherdev(sizeof(struct ioc3_private));
> - if (!dev) {
> - err = -ENOMEM;
> - goto out_disable;
> - }
> -
> - if (pci_using_dac)
> - dev->features |= NETIF_F_HIGHDMA;

Looks like the NETIF_F_HIGHDMA feature will not longer be set, is that
okay?

> - err = pci_request_regions(pdev, "ioc3");
> - if (err)
> - goto out_free;
> + if (!dev)
> + return -ENOMEM;
>
> SET_NETDEV_DEV(dev, &pdev->dev);
>
> ip = netdev_priv(dev);
> - ip->dev = dev;
> - ip->dma_dev = &pdev->dev;
> -
> - dev->irq = pdev->irq;
> + ip->dma_dev = pdev->dev.parent;
> + ip->regs = devm_platform_ioremap_resource(pdev, 0);
> + if (!ip->regs) {
> + err = -ENOMEM;
> + goto out_free;
> + }