qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 4/8] hw/ide: Move MAX_IDE_BUS define to one header


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 4/8] hw/ide: Move MAX_IDE_BUS define to one header
Date: Mon, 16 Mar 2020 09:23:25 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 3/16/20 7:53 AM, Markus Armbruster wrote:
BALATON Zoltan <address@hidden> writes:

There are several definitions of MAX_IDE_BUS in different boards (some
of them unused) with the same value. Move it to include/hw/ide/internal.h
to have it in a central place.

Signed-off-by: BALATON Zoltan <address@hidden>

This one feels a bit questionable.

The number of (PATA) IDE buses provides by a host bus adapter depends on
the HBA.  It happens to be 2 for all HBAs we implement, but it could
really be anything.

Similar for SATA, where the common number is 6, but could really be
anything.  I can't see offhand whether any HBA we implement provides a
different number.

By moving MAX_IDE_BUS to include/hw/ide/internal.h, you bake the
accidental commonality into the interface to the IDE core.  I'd prefer
not to.

I agree with Markus here (I kept this commit tagged because I was thinking the same but didn't know how to express it correctly. Thanks Markus!).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]