/*-
* BSD LICENSE
*
- * Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
+ * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* or uio:uioX */
rte_snprintf(dirname, sizeof(dirname),
- "/sys/bus/pci/devices/" PCI_PRI_FMT "/uio",
+ SYSFS_PCI_DEVICES "/" PCI_PRI_FMT "/uio",
loc->domain, loc->bus, loc->devid, loc->function);
dir = opendir(dirname);
if (dir == NULL) {
/* retry with the parent directory */
rte_snprintf(dirname, sizeof(dirname),
- "/sys/bus/pci/devices/" PCI_PRI_FMT,
+ SYSFS_PCI_DEVICES "/" PCI_PRI_FMT,
loc->domain, loc->bus, loc->devid, loc->function);
dir = opendir(dirname);
return -1;
#endif
- /* We always should have BAR0 mapped */
- if (rte_eal_process_type() == RTE_PROC_PRIMARY &&
- dev->mem_resource[0].addr == NULL) {
- RTE_LOG(ERR, EAL,
- "%s(): BAR0 is not mapped\n",
- __func__);
- return (-1);
- }
-
/* reference driver structure */
dev->driver = dr;