mbox series

[v3,0/3] Add npcm7xx emc model

Message ID 20210209015541.778833-1-dje@google.com (mailing list archive)
Headers show
Series Add npcm7xx emc model | expand

Message

Doug Evans Feb. 9, 2021, 1:55 a.m. UTC
This is a 10/100 ethernet device that has several features.
Only the ones needed by the Linux driver have been implemented.
See npcm7xx_emc.c for a list of unimplemented features.

Doug Evans (3):
  hw/net: Add npcm7xx emc model
  hw/arm: Add npcm7xx emc model
  tests/qtests: Add npcm7xx emc model test

 docs/system/arm/nuvoton.rst    |   3 +-
 hw/arm/npcm7xx.c               |  50 +-
 hw/net/meson.build             |   1 +
 hw/net/npcm7xx_emc.c           | 857 +++++++++++++++++++++++++++++++++
 hw/net/trace-events            |  17 +
 include/hw/arm/npcm7xx.h       |   2 +
 include/hw/net/npcm7xx_emc.h   | 286 +++++++++++
 tests/qtest/meson.build        |   1 +
 tests/qtest/npcm7xx_emc-test.c | 812 +++++++++++++++++++++++++++++++
 9 files changed, 2026 insertions(+), 3 deletions(-)
 create mode 100644 hw/net/npcm7xx_emc.c
 create mode 100644 include/hw/net/npcm7xx_emc.h
 create mode 100644 tests/qtest/npcm7xx_emc-test.c

Comments

Peter Maydell Feb. 11, 2021, 11:34 a.m. UTC | #1
On Tue, 9 Feb 2021 at 01:55, Doug Evans <dje@google.com> wrote:
>
> This is a 10/100 ethernet device that has several features.
> Only the ones needed by the Linux driver have been implemented.
> See npcm7xx_emc.c for a list of unimplemented features.
>
> Doug Evans (3):
>   hw/net: Add npcm7xx emc model
>   hw/arm: Add npcm7xx emc model
>   tests/qtests: Add npcm7xx emc model test
>



Applied to target-arm.next, thanks.

-- PMM
Peter Maydell Feb. 11, 2021, 7:47 p.m. UTC | #2
On Thu, 11 Feb 2021 at 11:34, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Tue, 9 Feb 2021 at 01:55, Doug Evans <dje@google.com> wrote:
> >
> > This is a 10/100 ethernet device that has several features.
> > Only the ones needed by the Linux driver have been implemented.
> > See npcm7xx_emc.c for a list of unimplemented features.
> >
> > Doug Evans (3):
> >   hw/net: Add npcm7xx emc model
> >   hw/arm: Add npcm7xx emc model
> >   tests/qtests: Add npcm7xx emc model test
> >
>
>
>
> Applied to target-arm.next, thanks.

Dropped again; the new tests fail on big-endian hosts (s390x, ppc64):

MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}
QTEST_QEMU_IMG=./qemu-img
G_TEST_DBUS_DAEMON=/home/ubuntu/qemu/tests/dbus-vmstate-daemon.sh
QTEST_QEMU_BINARY=./qemu-system-arm tests/qtest/npcm7xx_emc-test --tap
-k
PASS 1 qtest-arm/npcm7xx_emc-test /arm/npcm7xx_emc/emc[0]/init
**
ERROR:../../tests/qtest/npcm7xx_emc-test.c:476:emc_send_verify1:
assertion failed ((result_desc.status_and_length & expected_mask) ==
expected_value): (0x00000000 == 0x00080000)
ERROR qtest-arm/npcm7xx_emc-test - Bail out!
ERROR:../../tests/qtest/npcm7xx_emc-test.c:476:emc_send_verify1:
assertion failed ((result_desc.status_and_length & expected_mask) ==
expected_value): (0x00000000 == 0x00080000)

-- PMM
Doug Evans Feb. 13, 2021, 12:33 a.m. UTC | #3
On Thu, Feb 11, 2021 at 11:48 AM Peter Maydell <peter.maydell@linaro.org>
wrote:

> On Thu, 11 Feb 2021 at 11:34, Peter Maydell <peter.maydell@linaro.org>
> wrote:
> >
> > On Tue, 9 Feb 2021 at 01:55, Doug Evans <dje@google.com> wrote:
> > >
> > > This is a 10/100 ethernet device that has several features.
> > > Only the ones needed by the Linux driver have been implemented.
> > > See npcm7xx_emc.c for a list of unimplemented features.
> > >
> > > Doug Evans (3):
> > >   hw/net: Add npcm7xx emc model
> > >   hw/arm: Add npcm7xx emc model
> > >   tests/qtests: Add npcm7xx emc model test
> > >
> >
> >
> >
> > Applied to target-arm.next, thanks.
>
> Dropped again; the new tests fail on big-endian hosts (s390x, ppc64):
>
> MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}
> QTEST_QEMU_IMG=./qemu-img
> G_TEST_DBUS_DAEMON=/home/ubuntu/qemu/tests/dbus-vmstate-daemon.sh
> QTEST_QEMU_BINARY=./qemu-system-arm tests/qtest/npcm7xx_emc-test --tap
> -k
> PASS 1 qtest-arm/npcm7xx_emc-test /arm/npcm7xx_emc/emc[0]/init
> **
> ERROR:../../tests/qtest/npcm7xx_emc-test.c:476:emc_send_verify1:
> assertion failed ((result_desc.status_and_length & expected_mask) ==
> expected_value): (0x00000000 == 0x00080000)
> ERROR qtest-arm/npcm7xx_emc-test - Bail out!
> ERROR:../../tests/qtest/npcm7xx_emc-test.c:476:emc_send_verify1:
> assertion failed ((result_desc.status_and_length & expected_mask) ==
> expected_value): (0x00000000 == 0x00080000)
>


Fixed in V4:
https://lists.nongnu.org/archive/html/qemu-devel/2021-02/msg04529.html