[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 6/6] dp8393x: Rewrite dp8393x_get() / dp8393x_put()
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [RFC PATCH 6/6] dp8393x: Rewrite dp8393x_get() / dp8393x_put() |
Date: |
Sat, 3 Jul 2021 17:04:20 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 7/3/21 5:00 PM, Mark Cave-Ayland wrote:
> On 03/07/2021 15:19, Philippe Mathieu-Daudé wrote:
>
>> Instead of accessing N registers via a single address_space API
>> call using a temporary buffer (stored in the device state) and
>> updating each register, move the address_space call in the
>> register put/get. The load/store and word size checks are moved
>> to put/get too. This simplifies a bit, making the code easier
>> to read.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> ---
>> hw/net/dp8393x.c | 157 ++++++++++++++++++-----------------------------
>> 1 file changed, 60 insertions(+), 97 deletions(-)
>>
>> diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
>> index bbe241ef9db..db9cfd786f5 100644
>> --- a/hw/net/dp8393x.c
>> +++ b/hw/net/dp8393x.c
>> @@ -162,7 +162,6 @@ struct dp8393xState {
>> /* Temporaries */
>> uint8_t tx_buffer[0x10000];
>> - uint16_t data[12];
>> int loopback_packet;
>> /* Memory access */
> This seems like a nice tidy-up. I'll need a bit of time to give some
> more R-b and T-b tags since MacOS is running on a very diverged branch,
> so I'll need to pick through and update the changes to run across all my
> test images accordingly.
No hurry.
> With this patch is it now possible to remove s->data completely?
First line remove it ;) (It was not part of the migration stream).
- [RFC PATCH 4/6] dp8393x: Store CAM registers as 16-bit, (continued)
- [PATCH 5/6] dp8393x: Replace address_space_rw(is_write=1) by address_space_write(), Philippe Mathieu-Daudé, 2021/07/03
- [RFC PATCH 6/6] dp8393x: Rewrite dp8393x_get() / dp8393x_put(), Philippe Mathieu-Daudé, 2021/07/03
- Re: [RFC PATCH 6/6] dp8393x: Rewrite dp8393x_get() / dp8393x_put(), Mark Cave-Ayland, 2021/07/03
- Re: [RFC PATCH 6/6] dp8393x: Rewrite dp8393x_get() / dp8393x_put(),
Philippe Mathieu-Daudé <=
- Re: [RFC PATCH 6/6] dp8393x: Rewrite dp8393x_get() / dp8393x_put(), Finn Thain, 2021/07/03
- Re: [RFC PATCH 6/6] dp8393x: Rewrite dp8393x_get() / dp8393x_put(), Mark Cave-Ayland, 2021/07/04
- Re: [RFC PATCH 6/6] dp8393x: Rewrite dp8393x_get() / dp8393x_put(), Finn Thain, 2021/07/04
- Re: [RFC PATCH 6/6] dp8393x: Rewrite dp8393x_get() / dp8393x_put(), Mark Cave-Ayland, 2021/07/05
- Re: [RFC PATCH 6/6] dp8393x: Rewrite dp8393x_get() / dp8393x_put(), Finn Thain, 2021/07/06
- Re: [RFC PATCH 6/6] dp8393x: Rewrite dp8393x_get() / dp8393x_put(), Mark Cave-Ayland, 2021/07/07
- Re: [RFC PATCH 6/6] dp8393x: Rewrite dp8393x_get() / dp8393x_put(), Finn Thain, 2021/07/09