From: Jag Raman Date: Fri, 23 Jun 2017 18:58:40 +0000 (-0400) Subject: sparc64: add port_id to VIO device metadata X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=15c35e4ebbe16a205856e033627e50936ab7cd99;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git sparc64: add port_id to VIO device metadata Add port_id field to VIO device metadata to identify the port of VIO device. Signed-off-by: Jagannathan Raman Reviewed-by: Liam Merwick Reviewed-by: Shannon Nelson Signed-off-by: David S. Miller --- diff --git a/arch/sparc/include/asm/vio.h b/arch/sparc/include/asm/vio.h index 25ede61c0386..d1c47e9f0090 100644 --- a/arch/sparc/include/asm/vio.h +++ b/arch/sparc/include/asm/vio.h @@ -330,6 +330,7 @@ struct vio_dev { u64 dev_no; + unsigned long port_id; unsigned long channel_id; unsigned int tx_irq; diff --git a/arch/sparc/kernel/vio.c b/arch/sparc/kernel/vio.c index 624f0a98edfe..6715fc36e0e9 100644 --- a/arch/sparc/kernel/vio.c +++ b/arch/sparc/kernel/vio.c @@ -334,6 +334,7 @@ static struct vio_dev *vio_create_one(struct mdesc_handle *hp, u64 mp, memset(vdev->compat, 0, sizeof(vdev->compat)); vdev->compat_len = clen; + vdev->port_id = ~0UL; vdev->tx_irq = 0; vdev->rx_irq = 0; @@ -349,6 +350,7 @@ static struct vio_dev *vio_create_one(struct mdesc_handle *hp, u64 mp, dev_set_name(&vdev->dev, "%s-%llu-%llu", type, *cfg_handle, *id); vdev->dev_no = *cfg_handle; + vdev->port_id = *id; } vdev->dev.parent = parent;