• Home
  • Raw
  • Download

Lines Matching refs:mvusb

34 	struct mvusb_mdio *mvusb = mdio->priv;  in mvusb_mdio_read()  local
40 mvusb->buf[MVUSB_CMD_ADDR] = cpu_to_le16(0xa400 | (dev << 5) | reg); in mvusb_mdio_read()
42 err = usb_bulk_msg(mvusb->udev, usb_sndbulkpipe(mvusb->udev, 2), in mvusb_mdio_read()
43 mvusb->buf, 6, &alen, 100); in mvusb_mdio_read()
47 err = usb_bulk_msg(mvusb->udev, usb_rcvbulkpipe(mvusb->udev, 6), in mvusb_mdio_read()
48 &mvusb->buf[MVUSB_CMD_VAL], 2, &alen, 100); in mvusb_mdio_read()
52 return le16_to_cpu(mvusb->buf[MVUSB_CMD_VAL]); in mvusb_mdio_read()
57 struct mvusb_mdio *mvusb = mdio->priv; in mvusb_mdio_write() local
63 mvusb->buf[MVUSB_CMD_ADDR] = cpu_to_le16(0x8000 | (dev << 5) | reg); in mvusb_mdio_write()
64 mvusb->buf[MVUSB_CMD_VAL] = cpu_to_le16(val); in mvusb_mdio_write()
66 return usb_bulk_msg(mvusb->udev, usb_sndbulkpipe(mvusb->udev, 2), in mvusb_mdio_write()
67 mvusb->buf, 8, &alen, 100); in mvusb_mdio_write()
74 struct mvusb_mdio *mvusb; in mvusb_mdio_probe() local
78 mdio = devm_mdiobus_alloc_size(dev, sizeof(*mvusb)); in mvusb_mdio_probe()
82 mvusb = mdio->priv; in mvusb_mdio_probe()
83 mvusb->mdio = mdio; in mvusb_mdio_probe()
84 mvusb->udev = usb_get_dev(interface_to_usbdev(interface)); in mvusb_mdio_probe()
87 mvusb->buf[MVUSB_CMD_PREAMBLE0] = cpu_to_le16(0xe800); in mvusb_mdio_probe()
88 mvusb->buf[MVUSB_CMD_PREAMBLE1] = cpu_to_le16(0x0001); in mvusb_mdio_probe()
96 usb_set_intfdata(interface, mvusb); in mvusb_mdio_probe()
104 usb_put_dev(mvusb->udev); in mvusb_mdio_probe()
110 struct mvusb_mdio *mvusb = usb_get_intfdata(interface); in mvusb_mdio_disconnect() local
111 struct usb_device *udev = mvusb->udev; in mvusb_mdio_disconnect()
113 mdiobus_unregister(mvusb->mdio); in mvusb_mdio_disconnect()