dsa: Replace mii_bus with a generic host device
This change makes it so that instead of passing and storing a mii_bus we instead pass and store a host_dev. From there we can test to determine the exact type of device, and can verify it is the correct device for our switch. So for example it would be possible to pass a device pointer from a pci_dev and instead of checking for a PHY ID we could check for a vendor and/or device ID. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
5075314e4e
commit
b4d2394d01
@@ -17,10 +17,14 @@
|
||||
#include <net/dsa.h>
|
||||
#include "mv88e6xxx.h"
|
||||
|
||||
static char *mv88e6171_probe(struct mii_bus *bus, int sw_addr)
|
||||
static char *mv88e6171_probe(struct device *host_dev, int sw_addr)
|
||||
{
|
||||
struct mii_bus *bus = dsa_host_dev_to_mii_bus(host_dev);
|
||||
int ret;
|
||||
|
||||
if (bus == NULL)
|
||||
return NULL;
|
||||
|
||||
ret = __mv88e6xxx_reg_read(bus, sw_addr, REG_PORT(0), 0x03);
|
||||
if (ret >= 0) {
|
||||
if ((ret & 0xfff0) == 0x1710)
|
||||
|
Reference in New Issue
Block a user