File tree Expand file tree Collapse file tree 2 files changed +3
-13
lines changed
arch/powerpc/platforms/powernv Expand file tree Collapse file tree 2 files changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,8 @@ static int get_max_afu_index(struct pci_dev *dev, int *afu_idx)
107
107
int pos ;
108
108
u32 val ;
109
109
110
- pos = find_dvsec_from_pos (dev , OCXL_DVSEC_FUNC_ID , 0 );
110
+ pos = pci_find_dvsec_capability (dev , PCI_VENDOR_ID_IBM ,
111
+ OCXL_DVSEC_FUNC_ID );
111
112
if (!pos )
112
113
return - ESRCH ;
113
114
Original file line number Diff line number Diff line change 33
33
34
34
static int find_dvsec (struct pci_dev * dev , int dvsec_id )
35
35
{
36
- int vsec = 0 ;
37
- u16 vendor , id ;
38
-
39
- while ((vsec = pci_find_next_ext_capability (dev , vsec ,
40
- OCXL_EXT_CAP_ID_DVSEC ))) {
41
- pci_read_config_word (dev , vsec + OCXL_DVSEC_VENDOR_OFFSET ,
42
- & vendor );
43
- pci_read_config_word (dev , vsec + OCXL_DVSEC_ID_OFFSET , & id );
44
- if (vendor == PCI_VENDOR_ID_IBM && id == dvsec_id )
45
- return vsec ;
46
- }
47
- return 0 ;
36
+ return pci_find_dvsec_capability (dev , PCI_VENDOR_ID_IBM , dvsec_id );
48
37
}
49
38
50
39
static int find_dvsec_afu_ctrl (struct pci_dev * dev , u8 afu_idx )
You can’t perform that action at this time.
0 commit comments