On Tue, 18 Feb 2020, Aleksandar Markovic wrote:
> On Wednesday, January 29, 2020, Finn Thain
> wrote:
>
> > Hi All,
> >
> > There are bugs in the emulated dp8393x device that can stop packet
> > reception in a Linux/m68k guest (q800 machine).
> >
> &
The in_use field is no different to the other words handled using
dp8393x_put() and dp8393x_get(). Use the same technique for in_use
that is used everywhere else.
Signed-off-by: Finn Thain
---
Laurent tells me that this clean-up has been tried before. He referred
me to commit c744cf7879
Follow the algorithm given in the National Semiconductor DP83932C
datasheet in sections 3.4.5 and 3.4.6.
Signed-off-by: Finn Thain
---
hw/net/dp8393x.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
index 462f8646e0..49d7d9769e
If the chip used QEMU's algorithm it would need an extra word-sized
register just to recheck the EOL bit, which would be a waste of silicon.
Do it the way the chip would do it. No functional change.
Signed-off-by: Finn Thain
---
hw/net/dp8393x.c | 3 ++-
1 file changed, 2 insertions(
only been tested with Linux/m68k guests. It needs further
testing with MIPS Jazz guests such as NetBSD or Windows NT.
Thanks.
Finn Thain (10):
dp8393x: Mask EOL bit from descriptor addresses
dp8393x: Clean up endianness hacks
dp8393x: Have dp8393x_receive() return the packet size
dp8393x
This function re-uses its 'size' argument as a scratch variable.
Instead, declare a local 'size' variable for that purpose so that the
function result doesn't get messed up.
Signed-off-by: Finn Thain
---
hw/net/dp8393x.c | 9 +
1 file changed, 5 insertions(+), 4
. Fix this.
Signed-off-by: Finn Thain
---
hw/net/dp8393x.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
index 8e66b1f5de..9f4162c98c 100644
--- a/hw/net/dp8393x.c
+++ b/hw/net/dp8393x.c
@@ -810,6 +810,7 @@ static ssize_t dp8393x_receive(NetClientStat
It doesn't make sense to clear the command register bit unless the
command was actually issued.
Signed-off-by: Finn Thain
---
hw/net/dp8393x.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
index 494deb42bf..3fdc6cc6f9 100644
Restore the receive buffer state when the SONIC runs out of receive
descriptors. Otherwise it may write the next packet past the end of the
buffer and corrupt guest memory. This implements behaviour described
in section 3.4.6.2 in the datasheet.
Signed-off-by: Finn Thain
---
hw/net/dp8393x.c
e RBE interrupt until it receives another packet. But that won't
happen if can_receive returns false. So the SONIC becomes deaf (until
reset).
Fix this with a new flag to indicate actual receive buffer exhaustion.
Signed-off-by: Finn Thain
---
hw/net/dp8393x.c | 12 ++--
1 file ch
The LSB of descriptor address registers is used as an EOL flag.
It has to be masked when those registers are to be used as actual
addresses for copying memory around. But when the registers are
to be updated the EOL bit should not be masked.
Signed-off-by: Finn Thain
---
hw/net/dp8393x.c | 8
them. Linux uses that interrupt to
count dropped packets.
Signed-off-by: Finn Thain
---
QEMU passes short packets to dp8393x_receive(). But a real SONIC rejects
packets shorter than 64 bytes.
For dp8393x, the effective limit is 60 bytes because packets passed to
dp8393x_receive() lack a frame che
On Fri, 13 Dec 2019, no-re...@patchew.org wrote:
> === OUTPUT BEGIN ===
> 1/10 Checking commit 9c9ffc38e9b9 (dp8393x: Mask EOL bit from descriptor
> addresses)
> ERROR: return is not a function, parentheses are not required
> #24: FILE: hw/net/dp8393x.c:200:
> +return (s->regs[SONIC_URDA] <<
On Sat, 14 Dec 2019, Aleksandar Markovic wrote:
> On Saturday, December 14, 2019, Finn Thain
> wrote:
>
> > Hi All,
> >
> > There is a bug in the DP8393X emulation that can stop packet reception.
> >
> >
> Can you provide the details of your test scen
On Sat, 14 Dec 2019, Philippe Mathieu-Daud? wrote:
> Hi Finn,
>
> On 12/14/19 2:25 AM, Finn Thain wrote:
> > The LSB of descriptor address registers is used as an EOL flag.
> > It has to be masked when those registers are to be used as actual
> > addresses for copying
On Sun, 15 Dec 2019, Finn Thain wrote:
> I test the qemu build like this,
>
> qemu-system-m68k -M q800 -m 512M -serial none -serial mon:stdio -g 800x600x4
> -net nic,model=dp83932,addr=00:00:00:01:02:03
> -net bridge,helper=/opt/qemu/libexec/qemu-bridge-helper,br=br0
&
VIA1 timer. This approach should help mitigate the clock drift
> problem as well as assist with CONFIG_GENERIC_CLOCKEVENTS adoption,
> which would enable CONFIG_NO_HZ_IDLE etc.
>
> [2] https://github.com/mcayland/qemu/commits/q800.upstream
>
> [3] https://github.com/fthain/qemu/
On Thu, 18 Nov 2021, Mark Cave-Ayland wrote:
>
> Hi Finn,
>
> I've not forgotten about this series - we're now in 6.2 freeze, but it's
> on my TODO list to revisit in the next development cycle this along with
> the ESP stress-ng changes which I've also been looking at. As mentioned
> in my p
On Sat, 20 Nov 2021, Mark Cave-Ayland wrote:
> On 19/11/2021 08:39, Finn Thain wrote:
>
> > On Thu, 18 Nov 2021, Mark Cave-Ayland wrote:
> >
> >>
> >> Hi Finn,
> >>
> >> I've not forgotten about this series - we're now in
On Mon, 22 Nov 2021, Peter Maydell wrote:
> On Sat, 20 Nov 2021 at 23:40, Finn Thain wrote:
> > Anyway, thanks for taking the time to write. A competent reviewer has to
> > do much more than that, but I'm not paying for competence so I suppose I'm
> > asking too
This code appears to be unnecessary.
Signed-off-by: Finn Thain
Reviewed-by: Philippe Mathieu-Daudé
---
hw/misc/mos6522.c | 22 +-
1 file changed, 1 insertion(+), 21 deletions(-)
diff --git a/hw/misc/mos6522.c b/hw/misc/mos6522.c
index 1c57332b40..a478c1ca43 100644
--- a/hw
Reads and writes to the TL and TC registers have no immediate effect on
a running timer, with the exception of a write to TCH. Hence these
mos6522_timer_update() calls are not needed.
Signed-off-by: Finn Thain
---
hw/misc/mos6522.c | 7 ---
1 file changed, 7 deletions(-)
diff --git a/hw
reloaded when it wraps.
Signed-off-by: Finn Thain
---
hw/misc/mos6522.c | 19 +++
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/hw/misc/mos6522.c b/hw/misc/mos6522.c
index c0d6bee4cc..6bd60f2118 100644
--- a/hw/misc/mos6522.c
+++ b/hw/misc/mos6522.c
@@ -63,15 +63,16
This code appears to be unnecessary.
Signed-off-by: Finn Thain
Reviewed-by: Philippe Mathieu-Daudé
---
hw/misc/mos6522.c | 22 ++
1 file changed, 2 insertions(+), 20 deletions(-)
diff --git a/hw/misc/mos6522.c b/hw/misc/mos6522.c
index a478c1ca43..ff246b5437 100644
--- a
This improves readability.
Signed-off-by: Finn Thain
Reviewed-by: Philippe Mathieu-Daudé
---
hw/misc/mos6522.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/hw/misc/mos6522.c b/hw/misc/mos6522.c
index 1d4a56077e..c0d6bee4cc 100644
--- a/hw/misc/mos6522.c
+++ b
rter than 20 ms.
---
Changed since RFC:
- Added Reviewed-by tags.
- Re-ordered some patches to make fixes available earlier in the series.
- Dropped patch 5/10 "Don't clear T1 interrupt flag on latch write".
- Rebased on v6.1.0 release.
Finn Thain (9):
hw/mos6522: Remove get_lo
mos6522_read() and mos6522_write() may call various functions to determine
timer irq state, timer counter value and QEMUTimer deadline. All called
functions must use the same value for the present time.
Signed-off-by: Finn Thain
Reviewed-by: Philippe Mathieu-Daudé
---
Changed since RFC
- Moved
It necessary to call mos6522_update_irq() when the interrupt flags
change and unnecessary when they haven't.
Signed-off-by: Finn Thain
Reviewed-by: Philippe Mathieu-Daudé
---
hw/misc/mos6522.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/misc/mos6522.c b/hw
Timer 1 has two modes: continuous interrupt and oneshot.
Signed-off-by: Finn Thain
---
Changed since RFC:
- Moved to end of series. This patch is quite a bit shorter here.
---
hw/misc/mos6522.c | 6 --
include/hw/misc/mos6522.h | 2 ++
2 files changed, 6 insertions(+), 2 deletions
Signed-off-by: Finn Thain
---
Changed since RFC:
- Improved code commentary and commit log text.
- Removed qemu_clock_get_ns() call from set_counter() for simplicity.
- Moved the changes to the QEMUTimer callbacks from the previous patch
into this one because they relate more to syncronizati
ge conflicts
were resolved. The conflicts were apparently caused by commit 19f7034773
("Avoid address_space_rw() with a constant is_write argument").
Regards,
Finn
On Tue, 3 Mar 2020, Jason Wang wrote:
> From: Finn Thain
>
> The Least Significant bit of a descriptor addre
A portion of a recent patch got lost due to a merge snafu. That patch is
now commit 88f632fbb1 ("dp8393x: Mask EOL bit from descriptor addresses").
This patch restores the portion that got lost.
Signed-off-by: Finn Thain
---
hw/net/dp8393x.c | 4 ++--
1 file changed, 2 insert
Hi Michael,
On Tue, 16 Jun 2020, Michael Roth wrote:
>
> Finn Thain (14):
> dp8393x: Mask EOL bit from descriptor addresses
> dp8393x: Always use 32-bit accesses
> dp8393x: Clean up endianness hacks
> dp8393x: Have dp8393x_receive() return the packet si
On Sat, 20 Jun 2020, Finn Thain wrote:
>
> Thanks for picking these fixes. When the maintainer originally merged this
> series of patches, the first patch got slightly damaged. This was remedied
> in a subsequent patch[1]. That is, mainline commit a0cf4297d6 ("dp8393x:
&g
them. Linux uses that interrupt to
count dropped packets.
Signed-off-by: Finn Thain
Tested-by: Laurent Vivier
---
Changed since v1:
- Perform length check after Recieve Control Register initialization.
---
hw/net/dp8393x.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/hw/net/dp83
quot;net/dp8393x: fix hardware reset")
Signed-off-by: Finn Thain
---
hw/net/dp8393x.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
index 1b73a8703b..71af0fad51 100644
--- a/hw/net/dp8393x.c
+++ b/hw/net/dp8393x.c
@@ -591,6 +591,10 @@ st
RXpkt.in_use field.
The packet can now be processed by the host, so raise a PKTRX interrupt,
just like the normal case.
Signed-off-by: Finn Thain
Tested-by: Laurent Vivier
---
Changed since v2:
- Assert PKTRX interrupt when releasing withheld packet.
---
hw/net/dp8393x.c | 10 ++
1
Linux 'jazzsonic' driver working, and avoids the need for
prior hacks to make the NetBSD 'sn' driver work.
Signed-off-by: Finn Thain
---
hw/net/dp8393x.c | 47 +--
1 file changed, 29 insertions(+), 18 deletions(-)
diff --git a/hw/ne
of
descriptors in this way.
Signed-off-by: Finn Thain
Tested-by: Laurent Vivier
---
Changed since v1:
- Update CRDA register from LLFA register after EOL is cleared.
---
hw/net/dp8393x.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/hw/net/dp8393x.c b/hw/net
word boundary
(A0 and A1 are always zero).
This constraint has been implemented for 16-bit mode; implement it
for 32-bit mode too.
Signed-off-by: Finn Thain
Tested-by: Laurent Vivier
---
hw/net/dp8393x.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/hw/net
patches.
Finn Thain (14):
dp8393x: Mask EOL bit from descriptor addresses
dp8393x: Always use 32-bit accesses
dp8393x: Clean up endianness hacks
dp8393x: Have dp8393x_receive() return the packet size
dp8393x: Update LLFA and CRDA registers from rx descriptor
dp8393x: Clear RRRA command
This function re-uses its 'size' argument as a scratch variable.
Instead, declare a local 'size' variable for that purpose so that the
function result doesn't get messed up.
Signed-off-by: Finn Thain
Reviewed-by: Philippe Mathieu-Daudé
Tested-by: Laurent Vivier
It doesn't make sense to clear the command register bit unless the
command was actually issued.
Signed-off-by: Finn Thain
Reviewed-by: Philippe Mathieu-Daudé
Tested-by: Laurent Vivier
---
hw/net/dp8393x.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/h
. Fix this.
Signed-off-by: Finn Thain
Reviewed-by: Philippe Mathieu-Daudé
Tested-by: Laurent Vivier
---
hw/net/dp8393x.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
index 0309365fda..947ceef37c 100644
--- a/hw/net/dp8393x.c
+++ b/hw/net/dp8393x.c
@@ -
word (16-bit mode) or long word (32-bit mode)
if the last byte did not end on a word or long word boundary
respectively. The fill byte will be 0FFh.
Implement buffer padding so that buffer limits are correctly enforced.
Signed-off-by: Finn Thain
Tested-by: Laurent Vivier
---
hw/net
According to the datasheet, section 3.4.4, "in 32-bit mode ... the SONIC
always writes long words".
Therefore, use the same technique for the 'in_use' field that is used
everywhere else, and write the full long word.
Signed-off-by: Finn Thain
Tested-by: Laurent Vivier
The Least Significant bit of a descriptor address register is used as
an EOL flag. It has to be masked when the register value is to be used
as an actual address for copying memory around. But when the registers
are to be updated the EOL bit should not be masked.
Signed-off-by: Finn Thain
Tested
These operations have to take place regardless of whether or not rx
descriptors have been used up (that is, EOL flag was observed).
The algorithm is the now the same for a packet that was withheld as
for a packet that was not.
Signed-off-by: Finn Thain
Tested-by: Laurent Vivier
---
hw/net
turns false. This bug causes the SONIC to become
deaf (until reset).
Fix this with a new flag to indicate actual receive buffer exhaustion.
Signed-off-by: Finn Thain
Tested-by: Laurent Vivier
---
Changed since v2:
- Don't use can_receive to suspend packet reception.
- Don't misuse th
Signed-off-by: Finn Thain
---
.mailmap | 1 +
1 file changed, 1 insertion(+)
diff --git a/.mailmap b/.mailmap
index a1bd659817..772f3e16cf 100644
--- a/.mailmap
+++ b/.mailmap
@@ -91,6 +91,7 @@ Erik Smit
Fabrice Desclaux
Fernando Luis Vázquez Cao
Fernando Luis Vázquez Cao
+Finn Thain
On Mon, 20 Jan 2020, Finn Thain wrote:
> Hi All,
>
> There are bugs in the emulated dp8393x device that can stop packet
> reception in a Linux/m68k guest (q800 machine).
>
> With a Linux/mips guest (magnum machine), the driver fails to probe
> the dp8393x device.
>
On Tue, 28 Jan 2020, Philippe Mathieu-Daud? wrote:
> On 1/19/20 11:59 PM, Finn Thain wrote:
> > The jazzsonic driver in Linux uses the Silicon Revision register value
> > to probe the chip. The driver fails unless the SR register contains 4.
> > Unfortunately, reading
On Tue, 28 Jan 2020, Philippe Mathieu-Daudé wrote:
> Hi Finn,
>
> On 1/19/20 11:59 PM, Finn Thain wrote:
> > The Least Significant bit of a descriptor address register is used as
> > an EOL flag. It has to be masked when the register value is to be used
> > as an
On Wed, 29 Jan 2020, Philippe Mathieu-Daudé wrote:
> >
> > This would allow the host to change the value of the Silicon Revision
> > register.
> How the guest can modify it? We have:
>
> 589 static void dp8393x_write(void *opaque, hwaddr addr, uint64_t data,
> 590 unsi
It doesn't make sense to clear the command register bit unless the
command was actually issued.
Signed-off-by: Finn Thain
Reviewed-by: Philippe Mathieu-Daudé
Tested-by: Laurent Vivier
---
hw/net/dp8393x.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/h
word boundary
(A0 and A1 are always zero).
This constraint has been implemented for 16-bit mode; implement it
for 32-bit mode too.
Signed-off-by: Finn Thain
Tested-by: Laurent Vivier
Reviewed-by: Philippe Mathieu-Daudé
---
hw/net/dp8393x.c | 8 ++--
1 file changed, 6 insertions(+), 2
. Fix this.
Signed-off-by: Finn Thain
Reviewed-by: Philippe Mathieu-Daudé
Tested-by: Laurent Vivier
---
hw/net/dp8393x.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
index 0309365fda..947ceef37c 100644
--- a/hw/net/dp8393x.c
+++ b/hw/net/dp8393x.c
@@ -
This function re-uses its 'size' argument as a scratch variable.
Instead, declare a local 'size' variable for that purpose so that the
function result doesn't get messed up.
Signed-off-by: Finn Thain
Reviewed-by: Philippe Mathieu-Daudé
Tested-by: Laurent Vivier
of
descriptors in this way.
Signed-off-by: Finn Thain
Tested-by: Laurent Vivier
---
Changed since v1:
- Update CRDA register from LLFA register after EOL is cleared.
---
hw/net/dp8393x.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/hw/net/dp8393x.c b/hw/net
RXpkt.in_use field.
The packet can now be processed by the host, so raise a PKTRX interrupt,
just like the normal case.
Signed-off-by: Finn Thain
Tested-by: Laurent Vivier
---
Changed since v2:
- Assert PKTRX interrupt when releasing withheld packet.
---
hw/net/dp8393x.c | 10 ++
1
Linux 'jazzsonic' driver working, and avoids the need for
prior hacks to make the NetBSD 'sn' driver work.
Signed-off-by: Finn Thain
Tested-by: Laurent Vivier
---
hw/net/dp8393x.c | 47 +--
1 file changed, 29 insertions(+), 18 deleti
quot;net/dp8393x: fix hardware reset")
Suggested-by: Philippe Mathieu-Daudé
Signed-off-by: Finn Thain
---
Changed since v3:
- Simplified as per suggestion from Philippe Mathieu-Daudé.
---
hw/net/dp8393x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/net/dp8393x.c b/hw/
them. Linux uses that interrupt to
count dropped packets.
Signed-off-by: Finn Thain
Tested-by: Laurent Vivier
---
Changed since v1:
- Perform length check after Recieve Control Register initialization.
---
hw/net/dp8393x.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/hw/net/dp83
The Least Significant bit of a descriptor address register is used as
an EOL flag. It has to be masked when the register value is to be used
as an actual address for copying memory around. But when the registers
are to be updated the EOL bit should not be masked.
Signed-off-by: Finn Thain
Tested
turns false. This bug causes the SONIC to become
deaf (until reset).
Fix this with a new flag to indicate actual receive buffer exhaustion.
Signed-off-by: Finn Thain
Tested-by: Laurent Vivier
---
Changed since v2:
- Don't use can_receive to suspend packet reception.
- Don't misuse th
Added 2 new patches.
Changed since v3:
- Replaced patch 13/14 with patch suggested by Philippe Mathieu-Daudé.
Finn Thain (14):
dp8393x: Mask EOL bit from descriptor addresses
dp8393x: Always use 32-bit accesses
dp8393x: Clean up endianness hacks
dp8393x: Have dp8393x_receive() retur
word (16-bit mode) or long word (32-bit mode)
if the last byte did not end on a word or long word boundary
respectively. The fill byte will be 0FFh.
Implement buffer padding so that buffer limits are correctly enforced.
Signed-off-by: Finn Thain
Tested-by: Laurent Vivier
Reviewed-by
These operations need to take place regardless of whether or not
rx descriptors have been used up (that is, EOL flag was observed).
The algorithm is now the same for a packet that was withheld as for
a packet that was not.
Signed-off-by: Finn Thain
Tested-by: Laurent Vivier
---
hw/net
According to the datasheet, section 3.4.4, "in 32-bit mode ... the SONIC
always writes long words".
Therefore, use the same technique for the 'in_use' field that is used
everywhere else, and write the full long word.
Signed-off-by: Finn Thain
Tested-by: Laurent Vivier
R
On Tue, 7 Jan 2020, Philippe Mathieu-Daud? wrote:
> On 1/6/20 11:19 PM, Finn Thain wrote:
> > On Fri, 20 Dec 2019, Finn Thain wrote:
> >
> > > The in_use field is no different to the other words handled using
> > > dp8393x_put() and dp8393x_get(). Use the same t
On Mon, 16 Dec 2019, Finn Thain wrote:
> 00:15:29.341601 IP truncated-ip - 52 bytes missing! 192.168.66.1 >
> 192.168.66.111: ICMP echo request, id 23957, seq 12, length 64
...
>
> Sniffing br0 on the host shows no sign of the truncated packet at all
> which leaves a
This function re-uses its 'size' argument as a scratch variable.
Instead, declare a local 'size' variable for that purpose so that the
function result doesn't get messed up.
Signed-off-by: Finn Thain
Reviewed-by: Philippe Mathieu-Daudé
---
hw/net/dp8393x.c | 9 +++
:
- Minor revisions described in patch descriptions.
- Dropped patches 4/10 and 7/10.
- Added 5 new patches.
Finn Thain (13):
dp8393x: Mask EOL bit from descriptor addresses
dp8393x: Clean up endianness hacks
dp8393x: Have dp8393x_receive() return the packet size
dp8393x: Update LLFA and
. Fix this.
Signed-off-by: Finn Thain
Reviewed-by: Philippe Mathieu-Daudé
---
hw/net/dp8393x.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
index 46b92ebf65..d722bbe8c1 100644
--- a/hw/net/dp8393x.c
+++ b/hw/net/dp8393x.c
@@ -813,6 +813,7 @@ static ss
The in_use field is no different to the other words handled using
dp8393x_put() and dp8393x_get(). Use the same technique for in_use
that is used everywhere else.
Signed-off-by: Finn Thain
---
Changed since v1:
- Use existing 'address' variable rather than declare a new one.
Lauren
of
descriptors in this way.
Signed-off-by: Finn Thain
---
Changed since v1:
- Update CRDA register from LLFA register after EOL is cleared.
---
hw/net/dp8393x.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
index a3e3a82ff4
word (16-bit mode) or long word (32-bit mode)
if the last byte did not end on a word or long word boundary
respectively. The fill byte will be 0FFh.
Implement buffer padding so that buffer limits are correctly enforced.
Signed-off-by: Finn Thain
---
hw/net/dp8393x.c | 39
: Finn Thain
---
hw/net/dp8393x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
index bd92fa28f6..92a30f9f69 100644
--- a/hw/net/dp8393x.c
+++ b/hw/net/dp8393x.c
@@ -340,7 +340,7 @@ static void dp8393x_do_read_rra(dp8393xState *s)
s
This is in accordance with section 3.4.7 of the datasheet:
When the system appends more descriptors, the SONIC releases ownership
of the descriptor after writing h to the RXpkt.in_use field.
Signed-off-by: Finn Thain
---
hw/net/dp8393x.c | 9 +
1 file changed, 9 insertions
them. Linux uses that interrupt to
count dropped packets.
Signed-off-by: Finn Thain
---
Changed since v1:
- Perform length check after Recieve Control Register initialization.
---
hw/net/dp8393x.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
These operations have to take place regardless of whether or not rx
descriptors have been used up (that is, EOL flag was observed).
Signed-off-by: Finn Thain
---
hw/net/dp8393x.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
The LSB of descriptor address registers is used as an EOL flag.
It has to be masked when those registers are to be used as actual
addresses for copying memory around. But when the registers are
to be updated the EOL bit should not be masked.
Signed-off-by: Finn Thain
---
Changed since v1
It doesn't make sense to clear the command register bit unless the
command was actually issued.
Signed-off-by: Finn Thain
Reviewed-by: Philippe Mathieu-Daudé
---
hw/net/dp8393x.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/hw/net/dp8393x.c b/hw/net/dp83
On Sun, 15 Dec 2019, Aleksandar Markovic wrote:
>
> Herve,
>
> Is there any way for us to come up with an equivalent or at least
> approximate scenario for Jazz machines?
>
> Regards,
> Aleksandar
>
That would be useful in general, but in this case I think it might be
better to test NetBSD,
word boundary
(A0 and A1 are always zero).
This constraint has been implemented for 16-bit mode; implement it
for 32-bit mode too.
Signed-off-by: Finn Thain
---
hw/net/dp8393x.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
index
e RBE interrupt until it receives another packet. But that won't
happen if can_receive returns false. So the SONIC becomes deaf (until
reset).
Fix this with a new flag to indicate actual receive buffer exhaustion.
Signed-off-by: Finn Thain
---
hw/net/dp8393x.c | 12 ++--
1 file ch
after I've finished
debugging the Linux sonic driver.
On Fri, 20 Dec 2019, Finn Thain wrote:
> The last entry in the RRA is at the address given by the REA register.
> The address wrap-around logic is off-by-one entry. The last resource
> never gets used and RRP can jump over the
On Fri, 20 Dec 2019, Laurent Vivier wrote:
> Le 20/12/2019 ? 12:38, Aleksandar Markovic a ?crit?:
> > On Sat, Dec 14, 2019 at 2:29 AM Finn Thain
> > wrote:
> >>
> >> Hi All,
> >>
> >> There is a bug in the DP8393X emulation that can stop packet
On Mon, 23 Dec 2019, Philippe Mathieu-Daud? wrote:
> Hi Finn,
>
> On 12/20/19 5:24 AM, Finn Thain wrote:
> > On Sun, 15 Dec 2019, Aleksandar Markovic wrote:
> >
> > >
> > > Herve,
> > >
> > > Is there any way for us to come up with an e
On Tue, 24 Dec 2019, Finn Thain wrote:
>
> I know precious little about NetBSD installation and MIPS Magnum. What I
> wrote above was guesswork. Hence this could be a NetBSD bug or user
> error.
>
It was bugs and user error.
The user error was not using the serial console.
On Tue, 24 Dec 2019, hpous...@reactos.org wrote:
> >
> > I haven't tried the latest iso (9.0-rc1).
> >
I found that NetBSD 9.0-rc1 has the same regressions.
>
> Hello Finn,
>
> Thanks for finding the required steps to boot NetBSD on MIPS Magnum. I
> was trying to find how to let it work on
On Fri, 20 Dec 2019, Finn Thain wrote:
> The in_use field is no different to the other words handled using
> dp8393x_put() and dp8393x_get(). Use the same technique for in_use
> that is used everywhere else.
>
> Signed-off-by: Finn Thain
> ---
> Changed since v1:
>
/github.com/fthain/qemu/commits/via-timer/
[4] This theoretical 20 ms deadline is not missed prior to every
backwards jump in the clocksource counter. AFAICT, that's because the
true deadline is somewhat shorter than 20 ms.
Finn Thain (10):
hw/mos6522: Remove get_load_time() me
This code appears to be unnecessary.
Signed-off-by: Finn Thain
---
hw/misc/mos6522.c | 22 +-
1 file changed, 1 insertion(+), 21 deletions(-)
diff --git a/hw/misc/mos6522.c b/hw/misc/mos6522.c
index 1c57332b40..a478c1ca43 100644
--- a/hw/misc/mos6522.c
+++ b/hw/misc/mos6522
This code appears to be unnecessary.
Also, these routines don't return the counter value but a time interval
between counter values, so they are misnamed.
Signed-off-by: Finn Thain
---
hw/misc/mos6522.c | 22 ++
1 file changed, 2 insertions(+), 20 deletions(-)
diff --
This improves readability.
Signed-off-by: Finn Thain
---
hw/misc/mos6522.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/hw/misc/mos6522.c b/hw/misc/mos6522.c
index 1d4a56077e..c0d6bee4cc 100644
--- a/hw/misc/mos6522.c
+++ b/hw/misc/mos6522.c
@@ -154,7 +154,7
The Synertek datasheet says, "A write to T1L-H loads an 8-bit count value
into the latch. A read of T1L-H transfers the contents of the latch to
the data bus. Neither operation has an affect [sic] on the interrupt
flag."
Signed-off-by: Finn Thain
---
hw/misc/mos6522.c | 1 -
1 file
Reads and writes to the TL and TC registers have no immediate effect on
a running timer, with the exception of a write to TCH. Hence these
mos6522_timer_update() calls are not needed.
Signed-off-by: Finn Thain
---
hw/misc/mos6522.c | 7 ---
1 file changed, 7 deletions(-)
diff --git a/hw
reloaded when it wraps.
Signed-off-by: Finn Thain
---
hw/misc/mos6522.c | 19 +++
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/hw/misc/mos6522.c b/hw/misc/mos6522.c
index 5b1657ac0d..0a241fe9f8 100644
--- a/hw/misc/mos6522.c
+++ b/hw/misc/mos6522.c
@@ -63,15 +63,16
Signed-off-by: Finn Thain
---
hw/misc/mos6522.c | 19 ---
include/hw/misc/mos6522.h | 3 +++
2 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/hw/misc/mos6522.c b/hw/misc/mos6522.c
index 8991f4..5b1657ac0d 100644
--- a/hw/misc/mos6522.c
+++ b/hw/misc
1 - 100 of 139 matches
Mail list logo