Fwd: Re: Fwd: [MPlayer-users] SCSI emulation

Bob Lockie bjlockie at lockie.ca
Mon Jan 6 03:01:49 CET 2003


H}kan Hjort wrote:

>Sun Jan 05 2003, Bob Lockie wrote:
>  
>
>>H}kan Hjort wrote:
>>    
>>
>>>Sat Jan 04 2003, Bob Lockie wrote:
>>>      
>>>
>>>>H}kan Hjort wrote:
>>>>
>>>>>Could you try the following too?  This is a small utility that accesses 
>>>>>and prints a bunch of info from the drive and disc in it.
>>>>>
>>>>Of course it is flaky and seems to work today. :-(
>>>>I ran the tests anyways, maybe the "invalid argument" errors should not 
>>>>be there anyways.
>>>>
>>>Humm.. wierd.
>>>
>>>>>http://www.dtek.chalmers.se/~dvd/dist/dvd_test.tar.gz
>>>>>
>>>>>compile by running the 'build.sh' script and run with
>>>>>'./dvd_test /dev/dvd >& dvd_test.logX'
>>>>>this should print a bunch of stuff. Do this for the different 
>>>>>configurations
>>>>>dma on/off ide-scsi on/off and send the output to me.  
>>>>>Does it make any difference depending on the DVD movie/disc used?
>>>>>
>>>>No, it failed on the 3 discs I tried.
>>>>
>>>>>Ejecting / intering the disc?  Having it mounted or not?  
>>>>>I'll write a summary of anything intresting for the list.
>>>>>
>>>># hdparm -d /dev/sr1
>>>>/dev/sr1 not supported by hdparm
>>>>How do I enable DMA for an emulated IDE DVD drive?
>>>>
>>>Changing the DMA status is done by reprogramming the IDE chipset/bus,
>>>so even when it's using ide-scsi emulation you need to use the underlying
>>>ide node to change it.  So /dev/hdc for you, and then read/test on the
>>>/dev/sr1 node.  Your sure sr1 is the DVD?
>>>
>>That was my guess but /dev/hdc disappears when I use SCSI emulation.
>># ll /dev/hdc
>>ls: /dev/hdc: No such file or directory
>>
>A side effect of using devfs perhaps?  There should be some trace of
>the ide device still, should there not?  Or there will be a general
>problem with things like DMA!
>
The only thing I could find is in /proc but I can't check DMA for hdc there.

#hdparm /proc/ide/hdc
/proc/ide/hdc not supported by hdparm

Should I look somewhere else?

# ll /proc/ide
total 0
-r--r--r--    1 root     root            0 Jan  5 19:53 drivers
lrwxrwxrwx    1 root     root            8 Jan  5 19:53 hda -> ide0/hda
lrwxrwxrwx    1 root     root            8 Jan  5 19:53 hdb -> ide0/hdb
lrwxrwxrwx    1 root     root            8 Jan  5 19:53 hdc -> ide1/hdc
dr-xr-xr-x    4 root     root            0 Jan  5 19:53 ide0
dr-xr-xr-x    3 root     root            0 Jan  5 19:53 ide1
-r--r--r--    1 root     root            0 Jan  5 19:53 sis

# ll /proc/ide/ide1
total 0
-r--r--r--    1 root     root            0 Jan  5 19:53 channel
-rw-r--r--    1 root     root            0 Jan  5 19:53 config
dr-xr-xr-x    2 root     root            0 Jan  5 19:53 hdc
-r--r--r--    1 root     root            0 Jan  5 19:53 mate
-r--r--r--    1 root     root            0 Jan  5 19:53 model

>[snip] 
>  
>
>>Maybe I forgot to change the link for /dev to /dev/sr1.
>>With SCSI emulation it appears that the /dev/dvd link cannot point to 
>>/dev/cdrom (even if that points to the correct device).
>>
>That's strange.
>
>The only thing I see that migth mess things up here is that for CSS
>authentication and key exchange one has do make a few ioctl calls, to
>ba able to do that one needs to have both read & write permission.
>  
>
>For SCSI emulation you had
>
>lr-xr-xr-x    1 root     root            8 Jan  4 07:00 /dev/dvd -> /dev/sr1
>brw-rw----    1 root     cdrecording  11,   1 Dec 31  1969 /dev/dvd
>
>and for normal IDE
>lr-xr-xr-x    1 root     root           10 Jan  4 15:12 /dev/dvd -> /dev/cdrom
>brw-rw-rw-    1 root     root      22,   0 Dec 31  1969 /dev/dvd
>
>So unless you are a member of the cdrecording group you don't have 
>'rw' permissions in the SCSI emulation case.
>
>>lr-xr-xr-x    1 root     root            8 Jan  4 07:00 /dev/dvd -> /dev/sr1
>>brw-rw----    1 root     cdrecording  11,   1 Dec 31  1969 /dev/dvd
>>
>>and for normal IDE
>>lr-xr-xr-x    1 root     root           10 Jan  4 15:12 /dev/dvd -> /dev/cdrom
>>brw-rw-rw-    1 root     root      22,   0 Dec 31  1969 /dev/dvd
>>
>>So unless you are a member of the cdrecording group you don't have 
>>'rw' permissions in the SCSI emulation case.
>>
No, everything is owned by root and group root:

When SCSI emulation is enabled.

# ll /dev/dvd
lr-xr-xr-x    1 root     root            8 Jan  5 12:57 /dev/dvd -> 
/dev/sr1

# ll /dev/cdrom
lr-xr-xr-x    1 root     root           13 Jan  5 12:53 /dev/cdrom -> 
cdroms/cdrom0

# ll /dev/cdroms/cdrom0
lr-xr-xr-x    1 root     root           34 Dec 31  1969 
/dev/cdroms/cdrom0 -> ../scsi/host0/bus0/target1/lun0/cd


Without SCSI emulation.

# ll /dev/sr1
ls: /dev/sr1: No such file or directory

# ll /dev/dvd
lr-xr-xr-x    1 root     root           10 Jan  5 13:45 /dev/dvd -> 
/dev/cdrom

# ll /dev/cdrom
lr-xr-xr-x    1 root     root           13 Jan  5 13:45 /dev/cdrom -> 
cdroms/cdrom0

# ll /dev/cdroms/cdrom0
lr-xr-xr-x    1 root     root           33 Dec 31  1969 
/dev/cdroms/cdrom0 -> ../ide/host0/bus1/target0/lun0/cd

# ll /dev/hdc
lr-xr-xr-x    1 root     root           30 Jan  5 08:05 /dev/hdc -> 
ide/host0/bus1/target0/lun0/cd


>Another thing is that for all the logs reading sector (lba) 512 and later
>failed.
>
Did even the direct IDE show that?
Maybe I have a hardware problem.

-- 
----------------------------------------
Sent from Mozilla and GNU/Linux.
Powered by an AMD processor.


-- 
This is the libdvdcss-devel mailing-list, see http://www.videolan.org/libdvdcss/
To unsubscribe, please read http://www.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the libdvdcss-devel mailing list