lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 24 Feb 2020 14:07:42 +0100
From:   Auger Eric <eric.auger@...hat.com>
To:     Rob Herring <robh@...nel.org>,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        soc@...nel.org, Andre Przywara <andre.przywara@....com>,
        Robert Richter <rrichter@...vell.com>,
        Jon Loeliger <jdl@....com>, Alexander Graf <graf@...zon.com>,
        Matthias Brugger <mbrugger@...e.com>,
        Mark Langsdorf <mlangsdo@...hat.com>
Cc:     Alex Williamson <alex.williamson@...hat.com>,
        Borislav Petkov <bp@...en8.de>,
        Cornelia Huck <cohuck@...hat.com>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        "David S. Miller" <davem@...emloft.net>,
        devicetree@...r.kernel.org, iommu@...ts.linux-foundation.org,
        James Morse <james.morse@....com>,
        Jens Axboe <axboe@...nel.dk>, Joerg Roedel <joro@...tes.org>,
        kvm@...r.kernel.org, linux-clk@...r.kernel.org,
        linux-edac@...r.kernel.org, linux-ide@...r.kernel.org,
        linux-pm@...r.kernel.org,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        netdev@...r.kernel.org, "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Robin Murphy <robin.murphy@....com>,
        Stephen Boyd <sboyd@...nel.org>,
        Tony Luck <tony.luck@...el.com>,
        Viresh Kumar <viresh.kumar@...aro.org>,
        Will Deacon <will@...nel.org>
Subject: Re: [RFC PATCH 01/11] vfio: Remove Calxeda XGMAC reset driver

Hi Rob, Alex,

