Lines Matching defs:pdev

643 			tmp_v = dma_alloc_coherent(&nic->pdev->dev, PAGE_SIZE,
661 tmp_v = dma_alloc_coherent(&nic->pdev->dev,
738 tmp_v_addr = dma_alloc_coherent(&nic->pdev->dev, size,
839 dma_alloc_coherent(&nic->pdev->dev, size,
857 dev_name(&nic->pdev->dev), (unsigned long long)tmp_p_addr);
910 dma_free_coherent(&nic->pdev->dev, PAGE_SIZE,
919 dma_free_coherent(&nic->pdev->dev, PAGE_SIZE,
943 dma_free_coherent(&nic->pdev->dev, size, tmp_v_addr,
997 dma_free_coherent(&nic->pdev->dev, mac_control->stats_mem_sz,
1057 if (s2io_on_nec_bridge(nic->pdev)) {
1321 if ((nic->device_type == XFRAME_I_DEVICE) && (nic->pdev->revision < 4))
2084 if ((!herc && (sp->pdev->revision >= 4)) || herc) {
2092 if ((!herc && (sp->pdev->revision >= 4)) || herc) {
2301 subid = nic->pdev->subsystem_device;
2329 dma_unmap_single(&nic->pdev->dev,
2340 dma_unmap_single(&nic->pdev->dev, (dma_addr_t)txds->Buffer_Pointer,
2349 dma_unmap_page(&nic->pdev->dev,
2536 dma_map_single(&ring->pdev->dev, skb->data,
2539 if (dma_mapping_error(&nic->pdev->dev, rxdp1->Buffer0_ptr))
2571 dma_map_single(&ring->pdev->dev,
2574 if (dma_mapping_error(&nic->pdev->dev, rxdp3->Buffer0_ptr))
2577 dma_sync_single_for_device(&ring->pdev->dev,
2590 rxdp3->Buffer2_ptr = dma_map_single(&ring->pdev->dev,
2595 if (dma_mapping_error(&nic->pdev->dev, rxdp3->Buffer2_ptr))
2600 dma_map_single(&ring->pdev->dev,
2605 if (dma_mapping_error(&nic->pdev->dev,
2607 dma_unmap_single(&ring->pdev->dev,
2680 dma_unmap_single(&sp->pdev->dev,
2689 dma_unmap_single(&sp->pdev->dev,
2692 dma_unmap_single(&sp->pdev->dev,
2695 dma_unmap_single(&sp->pdev->dev,
2833 const int irq = nic->pdev->irq;
2840 if (pci_channel_offline(nic->pdev))
2928 dma_unmap_single(&ring_data->pdev->dev,
2937 dma_sync_single_for_cpu(&ring_data->pdev->dev,
2940 dma_unmap_single(&ring_data->pdev->dev,
3413 __func__, pci_name(sp->pdev));
3416 pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(pci_cmd));
3426 pci_restore_state(sp->pdev);
3427 pci_save_state(sp->pdev);
3428 pci_read_config_word(sp->pdev, 0x2, &val16);
3437 pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, pci_cmd);
3453 pci_write_config_word(sp->pdev, PCI_STATUS, 0x8000);
3456 pci_write_config_dword(sp->pdev, 0x68, 0x7C);
3491 subid = sp->pdev->subsystem_device;
3782 ret = pci_enable_msix_range(nic->pdev, nic->entries,
3802 pci_read_config_word(nic->pdev, 0x42, &msi_control);
3804 pci_write_config_word(nic->pdev, 0x42, msi_control);
3823 struct pci_dev *pdev = sp->pdev;
3832 sp->dev->name, pci_name(pdev), pdev->irq);
3851 sp->dev->name, pci_name(pdev));
3881 pci_read_config_word(sp->pdev, 0x42, &msi_control);
3883 pci_write_config_word(sp->pdev, 0x42, msi_control);
3885 pci_disable_msix(sp->pdev);
3890 free_irq(sp->pdev->irq, sp->dev);
4129 txdp->Buffer_Pointer = dma_map_single(&sp->pdev->dev, skb->data,
4131 if (dma_mapping_error(&sp->pdev->dev, txdp->Buffer_Pointer))
4145 txdp->Buffer_Pointer = (u64)skb_frag_dma_map(&sp->pdev->dev,
4374 if (pci_channel_offline(sp->pdev))
4673 if (pci_channel_offline(sp->pdev))
5346 strscpy(info->bus_info, pci_name(sp->pdev), sizeof(info->bus_info));
5371 regs->version = sp->pdev->subsystem_device;
5385 u16 subid = sp->pdev->subsystem_device;
5426 u16 subid = sp->pdev->subsystem_device;
5701 pci_write_config_byte(nic->pdev, (vpd_addr + 2), i);
5702 pci_read_config_byte(nic->pdev, (vpd_addr + 2), &data);
5703 pci_write_config_byte(nic->pdev, (vpd_addr + 3), 0);
5706 pci_read_config_byte(nic->pdev, (vpd_addr + 3), &data);
5715 pci_read_config_dword(nic->pdev, (vpd_addr + 4),
5767 eeprom->magic = sp->pdev->vendor | (sp->pdev->device << 16);
5804 if (eeprom->magic != (sp->pdev->vendor | (sp->pdev->device << 16))) {
5808 (sp->pdev->vendor | (sp->pdev->device << 16)),
6020 pci_read_config_byte(sp->pdev, PCI_BIST, &bist);
6022 pci_write_config_word(sp->pdev, PCI_BIST, bist);
6025 pci_read_config_byte(sp->pdev, PCI_BIST, &bist);
6685 subid = nic->pdev->subsystem_device;
6777 dma_map_single(&sp->pdev->dev, (*skb)->data,
6780 if (dma_mapping_error(&sp->pdev->dev, rxdp1->Buffer0_ptr))
6803 dma_map_single(&sp->pdev->dev, (*skb)->data,
6805 if (dma_mapping_error(&sp->pdev->dev, rxdp3->Buffer2_ptr))
6808 dma_map_single(&sp->pdev->dev, ba->ba_0,
6810 if (dma_mapping_error(&sp->pdev->dev, rxdp3->Buffer0_ptr)) {
6811 dma_unmap_single(&sp->pdev->dev,
6821 dma_map_single(&sp->pdev->dev, ba->ba_1,
6823 if (dma_mapping_error(&sp->pdev->dev, rxdp3->Buffer1_ptr)) {
6824 dma_unmap_single(&sp->pdev->dev,
6827 dma_unmap_single(&sp->pdev->dev,
6991 err = request_irq(sp->pdev->irq, s2io_isr, IRQF_SHARED,
7506 pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER,
7508 pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER,
7510 pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER,
7514 pci_read_config_word(sp->pdev, PCI_COMMAND, &pci_cmd);
7515 pci_write_config_word(sp->pdev, PCI_COMMAND,
7517 pci_read_config_word(sp->pdev, PCI_COMMAND, &pci_cmd);
7520 static int s2io_verify_parm(struct pci_dev *pdev, u8 *dev_intr_type,
7571 ((pdev->device != PCI_DEVICE_ID_HERC_WIN) &&
7572 (pdev->device != PCI_DEVICE_ID_HERC_UNI))) {
7646 * @pdev : structure containing the PCI related information of the device.
7659 s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
7674 ret = s2io_verify_parm(pdev, &dev_intr_type, &dev_multiq);
7678 ret = pci_enable_device(pdev);
7685 if (!dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64))) {
7688 pci_disable_device(pdev);
7691 ret = pci_request_regions(pdev, s2io_driver_name);
7695 pci_disable_device(pdev);
7703 pci_disable_device(pdev);
7704 pci_release_regions(pdev);
7708 pci_set_master(pdev);
7709 pci_set_drvdata(pdev, dev);
7710 SET_NETDEV_DEV(dev, &pdev->dev);
7715 sp->pdev = pdev;
7724 if ((pdev->device == PCI_DEVICE_ID_HERC_WIN) ||
7725 (pdev->device == PCI_DEVICE_ID_HERC_UNI))
7811 ring->pdev = sp->pdev;
7835 sp->bar0 = pci_ioremap_bar(pdev, 0);
7843 sp->bar1 = pci_ioremap_bar(pdev, 2);
7869 pci_save_state(sp->pdev);
7998 subid = sp->pdev->subsystem_device;
8018 sp->product_name, pdev->revision);
8121 pci_disable_device(pdev);
8122 pci_release_regions(pdev);
8130 * @pdev: structure containing the PCI related information of the device.
8137 static void s2io_rem_nic(struct pci_dev *pdev)
8139 struct net_device *dev = pci_get_drvdata(pdev);
8157 pci_release_regions(pdev);
8159 pci_disable_device(pdev);
8494 * @pdev: Pointer to PCI device
8500 static pci_ers_result_t s2io_io_error_detected(struct pci_dev *pdev,
8503 struct net_device *netdev = pci_get_drvdata(pdev);
8515 pci_disable_device(pdev);
8522 * @pdev: Pointer to PCI device
8529 static pci_ers_result_t s2io_io_slot_reset(struct pci_dev *pdev)
8531 struct net_device *netdev = pci_get_drvdata(pdev);
8534 if (pci_enable_device(pdev)) {
8539 pci_set_master(pdev);
8547 * @pdev: Pointer to PCI device
8552 static void s2io_io_resume(struct pci_dev *pdev)
8554 struct net_device *netdev = pci_get_drvdata(pdev);