Lines Matching defs:pdev
5602 struct pci_dev *pdev = adv_dvc_to_pdev(asc_dvc);
5613 if (PCI_FUNC(pdev->devfn) == 0) {
9145 static int AscInitSetConfig(struct pci_dev *pdev, struct Scsi_Host *shost)
9181 if ((pdev->device == PCI_DEVICE_ID_ASP_1200A) ||
9182 (pdev->device == PCI_DEVICE_ID_ASP_ABP940)) {
10324 struct pci_dev *pdev = adv_dvc_to_pdev(asc_dvc);
10333 if (PCI_FUNC(pdev->devfn) != 0) {
10525 static int AdvInitGetConfig(struct pci_dev *pdev, struct Scsi_Host *shost)
10543 pci_read_config_word(pdev, PCI_COMMAND, &cmd);
10719 struct pci_dev *pdev;
10725 pdev = (bus_type == ASC_IS_PCI) ? to_pci_dev(boardp->dev) : NULL;
10739 if (pdev->device == PCI_DEVICE_ID_ASP_ABP940UW) {
10742 } else if (pdev->device == PCI_DEVICE_ID_38C0800_REV1) {
10750 boardp->asc_n_io_port = pci_resource_len(pdev, 1);
10751 boardp->ioremap_addr = pci_ioremap_bar(pdev, 1);
10755 (long)pci_resource_start(pdev, 1),
10818 ret = AdvInitGetConfig(pdev, shost) ? -ENODEV : 0;
10869 ret = AscInitSetConfig(pdev, shost) ? -ENODEV : 0;
11429 static void advansys_set_latency(struct pci_dev *pdev)
11431 if ((pdev->device == PCI_DEVICE_ID_ASP_1200A) ||
11432 (pdev->device == PCI_DEVICE_ID_ASP_ABP940)) {
11433 pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0);
11436 pci_read_config_byte(pdev, PCI_LATENCY_TIMER, &latency);
11438 pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0x20);
11442 static int advansys_pci_probe(struct pci_dev *pdev,
11449 err = pci_enable_device(pdev);
11452 err = pci_request_regions(pdev, DRV_NAME);
11455 pci_set_master(pdev);
11456 advansys_set_latency(pdev);
11459 if (pci_resource_len(pdev, 0) == 0)
11462 ioport = pci_resource_start(pdev, 0);
11470 board->irq = pdev->irq;
11471 board->dev = &pdev->dev;
11474 if (pdev->device == PCI_DEVICE_ID_ASP_ABP940UW ||
11475 pdev->device == PCI_DEVICE_ID_38C0800_REV1 ||
11476 pdev->device == PCI_DEVICE_ID_38C1600_REV1) {
11484 pci_set_drvdata(pdev, shost);
11490 pci_release_regions(pdev);
11492 pci_disable_device(pdev);
11497 static void advansys_pci_remove(struct pci_dev *pdev)
11499 advansys_release(pci_get_drvdata(pdev));
11500 pci_release_regions(pdev);
11501 pci_disable_device(pdev);