mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
tools/ctrl: Silence missing GSI in xc_pcidev_get_gsi()
It is valid for a PCI device to not have a legacy IRQ. In that case, do not print an error to keep the logs clean. This relies on pciback being updated to return -ENOENT for a missing GSI. Fixes:b93e5981d2("tools: Add new function to get gsi from dev") Signed-off-by: Jason Andryuk <jason.andryuk@amd.com> Reviewed-by: Anthony PERARD <anthony.perard@vates.tech> master commit:8808f45305master date: 2025-03-13 10:23:42 +0100
This commit is contained in:
1 parent
94928e415f
commit
1ddf72bbdf
1 file changed
+8
-3
@@ -77,9 +77,14 @@ int xc_pcidev_get_gsi(xc_interface *xch, uint32_t sbdf)
|
||||
ret = ioctl(xencall_fd(xch->xcall),
|
||||
IOCTL_PRIVCMD_PCIDEV_GET_GSI, &dev_gsi);
|
||||
|
||||
if (ret < 0) {
|
||||
PERROR("Failed to get gsi from dev");
|
||||
} else {
|
||||
if ( ret < 0 )
|
||||
{
|
||||
if ( errno != ENOENT )
|
||||
PERROR("Failed to get gsi for dev %04x:%02x:%02x.%u",
|
||||
sbdf >> 16, (sbdf >> 8) & 0xff, sbdf >> 3 & 0x1f, sbdf & 0x7);
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = dev_gsi.gsi;
|
||||
}
|
||||
|
||||
|
||||