Commit d02443a1 authored by Quentin Genoud's avatar Quentin Genoud

add errno value in error debug print

parent d61ab1b3
Pipeline #5311 failed with stage
in 11 seconds
......@@ -306,8 +306,8 @@ int pcs_writel(struct hal_port_state *ps, uint16_t value, int reg)
ifr.ifr_data = (void *)&rv;
if (ioctl(halPorts.hal_port_fd, PRIV_IOCPHYREG, &ifr) < 0)
{
pr_error("%s: ioctl failed writing at register adress %d\n",
__func__,reg);
pr_error("%s: ioctl failed writing at register adress %d, errno = %d\n",
__func__,reg,errno);
return -1;
};
......@@ -322,6 +322,7 @@ int pcs_readl(struct hal_port_state * p, int reg, uint32_t *value)
*value = NIC_READ_PHY_CMD(reg);
ifr.ifr_data = (void *)value;
if (ioctl(halPorts.hal_port_fd, PRIV_IOCPHYREG, &ifr) < 0) {
pr_error("%s: ioctl failed reading register at address %d\n",
__func__, reg);
......@@ -341,6 +342,7 @@ static uint32_t ep_read(struct hal_port_state * p, int reg_addr, uint32_t *value
*value = reg_addr;
ifr.ifr_data = (void *) value;
pr_info("raw fd %d name %s\n", halPorts.hal_port_fd, ifr.ifr_name);
if (ioctl(halPorts.hal_port_fd, PRIV_IOCREADREG, &ifr) < 0) {
pr_error("%s: ioctl failed reading register at address %d\n", __func__,reg_addr);
return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment