]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
sparc64: add port_id to VIO device metadata
authorJag Raman <jag.raman@oracle.com>
Fri, 23 Jun 2017 18:58:40 +0000 (14:58 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 25 Jun 2017 20:43:15 +0000 (13:43 -0700)
Add port_id field to VIO device metadata to identify the port of
VIO device.

Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/include/asm/vio.h
arch/sparc/kernel/vio.c

index 25ede61c038634910bbf7f411e5440a955c02dd4..d1c47e9f0090fad3de19279675dce729064ccad4 100644 (file)
@@ -330,6 +330,7 @@ struct vio_dev {
 
        u64                     dev_no;
 
+       unsigned long           port_id;
        unsigned long           channel_id;
 
        unsigned int            tx_irq;
index 624f0a98edfee0477b31bd857748c2695994a3f8..6715fc36e0e91018cce23f6eeead9b2f049e9bd2 100644 (file)
@@ -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;