File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -257,19 +257,30 @@ static bool check_link_active(struct controller *ctrl)
257
257
return ret ;
258
258
}
259
259
260
- static void pcie_wait_link_active (struct controller * ctrl )
260
+ static void __pcie_wait_link_active (struct controller * ctrl , bool active )
261
261
{
262
262
int timeout = 1000 ;
263
263
264
- if (check_link_active (ctrl ))
264
+ if (check_link_active (ctrl ) == active )
265
265
return ;
266
266
while (timeout > 0 ) {
267
267
msleep (10 );
268
268
timeout -= 10 ;
269
- if (check_link_active (ctrl ))
269
+ if (check_link_active (ctrl ) == active )
270
270
return ;
271
271
}
272
- ctrl_dbg (ctrl , "Data Link Layer Link Active not set in 1000 msec\n" );
272
+ ctrl_dbg (ctrl , "Data Link Layer Link Active not %s in 1000 msec\n" ,
273
+ active ? "set" : "cleared" );
274
+ }
275
+
276
+ static void pcie_wait_link_active (struct controller * ctrl )
277
+ {
278
+ __pcie_wait_link_active (ctrl , true);
279
+ }
280
+
281
+ static void pcie_wait_link_not_active (struct controller * ctrl )
282
+ {
283
+ __pcie_wait_link_active (ctrl , false);
273
284
}
274
285
275
286
static bool pci_bus_check_dev (struct pci_bus * bus , int devfn )
You can’t perform that action at this time.
0 commit comments