[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux1394-user
Subject:    Re: powerfile c200
From:       Joe Ellis <joee () lithodyne ! net>
Date:       2004-02-23 8:33:46
Message-ID: 4039BAEA.1040206 () lithodyne ! net
[Download RAW message or body]



Dan Dennedy wrote:
> On Sun, 2004-02-22 at 15:35, Joe Ellis wrote:
> 
>>This is not specific to ieee1394.  But it is used.  That said, the 
>>problem turns out that there is some caching issue.  What happens is 
>>that when I load and unload the audio discs and read the disc id, I get 
>>the previous id (The disc id for a cddb lookup).  So when I read from 
>>the drive with the cached disc id, I get the scsi_read errors because 
>>its trying to read from a sector that no longer is invalid for what ever 
>>reason, which I think the drive is trying to read beyong a valid sector 
>>on the newly loaded disc.
> 
> 
> See my notes from the Linux 1394 Hardware Compatibility list:
> 
> http://www.linux1394.org/view_device.php?id=512
> 
> 	"After loading a disc into a drive one must send a SCSI STOP_START_UNIT
> request with the eject option."
> 
> and
> 	"You send the eject command not to the SCSI generic device that
> represents the changer control, but to the SCSI generic device that
> represents the drive."
> 
> 

I am sending a STOP_START_UNIT to the drive.  Not the changer.  I'm 
using the mtx version you have modified.  The drive spins up and I can 
then read it.  Then I eject it to spin it down and unload it.  When I 
load the next disc, send the STOP_START_UNIT and try to read it, it 
seems as though its the last disc.

mtx -f /dev/sg5 nobarcode load 1 0
mtx -f /dev/sg3 nobarcode eject # sg3 is mapped to scd1
cd-discid /dev/scd1 # get the disc id
mtx -f /dev/sg3 nobarcode eject
mtx -f /dev/sg5 nobarcode unload 1 0
mtx -f /dev/sg5 nobarcode load 2 0
mtx -f /dev/sg3 nobarcode eject
cd-discid /dev/scd1 # reports the same disc id

I got with James White who also has a powerfile c200.  He patched mtx to 
send the STOP_START_UNIT command using 'inject' and supresses the error 
that happens when sending it.

int Inject(DEVICE_TYPE fd) {
   CDB_T CDB;
   RequestSense_T RequestSense;
   /* okay, now for the command: */

   CDB[0]=0x1b;
   CDB[1]=CDB[2]=CDB[3]=CDB[5]=0;
   CDB[4]=0x02; /*send a SCSI START_STOP_UNIT request with the eject 
option to make it recognize new media.*/

   if (SCSI_ExecuteCommand(fd,Input,&CDB,6,NULL,0,&RequestSense) != 0) {
     return -1;  /* could not do! */
   }
   return 0; /* did do! */
}




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
mailing list Linux1394-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux1394-user
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic