Lines Matching defs:pdev
5651 struct pci_dev *pdev = adv_dvc_to_pdev(asc_dvc);
5662 if (PCI_FUNC(pdev->devfn) == 0) {
9318 static int AscInitSetConfig(struct pci_dev *pdev, struct Scsi_Host *shost)
9354 if ((pdev->device == PCI_DEVICE_ID_ASP_1200A) ||
9355 (pdev->device == PCI_DEVICE_ID_ASP_ABP940)) {
10509 struct pci_dev *pdev = adv_dvc_to_pdev(asc_dvc);
10518 if (PCI_FUNC(pdev->devfn) != 0) {
10710 static int AdvInitGetConfig(struct pci_dev *pdev, struct Scsi_Host *shost)
10728 pci_read_config_word(pdev, PCI_COMMAND, &cmd);
10909 struct pci_dev *pdev;
10915 pdev = (bus_type == ASC_IS_PCI) ? to_pci_dev(boardp->dev) : NULL;
10929 if (pdev->device == PCI_DEVICE_ID_ASP_ABP940UW) {
10932 } else if (pdev->device == PCI_DEVICE_ID_38C0800_REV1) {
10940 boardp->asc_n_io_port = pci_resource_len(pdev, 1);
10941 boardp->ioremap_addr = pci_ioremap_bar(pdev, 1);
10945 (long)pci_resource_start(pdev, 1),
11017 ret = AdvInitGetConfig(pdev, shost) ? -ENODEV : 0;
11068 ret = AscInitSetConfig(pdev, shost) ? -ENODEV : 0;
11721 static void advansys_set_latency(struct pci_dev *pdev)
11723 if ((pdev->device == PCI_DEVICE_ID_ASP_1200A) ||
11724 (pdev->device == PCI_DEVICE_ID_ASP_ABP940)) {
11725 pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0);
11728 pci_read_config_byte(pdev, PCI_LATENCY_TIMER, &latency);
11730 pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0x20);
11734 static int advansys_pci_probe(struct pci_dev *pdev,
11741 err = pci_enable_device(pdev);
11744 err = pci_request_regions(pdev, DRV_NAME);
11747 pci_set_master(pdev);
11748 advansys_set_latency(pdev);
11751 if (pci_resource_len(pdev, 0) == 0)
11754 ioport = pci_resource_start(pdev, 0);
11762 board->irq = pdev->irq;
11763 board->dev = &pdev->dev;
11766 if (pdev->device == PCI_DEVICE_ID_ASP_ABP940UW ||
11767 pdev->device == PCI_DEVICE_ID_38C0800_REV1 ||
11768 pdev->device == PCI_DEVICE_ID_38C1600_REV1) {
11776 pci_set_drvdata(pdev, shost);
11782 pci_release_regions(pdev);
11784 pci_disable_device(pdev);
11789 static void advansys_pci_remove(struct pci_dev *pdev)
11791 advansys_release(pci_get_drvdata(pdev));
11792 pci_release_regions(pdev);
11793 pci_disable_device(pdev);