Re: [hatari-devel] nf_scsidrv: Support for two buses

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


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


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/