On 2/18/20 6:13 PM, Rob Herring wrote:
> Cc: Eric Auger <eric.auger@...hat.com>
> Cc: Alex Williamson <alex.williamson@...hat.com>
> Cc: Cornelia Huck <cohuck@...hat.com>
> Cc: kvm@...r.kernel.org
> Signed-off-by: Rob Herring <robh@...nel.org>
> ---
> Do not apply yet.
> 
>  drivers/vfio/platform/reset/Kconfig           |  8 --
>  drivers/vfio/platform/reset/Makefile          |  2 -
>  .../reset/vfio_platform_calxedaxgmac.c        | 74 -------------------
>  3 files changed, 84 deletions(-)
>  delete mode 100644 drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c
> 
> diff --git a/drivers/vfio/platform/reset/Kconfig b/drivers/vfio/platform/reset/Kconfig
> index 1edbe9ee7356..3668d1d92909 100644
> --- a/drivers/vfio/platform/reset/Kconfig
> +++ b/drivers/vfio/platform/reset/Kconfig
> @@ -1,12 +1,4 @@
>  # SPDX-License-Identifier: GPL-2.0-only
> -config VFIO_PLATFORM_CALXEDAXGMAC_RESET
> -	tristate "VFIO support for calxeda xgmac reset"
> -	depends on VFIO_PLATFORM
> -	help
> -	  Enables the VFIO platform driver to handle reset for Calxeda xgmac
> -
> -	  If you don't know what to do here, say N.
> -
>  config VFIO_PLATFORM_AMDXGBE_RESET
>  	tristate "VFIO support for AMD XGBE reset"
>  	depends on VFIO_PLATFORM
> diff --git a/drivers/vfio/platform/reset/Makefile b/drivers/vfio/platform/reset/Makefile
> index 7294c5ea122e..be7960ce5dbc 100644
> --- a/drivers/vfio/platform/reset/Makefile
> +++ b/drivers/vfio/platform/reset/Makefile
> @@ -1,7 +1,5 @@
>  # SPDX-License-Identifier: GPL-2.0
> -vfio-platform-calxedaxgmac-y := vfio_platform_calxedaxgmac.o
>  vfio-platform-amdxgbe-y := vfio_platform_amdxgbe.o
> 
> -obj-$(CONFIG_VFIO_PLATFORM_CALXEDAXGMAC_RESET) += vfio-platform-calxedaxgmac.o
>  obj-$(CONFIG_VFIO_PLATFORM_AMDXGBE_RESET) += vfio-platform-amdxgbe.o
>  obj-$(CONFIG_VFIO_PLATFORM_BCMFLEXRM_RESET) += vfio_platform_bcmflexrm.o
> diff --git a/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c b/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c
> deleted file mode 100644
> index 09a9453b75c5..000000000000
> --- a/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c
> +++ /dev/null
> @@ -1,74 +0,0 @@
> -// SPDX-License-Identifier: GPL-2.0-only
> -/*
> - * VFIO platform driver specialized for Calxeda xgmac reset
> - * reset code is inherited from calxeda xgmac native driver
> - *
> - * Copyright 2010-2011 Calxeda, Inc.
> - * Copyright (c) 2015 Linaro Ltd.
> - *              www.linaro.org
> - */
> -
> -#include <linux/module.h>
> -#include <linux/kernel.h>
> -#include <linux/init.h>
> -#include <linux/io.h>
> -
> -#include "../vfio_platform_private.h"
> -
> -#define DRIVER_VERSION  "0.1"
> -#define DRIVER_AUTHOR   "Eric Auger <eric.auger@...aro.org>"
> -#define DRIVER_DESC     "Reset support for Calxeda xgmac vfio platform device"
> -
> -/* XGMAC Register definitions */
> -#define XGMAC_CONTROL           0x00000000      /* MAC Configuration */
> -
> -/* DMA Control and Status Registers */
> -#define XGMAC_DMA_CONTROL       0x00000f18      /* Ctrl (Operational Mode) */
> -#define XGMAC_DMA_INTR_ENA      0x00000f1c      /* Interrupt Enable */
> -
> -/* DMA Control registe defines */
> -#define DMA_CONTROL_ST          0x00002000      /* Start/Stop Transmission */
> -#define DMA_CONTROL_SR          0x00000002      /* Start/Stop Receive */
> -
> -/* Common MAC defines */
> -#define MAC_ENABLE_TX           0x00000008      /* Transmitter Enable */
> -#define MAC_ENABLE_RX           0x00000004      /* Receiver Enable */
> -
> -static inline void xgmac_mac_disable(void __iomem *ioaddr)
> -{
> -	u32 value = readl(ioaddr + XGMAC_DMA_CONTROL);
> -
> -	value &= ~(DMA_CONTROL_ST | DMA_CONTROL_SR);
> -	writel(value, ioaddr + XGMAC_DMA_CONTROL);
> -
> -	value = readl(ioaddr + XGMAC_CONTROL);
> -	value &= ~(MAC_ENABLE_TX | MAC_ENABLE_RX);
> -	writel(value, ioaddr + XGMAC_CONTROL);
> -}
> -
> -static int vfio_platform_calxedaxgmac_reset(struct vfio_platform_device *vdev)
> -{
> -	struct vfio_platform_region *reg = &vdev->regions[0];
> -
> -	if (!reg->ioaddr) {
> -		reg->ioaddr =
> -			ioremap(reg->addr, reg->size);
> -		if (!reg->ioaddr)
> -			return -ENOMEM;
> -	}
> -
> -	/* disable IRQ */
> -	writel(0, reg->ioaddr + XGMAC_DMA_INTR_ENA);
> -
> -	/* Disable the MAC core */
> -	xgmac_mac_disable(reg->ioaddr);
> -
> -	return 0;
> -}
> -
> -module_vfio_reset_handler("calxeda,hb-xgmac", vfio_platform_calxedaxgmac_reset);
> -
> -MODULE_VERSION(DRIVER_VERSION);
> -MODULE_LICENSE("GPL v2");
> -MODULE_AUTHOR(DRIVER_AUTHOR);
> -MODULE_DESCRIPTION(DRIVER_DESC);
> --
> 2.20.1
> 
I do not have access to this HW anymore and I use Seattle to test
vfio-platform. So

Acked-by: Eric Auger <eric.auger@...hat.com>

Thanks

Eric

Powered by blists - more mailing lists