Re: [hatari-devel] nf_scsidrv: Support for two buses |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] nf_scsidrv: Support for two buses
- From: Uwe Seimet <Uwe.Seimet@xxxxxxxxx>
- Date: Sun, 13 Dec 2020 11:41:19 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1607856080; s=strato-dkim-0002; d=seimet.de; h=In-Reply-To:References:Message-ID:Subject:To:From:Date:From:Subject: Sender; bh=nsgB0O6oRFQu7HWHSvMNfNn5MjydiEz1rhugpq6gIP0=; b=OslVBrxsiiXQJhyaSegRi7X1MmEqjlz/46+bO06klz+OqvccYfFVQ1goIRWKF65P1H dKeVQXyGDHPZ5d480RxzmMDvDs75qudp0EPkBqUGfeI6ixJsAVfM5D5+He3sLBfqeClw Un3tCCBReT5PH099zdXqrMdyz48n9OffPQQ+ZDOj00nDCKr/eZ4QvjtBAzSI6k7m0zXQ HV3aCb31/0l4yku9Nq6R+VohxJmKQxCvsNdPDLvssjSjtbPrUd1W3vNYgJP7EdSP4jhQ kaIbesgAv60jYiCu2yQQUnf9zXD1RUn+0ErfoftofixQGhPJ0ZmpRjYmtz3j29HKAeoQ aj3Q==
Hi Thorsten,
Changing the encoding is the better solution, indeed. By making the new
feature a bit less flexible than planned no interface change is required at
all. Initially I wanted each bus to support different features and transfer
lengths. This would have required a change in the natfeats interface
features call. But at least currently this flexibility is not needed. I have
to ignore the bus name returned as part of the interface features, though.
Currently the native code provides this name, but "Linux Generic SCSI" is
too long if you want to add a unique suffix for the two buses. But I can
simply set separate bus names in the TOS code.
Thank you for reviewing my change.
@Eero, even though a code change does not appear to be required I added a
patch with a comment saying that the bus name is ignored with new versions
of the TOS SCSI Driver.
Best regards
Uwe
> On Sonntag, 13. Dezember 2020 10:05:23 CET Uwe Seimet wrote:
> > @Thorsten Are you reading this? Sooner or later I would also like to update
> > the ARAnyM driver. There are only minor changes.
>
> Yes.
>
> But, after a quick look through the diffs: Wouldn't it be easier to just
> encode the bus index in the id? That way, there won't be much changes needed
> at all in the interface. Only the TOS part has to be updated.
>
> Currently, the changes require that you use the *exact* version number of the
> driver that corresponds to the interface, which is not very practicable, if
> you use the same driver both for Hatari and Aranym, and they implemented
> different interfaces (which will almost always be the case, depending on which
> version of Hatari/Aranym a distribution ships).
>
diff --git a/src/nf_scsidrv.c b/src/nf_scsidrv.c
index a1329db8..34ddfb2f 100644
--- a/src/nf_scsidrv.c
+++ b/src/nf_scsidrv.c
@@ -33,7 +33,8 @@ const char NfScsiDrv_fileid[] = "Hatari nf_scsidrv.c";
// The driver interface version, 1.02
#define INTERFACE_VERSION 0x0102
-// Maximum is 20 characters
+// Maximum is 20 characters. Note that newer versions of the TOS SCSI Driver
+// counterpart ignore this name
#define BUS_NAME "Linux Generic SCSI"
// The SG driver supports cAllCmds
#define BUS_FEATURES 0x02