Lines Matching refs:pdev
46 static pci_ers_result_t jsm_io_error_detected(struct pci_dev *pdev,
48 static pci_ers_result_t jsm_io_slot_reset(struct pci_dev *pdev);
49 static void jsm_io_resume(struct pci_dev *pdev);
61 static int jsm_probe_one(struct pci_dev *pdev, const struct pci_device_id *ent) in jsm_probe_one() argument
67 rc = pci_enable_device(pdev); in jsm_probe_one()
69 dev_err(&pdev->dev, "Device enable FAILED\n"); in jsm_probe_one()
73 rc = pci_request_regions(pdev, "jsm"); in jsm_probe_one()
75 dev_err(&pdev->dev, "pci_request_region FAILED\n"); in jsm_probe_one()
87 brd->pci_dev = pdev; in jsm_probe_one()
89 switch (pdev->device) { in jsm_probe_one()
123 brd->rev = pdev->revision; in jsm_probe_one()
125 brd->irq = pdev->irq; in jsm_probe_one()
127 switch (pdev->device) { in jsm_probe_one()
147 brd->membase = pci_resource_start(pdev, 4); in jsm_probe_one()
148 brd->membase_end = pci_resource_end(pdev, 4); in jsm_probe_one()
155 brd->iobase = pci_resource_start(pdev, 1); in jsm_probe_one()
156 brd->iobase_end = pci_resource_end(pdev, 1); in jsm_probe_one()
166 pci_resource_len(pdev, 4)); in jsm_probe_one()
168 dev_err(&pdev->dev, in jsm_probe_one()
199 brd->membase = pci_resource_start(pdev, 0); in jsm_probe_one()
200 brd->membase_end = pci_resource_end(pdev, 0); in jsm_probe_one()
214 pci_resource_len(pdev, 0)); in jsm_probe_one()
216 dev_err(&pdev->dev, in jsm_probe_one()
229 dev_warn(&pdev->dev, "Failed to hook IRQ %d\n", brd->irq); in jsm_probe_one()
235 dev_err(&pdev->dev, "Can't init tty devices (%d)\n", rc); in jsm_probe_one()
243 dev_err(&pdev->dev, "Can't init uart port (%d)\n", rc); in jsm_probe_one()
249 dev_info(&pdev->dev, "board %d: Digi Classic/Neo (rev %d), irq %d\n", in jsm_probe_one()
252 pci_set_drvdata(pdev, brd); in jsm_probe_one()
253 pci_save_state(pdev); in jsm_probe_one()
264 pci_release_regions(pdev); in jsm_probe_one()
266 pci_disable_device(pdev); in jsm_probe_one()
271 static void jsm_remove_one(struct pci_dev *pdev) in jsm_remove_one() argument
273 struct jsm_board *brd = pci_get_drvdata(pdev); in jsm_remove_one()
276 switch (pdev->device) { in jsm_remove_one()
302 pci_release_regions(pdev); in jsm_remove_one()
303 pci_disable_device(pdev); in jsm_remove_one()
338 static pci_ers_result_t jsm_io_error_detected(struct pci_dev *pdev, in jsm_io_error_detected() argument
341 struct jsm_board *brd = pci_get_drvdata(pdev); in jsm_io_error_detected()
348 static pci_ers_result_t jsm_io_slot_reset(struct pci_dev *pdev) in jsm_io_slot_reset() argument
352 rc = pci_enable_device(pdev); in jsm_io_slot_reset()
357 pci_set_master(pdev); in jsm_io_slot_reset()
362 static void jsm_io_resume(struct pci_dev *pdev) in jsm_io_resume() argument
364 struct jsm_board *brd = pci_get_drvdata(pdev); in jsm_io_resume()
366 pci_restore_state(pdev); in jsm_io_resume()
367 pci_save_state(pdev); in jsm_io_resume()