]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
arcnet: com20020-pci: handle backplane mode depending on card type
authorMichael Grzeschik <m.grzeschik@pengutronix.de>
Wed, 28 Jun 2017 16:32:20 +0000 (18:32 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 29 Jun 2017 19:26:13 +0000 (15:26 -0400)
We read the backplane mode of each subcard from bits 2 and 3 of the misc
register.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/arcnet/com20020-pci.c

index dec300cac55f9d43bd00c45623b34ff99b1527b9..f5854ab7dc32670f220c6cd875aa5253543a06ae 100644 (file)
@@ -199,6 +199,8 @@ static int com20020pci_probe(struct pci_dev *pdev,
                lp->timeout = timeout;
                lp->hw.owner = THIS_MODULE;
 
+               lp->backplane = (inb(priv->misc) >> (2 + i)) & 0x1;
+
                /* Get the dev_id from the PLX rotary coder */
                if (!strncmp(ci->name, "EAE PLX-PCI MA1", 15))
                        dev->dev_id = 0xc;