• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Sending SCSI commands in Mac OS X
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sending SCSI commands in Mac OS X


  • Subject: Re: Sending SCSI commands in Mac OS X
  • From: Terry Lambert <email@hidden>
  • Date: Thu, 23 Jul 2009 20:55:45 -0700

Since no one else posted...

Apparently the last machine I used had your tools installed on, which generated BSD device stubs for my QIC tape drive when I plugged it it. 8-).

The officially supported interface is SCSITaskDeviceInterface, from a user client. Sorry for the confusion.

Rohan: This means "no, you can not use an ioctl".

-- Terry

On Jul 23, 2009, at 7:04 AM, email@hidden wrote:
Am 23.07.2009 um 13:26 schrieb Terry Lambert:
Did you go to <http://developer.apple.com> and read the document "SCSI Architecture Model Device Interface Guide"?

It states:

"By design, Mac OS X does not allow applications to send SCSI or ATA commands to storage devices unless the application developer also provides an in-kernel device driver that supports the commands."

One of the intents if this is to allow the driver to model state for such coomands such that the state if the device is known to the driver at all times.

For standard tape devices, you should not need to write your own driver; if you plug the device in, it will show up in /dev,

Never seen a tape drive, neither SCSI, FireWire, USB nor FibreChannel connected to Mac OS X 10.2 up to 10.5 which shows up in /dev. What device filename should I look for?


and you can at least issue reads, writes, and standard commands, such as causing a rewind, via the device file. For non-standard commands, such as you would use to control loading and unloading tapes in a tape robot, etc., you will need to write an in-kernel driver that knows how to talk to the hardware and subclasses the more generic device (i.e. the IOKit model lets you write only the missing pieces implementing the missing control commands; you don't write a whole driver that implements read/write/etc.).

Instead we use SCSITaskDeviceInterface functions from userland as described in Apple's SCSI Architecture Model Device Interface Guide "WorkingWithSAM.pdf" in order to implement a "SCSI pass-thru" functionality. No additional driver required.



Uwe



_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Sending SCSI commands in Mac OS X
      • From: email@hidden
    • Re: Sending SCSI commands in Mac OS X
      • From: Joel Reymont <email@hidden>
References: 
 >Sending SCSI commands in Mac OS X (From: rohan a <email@hidden>)
 >Re: Sending SCSI commands in Mac OS X (From: rohan a <email@hidden>)
 >Re: Sending SCSI commands in Mac OS X (From: Terry Lambert <email@hidden>)
 >Re: Sending SCSI commands in Mac OS X (From: email@hidden)

  • Prev by Date: Re: Sending SCSI commands in Mac OS X
  • Next by Date: Re: Sending SCSI commands in Mac OS X
  • Previous by thread: Re: Sending SCSI commands in Mac OS X
  • Next by thread: Re: Sending SCSI commands in Mac OS X
  • Index(es):
    • Date
    • Thread