SG_GET_VERSION_NUM rejected on scsi device?

From: H.Rosmanith (Kernel Mailing List)
Date: Mon Dec 27 2004 - 17:08:59 EST



good evening,

I have a old Plextor CD-R, native scsi, attached to an AHA_2940.
looks like this:

scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.36
<Adaptec 2940 SCSI adapter>
aic7870: Single Channel A, SCSI Id=7, 16/253 SCBs

blk: queue dd3b3218, I/O limit 4095Mb (mask 0xffffffff)
resize_dma_pool: unknown device type -1
(scsi0:A:4): 10.000MB/s transfers (10.000MHz, offset 8)
Vendor: PLEXTOR Model: CD-R PX-W124TS Rev: 1.00
Type: CD-ROM ANSI SCSI revision: 02
blk: queue dd3b3018, I/O limit 4095Mb (mask 0xffffffff)
Attached scsi CD-ROM sr0 at scsi0, channel 0, id 4, lun 0
sr0: scsi3-mmc drive: 32x/32x writer cd/rw xa/form2 cdda tray


now, I do an ioctl(SG_GET_VERSION_NUM) (0x2282), and that fails:

open("/dev/sr0", O_RDONLY) = 3
ioctl(3, 0x2282, 0xbffff660) = -1 EINVAL (Invalid argument)

on the other hand, I can sucessfully mount /dev/sr0, e.g.:

bash-2.05# df
...
/dev/sr0 110998 110998 0 100% /mnt

kernel is 2.4.28, but since this is a native scsi device, that should
not matter, right?

so, what's wrong here?

/herp

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/