Linux SCSI generic (sg) driver?

Is there a way to get the Linux SCSI generic driver working under FreeBSD?

I'm trying to get Seatools Enterprise for linux working, but it doesn't like FreeBSD's native /dev/daN devices:
Code:
vault# ./st -i /dev/da16 
A SCSI device name is required
: Inappropriate ioctl for device
Couldn't find sg device corresponding to /dev/da16

sysutils/sg3_utils has all the companion utilities, but I can't see any way to load the driver.
 
The port just uses the binary from Seagate. If you build it yourself, you'll see that it asks you to download seatools from the provided URL and put it in /usr/ports/distfiles.

The end result is the same.
 
Not exactly. The port also installs the Linux binary compatibility and makes sure the Linux binary is run through it. And that's the part you need.
 
That may be, but the binary is still looking for the sg device.
There is a sg(4) driver, but it is not documented (other than in the source) and does not provide anywhere near the range of capabilities found in the native FreeBSD pass(4) driver. You could start here.

Unfortunately, most binaries that use the sg(4) device want to use it for things that are not supported in the FreeBSD implementation. Patches to expand the range of emulated functions would probably be welcome, but to be honest most of the limited development effort in this area is concentrated on the pass(4) device. And even there, it took a nearly 5 years after one pass(4) function was broken before someone (me) noticed and reported a crippling bug (for some applications) - see PR 218572 for the gory details.
 
Back
Top