Re: [hatari-devel] MODE SENSE patch

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


Am Thu, 17 Mar 2022 22:55:07 +0100
schrieb Uwe Seimet <Uwe.Seimet@xxxxxxxxx>:

> This is my (consolidated) patch. I hope I did not miss anything. As already
> mentioned the DBD bit is not checked, but it was also not checked before,
> and I did not want to spend more time on this.

Honestly, it's better to change only one thing at a time if they are
unrelated. Otherwise, patch review (and debugging later) gets way more
complicated.

So it would be better to have one patch to update the magic constants, one
patch to fix mode sense, etc.

So for this patch:

 static int HDC_GetCommandByteCount(SCSI_CTRLR *ctr)
 {
-	if (ctr->opcode == 0x88 || ctr->opcode == 0x8a || ctr->opcode == 0x8f ||
-		ctr->opcode == 0x91 || ctr->opcode == 0x9e || ctr->opcode == 0x9f) {
-		return 16;
-	}
-	else if (ctr->opcode == 0xa0) {
+	if (ctr->opcode == HD_REPORT_LUNS) {
 		return 12;
 	}

What happened to the "return 16"? Why is it ok to remove it? ==> This
information is missing in the patch description.

 Thomas



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