Skip to content

Commit

Permalink
driver.c: add comment to highlight importance of lun logic
Browse files Browse the repository at this point in the history
  • Loading branch information
LIV2 committed Jul 27, 2024
1 parent d44ad48 commit 116aa2c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,11 @@ static void __attribute__((used, saveds)) open(struct DeviceBase *dev asm("a6"),

Trace((CONST_STRPTR) "running open() for unitnum %ld\n",unitnum);

/* IMPORTANT: Must return TDERR_BadUnitNum when lun > 0
* SCSI Unit encoding places the LUN in the 10s column of the unit number
* HDToolbox scans each LUN of a unit and stops searching if it sees an error other than TDERR_BadUnitNum
* So if this is not returned, only one drive will ever be detected
*/
UBYTE lun = unitnum / 10;
unitnum = (unitnum % 10);

Expand Down

0 comments on commit 116aa2c

Please sign in to comment.