On Fri, 25 Apr 2025 at 23:37, Djordje Todorovic
<djordje.todoro...@htecgroup.com> wrote:
>
> Add a network device e1000e to the boston-aia board model.
> There is no pch_gbe emulation, so we add e1000e in slot 0 func 1,
> instead. We need to pass func to call pci_parse_devaddr to find
> out slot and func.
>
> Signed-off-by: Chao-ying Fu <c...@mips.com>
> Signed-off-by: Djordje Todorovic <djordje.todoro...@htecgroup.com>
> ---
>  hw/pci/pci.c          | 23 ++++++++++++-----------
>  hw/riscv/boston-aia.c |  5 +++++
>  2 files changed, 17 insertions(+), 11 deletions(-)
>
> diff --git a/hw/pci/pci.c b/hw/pci/pci.c
> index 2844ec5556..9748acda09 100644
> --- a/hw/pci/pci.c
> +++ b/hw/pci/pci.c
> @@ -980,16 +980,15 @@ static int pci_parse_devaddr(const char *addr, int 
> *domp, int *busp,
>
>      slot = val;
>
> -    if (funcp != NULL) {
> -        if (*e != '.')
> -            return -1;
> -
> -        p = e + 1;
> -        val = strtoul(p, &e, 16);
> -        if (e == p)
> -            return -1;
> +    if (funcp != NULL && *e != 0) {
> +      if (*e != '.')
> +        return -1;
> +      p = e + 1;
> +      val = strtoul(p, &e, 16);
> +      if (e == p)
> +        return -1;
>
> -        func = val;
> +      func = val;

Some unrelated changes have crept into your patch.

When you re-send be sure to cc qemu-ri...@nongnu.org.

Reply via email to