SCSIControllerDriverKit

RSS for tag

Develop drivers for SCSI protocol-based devices.

Posts under SCSIControllerDriverKit tag

47 Posts

Post

Replies

Boosts

Views

Activity

Sending SCSI commands to USB mass storage device
Our device is USB Mass stroage device. We want to send a specific SCSI command to a USB drive in Mac OS X. Have any demo app that uses IOUserSCSIPeripheralDeviceType00 in SCSIPeripheralsDriverKit? We want to use below SCSI command, but have no demo program. https://developer.apple.com/documentation/scsiperipheralsdriverkit/3946437-inquiry https://developer.apple.com/documentation/scsiperipheralsdriverkit/iouserscsiperipheraldevicetype00/3946461-usersendcdb
0
2
1k
Nov ’22
SCSIControllerDriverKit: Process gets stuck on UserCreateTargetForID.
Context: We are working on migration of the driver, which is currently represented as a kernel extension, to the DriverKit framework. The driver works with Thunderbolt RAID storage devices. When connected through the Thunderbolt interface to the host, the device itself presents in the OS as a PCI device. The main function of our driver (.kext) is to create a "virtual" SCSI device in the OS for each virtual RAID array. So that the OS can work with these SCSI drives as usual disk storage.  We use https://developer.apple.com/documentation/scsicontrollerdriverkit to migrate this functionality in the dext version of the driver. Current issue: When a device is connected - the dext driver cannot create a SCSI drive in the OS. Technically our dext tries to create a SCSI drive using the UserCreateTargetForID method. On this step the OS sends the first SCSI command “Test Unit Ready ''to the device to check if it is a SCSI device. We process this command in an additional thread  separated from the main process of the dext (as it is recommended in the DriverKit documentation). We can see in the logs that the device receives this command and responses but when our dext sends this response to the OS the process is stuck in the waiting mode. How can we understand why it happens and fix it? More details: We are migrating functionality of an already existing “.kext” driver. We checked logs of the kext driver of this step: 15:06:17.902539+0700 Target device try to create for idx:0 15:06:17.902704+0700 Send command 0 for target 0 len 0 15:06:18.161777+0700 Complete command: 0 for target: 0 Len: 0 status: 0 flags: 0 15:06:18.161884+0700 Send command 18 for target 0 len 6 15:06:18.161956+0700 Complete command: 18 for target: 0 Len: 6 status: 0 flags: 0 15:06:18.162010+0700 Send command 18 for target 0 len 44 15:06:18.172972+0700 Complete command: 18 for target: 0 Len: 44 status: 0 flags: 0 15:06:18.275501+0700 Send command 18 for target 0 len 36 15:06:18.275584+0700 Complete command: 18 for target: 0 Len: 36 status: 0 flags: 0 15:06:18.276257+0700 Target device created for idx:0 We can see a successful message “Target device created for idx:0” In the the dext logs of the same step: We do not see the “Send command 18 for target 0 len 6” as we have in the kext logs  no log of the successful result “Target device created for idx:0” 15:54:10.903466+0700 Try to create target for 0 UUID 432421434863538456 15:54:10.903633+0700 UserDoesHBAPerformAutoSense 15:54:10.903763+0700 UserInitializeTargetForID 15:54:10.903876+0700 UserDoesHBASupportMultiPathing 15:54:10.904200+0700 UserProcessParallelTask start. 15:54:10.904298+0700 Sent command : 0 len 0 for target 0 15:54:11.163003+0700 Disable interrupts. 15:54:11.163077+0700 Complete cmd : 0 for target: 0 len: 0  status: 0 flags: 0 15:54:11.163085+0700 Enable interrupts. Will appreciate any help
3
1
1.5k
Nov ’22
Where is SCSIControllerDriverKit now?
Hi there! There was a presentation of the SCSI support in DriverKit on 2020 WWDC: https://developer.apple.com/videos/play/wwdc2020/10210/ Currently, the Xcode 12.4 (latest) has nothing regarding SCSI in DriverKit folders. Documentation says it is still in beta: https://developer.apple.com/documentation/scsicontrollerdriverkit So I've downloaded xcode 12.5 beta, where the driverkit 20.4 beta resides (according to https://developer.apple.com/support/xcode/) And what we have there? Just Kernel.framework/Versions/A/Headers/DriverKit/IOReturn.h 65:#define sub_iokit_scsi err_sub(16) And nothing more! So, the question is: do we have any way to use SCSI devices now on BigSur? Could I develop something for it with DriverKit, or should I use kext-approach for now, and wait for SCSI DriverKit support to be released indeed?
4
0
2.5k
Oct ’22
Does PCIDriverKit support PCI Device PNP?
I am woriking on SCSIControllerDriverKit IOUserSCSIParallelInterfaceController When I hot-plug my PCIe SCSI controller, the controller works normally, but when I hot remove the PCIe SCSI controller, the driverkit crashes. Thread 3 Crashed:: Dispatch queue: MyUserSpaceDriver-Default UserSpaceDriver-PCIe-hotremove.rtf.txt UserSpaceDriver-PCIe-hotremove.ips.txt
2
0
1.2k
Jan ’22
Does UserCreateTargetForID work for IOUserSCSIParallelInterfaceController?
I am working on SCSIControllerDriverKit UserSpaceDriver-UserCreateTargetForID.ips.txt I UserSpaceDriver-UserCreateTargetForID.rtf.txt OUserSCSIParallelInterfaceController My dext had follow this site description: https://developer.apple.com/documentation/scsicontrollerdriverkit/iouserscsiparallelinterfacecontroller/3567474-usercreatetargetforid But when the program calls: UserCreateTargetForID(scsi_target,targetOSDictionary) got panic.
0
0
1.3k
Dec ’21
Sending SCSI commands to USB mass storage device
Our device is USB Mass stroage device. We want to send a specific SCSI command to a USB drive in Mac OS X. Have any demo app that uses IOUserSCSIPeripheralDeviceType00 in SCSIPeripheralsDriverKit? We want to use below SCSI command, but have no demo program. https://developer.apple.com/documentation/scsiperipheralsdriverkit/3946437-inquiry https://developer.apple.com/documentation/scsiperipheralsdriverkit/iouserscsiperipheraldevicetype00/3946461-usersendcdb
Replies
0
Boosts
2
Views
1k
Activity
Nov ’22
SCSIControllerDriverKit: Process gets stuck on UserCreateTargetForID.
Context: We are working on migration of the driver, which is currently represented as a kernel extension, to the DriverKit framework. The driver works with Thunderbolt RAID storage devices. When connected through the Thunderbolt interface to the host, the device itself presents in the OS as a PCI device. The main function of our driver (.kext) is to create a "virtual" SCSI device in the OS for each virtual RAID array. So that the OS can work with these SCSI drives as usual disk storage.  We use https://developer.apple.com/documentation/scsicontrollerdriverkit to migrate this functionality in the dext version of the driver. Current issue: When a device is connected - the dext driver cannot create a SCSI drive in the OS. Technically our dext tries to create a SCSI drive using the UserCreateTargetForID method. On this step the OS sends the first SCSI command “Test Unit Ready ''to the device to check if it is a SCSI device. We process this command in an additional thread  separated from the main process of the dext (as it is recommended in the DriverKit documentation). We can see in the logs that the device receives this command and responses but when our dext sends this response to the OS the process is stuck in the waiting mode. How can we understand why it happens and fix it? More details: We are migrating functionality of an already existing “.kext” driver. We checked logs of the kext driver of this step: 15:06:17.902539+0700 Target device try to create for idx:0 15:06:17.902704+0700 Send command 0 for target 0 len 0 15:06:18.161777+0700 Complete command: 0 for target: 0 Len: 0 status: 0 flags: 0 15:06:18.161884+0700 Send command 18 for target 0 len 6 15:06:18.161956+0700 Complete command: 18 for target: 0 Len: 6 status: 0 flags: 0 15:06:18.162010+0700 Send command 18 for target 0 len 44 15:06:18.172972+0700 Complete command: 18 for target: 0 Len: 44 status: 0 flags: 0 15:06:18.275501+0700 Send command 18 for target 0 len 36 15:06:18.275584+0700 Complete command: 18 for target: 0 Len: 36 status: 0 flags: 0 15:06:18.276257+0700 Target device created for idx:0 We can see a successful message “Target device created for idx:0” In the the dext logs of the same step: We do not see the “Send command 18 for target 0 len 6” as we have in the kext logs  no log of the successful result “Target device created for idx:0” 15:54:10.903466+0700 Try to create target for 0 UUID 432421434863538456 15:54:10.903633+0700 UserDoesHBAPerformAutoSense 15:54:10.903763+0700 UserInitializeTargetForID 15:54:10.903876+0700 UserDoesHBASupportMultiPathing 15:54:10.904200+0700 UserProcessParallelTask start. 15:54:10.904298+0700 Sent command : 0 len 0 for target 0 15:54:11.163003+0700 Disable interrupts. 15:54:11.163077+0700 Complete cmd : 0 for target: 0 len: 0  status: 0 flags: 0 15:54:11.163085+0700 Enable interrupts. Will appreciate any help
Replies
3
Boosts
1
Views
1.5k
Activity
Nov ’22
Where is SCSIControllerDriverKit now?
Hi there! There was a presentation of the SCSI support in DriverKit on 2020 WWDC: https://developer.apple.com/videos/play/wwdc2020/10210/ Currently, the Xcode 12.4 (latest) has nothing regarding SCSI in DriverKit folders. Documentation says it is still in beta: https://developer.apple.com/documentation/scsicontrollerdriverkit So I've downloaded xcode 12.5 beta, where the driverkit 20.4 beta resides (according to https://developer.apple.com/support/xcode/) And what we have there? Just Kernel.framework/Versions/A/Headers/DriverKit/IOReturn.h 65:#define sub_iokit_scsi err_sub(16) And nothing more! So, the question is: do we have any way to use SCSI devices now on BigSur? Could I develop something for it with DriverKit, or should I use kext-approach for now, and wait for SCSI DriverKit support to be released indeed?
Replies
4
Boosts
0
Views
2.5k
Activity
Oct ’22
How to get LUN id of SCSI connected devices
Hi all I needed some help in getting the LUN id of all devices connected to the system especially for SCSI devices. I'm not able to find any such system command or a SCSI command. Thanks in advance.
Replies
2
Boosts
0
Views
1.7k
Activity
Sep ’22
MAP Protocol Connection
I would like to know whether MFI authentication is required to connect to Apple MAP protocol. Thank you very much!
Replies
0
Boosts
0
Views
683
Activity
Feb ’22
Does PCIDriverKit support PCI Device PNP?
I am woriking on SCSIControllerDriverKit IOUserSCSIParallelInterfaceController When I hot-plug my PCIe SCSI controller, the controller works normally, but when I hot remove the PCIe SCSI controller, the driverkit crashes. Thread 3 Crashed:: Dispatch queue: MyUserSpaceDriver-Default UserSpaceDriver-PCIe-hotremove.rtf.txt UserSpaceDriver-PCIe-hotremove.ips.txt
Replies
2
Boosts
0
Views
1.2k
Activity
Jan ’22
Does UserCreateTargetForID work for IOUserSCSIParallelInterfaceController?
I am working on SCSIControllerDriverKit UserSpaceDriver-UserCreateTargetForID.ips.txt I UserSpaceDriver-UserCreateTargetForID.rtf.txt OUserSCSIParallelInterfaceController My dext had follow this site description: https://developer.apple.com/documentation/scsicontrollerdriverkit/iouserscsiparallelinterfacecontroller/3567474-usercreatetargetforid But when the program calls: UserCreateTargetForID(scsi_target,targetOSDictionary) got panic.
Replies
0
Boosts
0
Views
1.3k
Activity
Dec ’21