Remove unnecessary patch in pf-bb-config
The patch that checks for enable flag of the PCI device was re-added back in the commit https://review.opendev.org/c/starlingx/integ/+/865422, namely "Reject-device-configuration-if-not-enabled". This patch is no longer necessary as it causes failure in configuring the ACC200 device. This commit removes that patch. Test Plan: Pass: Test host unlock with ACC100, ACC200 and N3000 devices. Closes-Bug: 1999449 Signed-off-by: Teresa Ho <teresa.ho@windriver.com> Change-Id: I5364c43d88d130948f55f2f60b1bb2b5f6f6ba77
This commit is contained in:
parent
d22670c1fe
commit
f4b37fb831
@ -1,50 +0,0 @@
|
|||||||
From a12967eba299f63f3abe5a906765d5beb16db81c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andre Kantek <andrefernandozanella.kantek@windriver.com>
|
|
||||||
Date: Wed, 23 Nov 2022 08:27:52 -0300
|
|
||||||
Subject: [PATCH] Reject device configuration if not enabled
|
|
||||||
|
|
||||||
Check if device is enabled in the return logic of get_device_id()
|
|
||||||
|
|
||||||
Signed-off-by: Andre Kantek <andrefernandozanella.kantek@windriver.com>
|
|
||||||
---
|
|
||||||
config_app.c | 10 +++++++++-
|
|
||||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/config_app.c b/config_app.c
|
|
||||||
index 6acd8f1..4f72764 100644
|
|
||||||
--- a/config_app.c
|
|
||||||
+++ b/config_app.c
|
|
||||||
@@ -85,6 +85,7 @@ static bool
|
|
||||||
get_device_id(hw_device *device, const char *location)
|
|
||||||
{
|
|
||||||
unsigned long vendor_id = -1, device_id = -1;
|
|
||||||
+ unsigned int device_enabled = 0;
|
|
||||||
struct dirent *dirent;
|
|
||||||
DIR *dir;
|
|
||||||
char pci_path[PATH_MAX];
|
|
||||||
@@ -112,6 +113,12 @@ get_device_id(hw_device *device, const char *location)
|
|
||||||
if (snprintf_ret < 0)
|
|
||||||
LOG(ERR, "Failed to format PCI path");
|
|
||||||
|
|
||||||
+ /* Is device enabled? */
|
|
||||||
+ if (strncmp(dirent->d_name, "enable",
|
|
||||||
+ strlen(dirent->d_name)) == 0 &&
|
|
||||||
+ dirent->d_type == DT_REG)
|
|
||||||
+ device_enabled = get_file_val(file_path);
|
|
||||||
+
|
|
||||||
/* Get Device ID */
|
|
||||||
if (strncmp(dirent->d_name, DEVICE_FILE,
|
|
||||||
strlen(dirent->d_name)) == 0 &&
|
|
||||||
@@ -127,7 +134,8 @@ get_device_id(hw_device *device, const char *location)
|
|
||||||
|
|
||||||
closedir(dir);
|
|
||||||
/* Check if device is found */
|
|
||||||
- return (vendor_id == device->vendor_id &&
|
|
||||||
+ return (device_enabled &&
|
|
||||||
+ vendor_id == device->vendor_id &&
|
|
||||||
device_id == device->device_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
@ -1,2 +1 @@
|
|||||||
0001-Reject-device-configuration-if-not-enabled.patch
|
0001-Fix-check-return-of-configure_device.patch
|
||||||
0002-Fix-check-return-of-configure_device.patch
|
|
||||||
|
Loading…
Reference in New Issue
Block a user