Skip to content

Support for native Apple CDROM driver#835

Merged
akuker merged 1 commit intoPiSCSI:developfrom
mynameistroy:troy/native_apple_driver_support
Sep 8, 2022
Merged

Support for native Apple CDROM driver#835
akuker merged 1 commit intoPiSCSI:developfrom
mynameistroy:troy/native_apple_driver_support

Conversation

@mynameistroy
Copy link
Copy Markdown
Collaborator

Also migrated some CDROM specific code out of SCSIHD and into SCSICD

@mynameistroy
Copy link
Copy Markdown
Collaborator Author

Oh I see @uweseimet is in the midst of a cleanup which will probably require some changes to sync up with that when his done. I'll park this here for now and update accordingly when the time is right.

@uweseimet
Copy link
Copy Markdown
Contributor

uweseimet commented Sep 5, 2022

@mynameistroy Yes, it would be better to wait. Can you please ensure that you PR does not duplicate code? On first sight it looks as if code is duplicate from SCSI_HD to SCSI_CD.
If you do not know how to avoid duplication I can help with this when the time for merging this PR has come. I guess that some code will end up in the scsi_command_util.

@uweseimet
Copy link
Copy Markdown
Contributor

@mynameistroy I just had a closer look at scsi_command_util.cpp and think that there would not be many conflicts with my changes. We would probably be fine to merge your changes before mine, after any code duplication issues have been resolved.

@uweseimet uweseimet self-requested a review September 5, 2022 21:31
@mynameistroy
Copy link
Copy Markdown
Collaborator Author

@uweseimet sure I can clean that up easily enough.

@uweseimet
Copy link
Copy Markdown
Contributor

@mynameistroy Sounds good!

@akuker
Copy link
Copy Markdown
Member

akuker commented Sep 6, 2022

Note: This is related to issue #1

@uweseimet uweseimet linked an issue Sep 6, 2022 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

@uweseimet uweseimet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mynameistroy I just noticed that you moved your code to disk.cpp. Please do not do that because (see the existing tickets) Disk is the superclass also of the host bridge and the daynaport, i.e. you essentially add the mode page to all devices, which is not correct.
Please delegate to the scsi_command_util class, as already mentioned.

@mynameistroy
Copy link
Copy Markdown
Collaborator Author

Apologies @uweseimet, but the scsi_command_util has no reference to ModeSense pages just ModeSelect. So it's not entirely clear where something used by two devices (SCCD, SCHD) would go without the duplication you already mentioned as being undesirable. The mode_page_device seems like a likely placement but it apparently would likely be similarly overreaching like Disk seems to be.

I'm certainly happy to make whatever changes that work for you. I am sorry if I'm not getting what your desired implementation is.

@uweseimet
Copy link
Copy Markdown
Contributor

@mynameistroy scsi_command_util does not deal with MODE SENSE yet;, but scsi_command_util is where this shared code belongs to. This why scsi_command_utill.h says "Shared code for SCSI command implementations". This is why I suggested scsi_command_util yesterday.
Whether it is mode sense or mode select or a different command does not matter. If there were already unit tests related to mode sense for all device types, changing the mode sense implementation in Disk would break them.

@mynameistroy mynameistroy force-pushed the troy/native_apple_driver_support branch from 39a7df6 to 34242a2 Compare September 6, 2022 23:17
@mynameistroy
Copy link
Copy Markdown
Collaborator Author

Alrighty, restarted this with a clean slate for clarity :)

@mynameistroy mynameistroy reopened this Sep 6, 2022
@akuker
Copy link
Copy Markdown
Member

akuker commented Sep 7, 2022

I'm guessing the SonarCloud analysis failed because the PR is coming from an outside repo which does not have the SonarCloud 'secret' key configured. I believe this should resolve itself when this is merged into develop.

If not, we'll work through it.... I'm still learning about this tool

@akuker
Copy link
Copy Markdown
Member

akuker commented Sep 7, 2022

I've approved, but I'll wait for @uweseimet to approve the change before we merge.

@mynameistroy
Copy link
Copy Markdown
Collaborator Author

Sounds good to me

@akuker akuker dismissed uweseimet’s stale review September 8, 2022 02:36

This update was made

@akuker akuker merged commit a56aae6 into PiSCSI:develop Sep 8, 2022
@uweseimet
Copy link
Copy Markdown
Contributor

Looks as you approved after all without waiting. I don't think this is the proper procedure, but anyway, on first sight the changes look fine to me now. Thank you, @mynameistroy .
#1 can be closed I assume?

@uweseimet
Copy link
Copy Markdown
Contributor

@mynameistroy Please remember to confirm that #1 can be closed, because your change was merged.

@mynameistroy
Copy link
Copy Markdown
Collaborator Author

@uweseimet Oh sorry, I thought you were still speaking to @akuker . Indeed you can close #1 now and again sorry for the back and forth.

@uweseimet
Copy link
Copy Markdown
Contributor

@mynameistroy Cool! I will close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CD-ROM Emulation doesn't work with stock Apple drivers

4 participants