Lines Matching refs:xdev

40 	struct xenbus_device *xdev;  member
109 dev_dbg(&pdev->xdev->dev, "schedule aer frontend job\n"); in schedule_pcifront_aer_op()
148 dev_err(&pdev->xdev->dev, in do_pci_op()
164 dev_err(&pdev->xdev->dev, in do_pci_op()
194 dev_info(&pdev->xdev->dev, in pcifront_bus_read()
203 dev_info(&pdev->xdev->dev, "read got back value %x\n", in pcifront_bus_read()
233 dev_info(&pdev->xdev->dev, in pcifront_bus_write()
404 dev_info(&pdev->xdev->dev, "claiming resource %s/%d\n", in pcifront_claim_resource()
407 dev_err(&pdev->xdev->dev, "Could not claim resource %s/%d! " in pcifront_claim_resource()
438 dev_info(&pdev->xdev->dev, "New device on " in pcifront_scan_bus()
462 dev_err(&pdev->xdev->dev, in pcifront_scan_root()
464 dev_err(&pdev->xdev->dev, in pcifront_scan_root()
471 dev_info(&pdev->xdev->dev, "Creating PCI Frontend Bus %04x:%02x\n", in pcifront_scan_root()
487 b = pci_scan_root_bus(&pdev->xdev->dev, bus, in pcifront_scan_root()
490 dev_err(&pdev->xdev->dev, in pcifront_scan_root()
530 dev_err(&pdev->xdev->dev, in pcifront_rescan_root()
532 dev_err(&pdev->xdev->dev, in pcifront_rescan_root()
538 dev_info(&pdev->xdev->dev, "Rescanning PCI Frontend Bus %04x:%02x\n", in pcifront_rescan_root()
573 dev_dbg(&pdev->xdev->dev, "cleaning up root buses\n"); in pcifront_free_roots()
603 dev_dbg(&pdev->xdev->dev, in pcifront_common_process()
610 dev_err(&pdev->xdev->dev, "device or AER driver is NULL\n"); in pcifront_common_process()
638 dev_err(&pdev->xdev->dev, in pcifront_common_process()
663 dev_dbg(&pdev->xdev->dev, in pcifront_do_aer()
696 dev_info(&pdev->xdev->dev, "Installing PCI frontend\n"); in pcifront_connect_and_init_dma()
706 dev_err(&pdev->xdev->dev, "Could not setup SWIOTLB!\n"); in pcifront_connect_and_init_dma()
716 dev_info(&pdev->xdev->dev, in pcifront_disconnect()
723 static struct pcifront_device *alloc_pdev(struct xenbus_device *xdev) in alloc_pdev() argument
743 dev_set_drvdata(&xdev->dev, pdev); in alloc_pdev()
744 pdev->xdev = xdev; in alloc_pdev()
756 dev_dbg(&xdev->dev, "Allocated pdev @ 0x%p pdev->sh_info @ 0x%p\n", in alloc_pdev()
764 dev_dbg(&pdev->xdev->dev, "freeing pdev @ 0x%p\n", pdev); in free_pdev()
774 xenbus_free_evtchn(pdev->xdev, pdev->evtchn); in free_pdev()
782 dev_set_drvdata(&pdev->xdev->dev, NULL); in free_pdev()
793 err = xenbus_grant_ring(pdev->xdev, pdev->sh_info, 1, &gref); in pcifront_publish_info()
799 err = xenbus_alloc_evtchn(pdev->xdev, &pdev->evtchn); in pcifront_publish_info()
814 xenbus_dev_fatal(pdev->xdev, err, in pcifront_publish_info()
820 err = xenbus_printf(trans, pdev->xdev->nodename, in pcifront_publish_info()
823 err = xenbus_printf(trans, pdev->xdev->nodename, in pcifront_publish_info()
826 err = xenbus_printf(trans, pdev->xdev->nodename, in pcifront_publish_info()
831 xenbus_dev_fatal(pdev->xdev, err, in pcifront_publish_info()
839 xenbus_dev_fatal(pdev->xdev, err, in pcifront_publish_info()
846 xenbus_switch_state(pdev->xdev, XenbusStateInitialised); in pcifront_publish_info()
848 dev_dbg(&pdev->xdev->dev, "publishing successful!\n"); in pcifront_publish_info()
863 if (xenbus_read_driver_state(pdev->xdev->nodename) != in pcifront_try_connect()
869 xenbus_dev_fatal(pdev->xdev, err, in pcifront_try_connect()
874 err = xenbus_scanf(XBT_NIL, pdev->xdev->otherend, in pcifront_try_connect()
877 xenbus_dev_error(pdev->xdev, err, in pcifront_try_connect()
881 xenbus_dev_fatal(pdev->xdev, err, in pcifront_try_connect()
889 xenbus_dev_fatal(pdev->xdev, err, in pcifront_try_connect()
901 err = xenbus_scanf(XBT_NIL, pdev->xdev->otherend, str, in pcifront_try_connect()
906 xenbus_dev_fatal(pdev->xdev, err, in pcifront_try_connect()
913 xenbus_dev_fatal(pdev->xdev, err, in pcifront_try_connect()
920 err = xenbus_switch_state(pdev->xdev, XenbusStateConnected); in pcifront_try_connect()
932 prev_state = xenbus_read_driver_state(pdev->xdev->nodename); in pcifront_try_disconnect()
942 err = xenbus_switch_state(pdev->xdev, XenbusStateClosed); in pcifront_try_disconnect()
956 if (xenbus_read_driver_state(pdev->xdev->nodename) != in pcifront_attach_devices()
960 err = xenbus_scanf(XBT_NIL, pdev->xdev->otherend, in pcifront_attach_devices()
963 xenbus_dev_error(pdev->xdev, err, in pcifront_attach_devices()
967 xenbus_dev_fatal(pdev->xdev, err, in pcifront_attach_devices()
975 xenbus_dev_fatal(pdev->xdev, err, in pcifront_attach_devices()
987 err = xenbus_scanf(XBT_NIL, pdev->xdev->otherend, str, in pcifront_attach_devices()
992 xenbus_dev_fatal(pdev->xdev, err, in pcifront_attach_devices()
999 xenbus_dev_fatal(pdev->xdev, err, in pcifront_attach_devices()
1006 xenbus_switch_state(pdev->xdev, XenbusStateConnected); in pcifront_attach_devices()
1020 if (xenbus_read_driver_state(pdev->xdev->nodename) != in pcifront_detach_devices()
1024 err = xenbus_scanf(XBT_NIL, pdev->xdev->otherend, "num_devs", "%d", in pcifront_detach_devices()
1029 xenbus_dev_fatal(pdev->xdev, err, in pcifront_detach_devices()
1042 state = xenbus_read_unsigned(pdev->xdev->otherend, str, in pcifront_detach_devices()
1054 err = xenbus_scanf(XBT_NIL, pdev->xdev->otherend, str, in pcifront_detach_devices()
1059 xenbus_dev_fatal(pdev->xdev, err, in pcifront_detach_devices()
1067 dev_dbg(&pdev->xdev->dev, in pcifront_detach_devices()
1077 dev_dbg(&pdev->xdev->dev, in pcifront_detach_devices()
1082 err = xenbus_switch_state(pdev->xdev, XenbusStateReconfiguring); in pcifront_detach_devices()
1088 static void __ref pcifront_backend_changed(struct xenbus_device *xdev, in pcifront_backend_changed() argument
1091 struct pcifront_device *pdev = dev_get_drvdata(&xdev->dev); in pcifront_backend_changed()
1105 if (xdev->state == XenbusStateClosed) in pcifront_backend_changed()
1109 dev_warn(&xdev->dev, "backend going away!\n"); in pcifront_backend_changed()
1123 static int pcifront_xenbus_probe(struct xenbus_device *xdev, in pcifront_xenbus_probe() argument
1127 struct pcifront_device *pdev = alloc_pdev(xdev); in pcifront_xenbus_probe()
1131 xenbus_dev_fatal(xdev, err, in pcifront_xenbus_probe()
1144 static int pcifront_xenbus_remove(struct xenbus_device *xdev) in pcifront_xenbus_remove() argument
1146 struct pcifront_device *pdev = dev_get_drvdata(&xdev->dev); in pcifront_xenbus_remove()