ATAPICAM support for IDE Tape drive

Rohit Jalisatgi rjalisatgi at yahoo.com
Thu Aug 21 14:51:02 PDT 2003


HI ALL,

The patch below (from
Thomas.Quinot at Cuivre.FR.EU.ORG)did solve the problem
with the 6 byte READ(08) CDB.

But now I am having problem with the WRITE(0A)
command.

With the following CDB

CDB: 0x0A 0x01 0x00 0x00 0x7F 0x00

cam_snd_ccb() returns error

Also I get the following error message on the console

cam_periph_mapmem: attempt to map 68608 bytes, which
is greater than 
DFLTPYS(65536)

The current BlockLength has been set to 512 in the
Mode Select Parameter 
block descriptor.

Prior to the above write cdb I did suceed in writing a
block to the tape.
The following CDB : 0x0A 0x01 0x00 0x00 0x01 0x00 did
succeed.

Could anyone please help me out with this problem?

Thanks.

Rohit

>From: Thomas Quinot <thomas at cuivre.fr.eu.org>
>Reply-To: Thomas Quinot <thomas at cuivre.fr.eu.org>
>To: Rohit Jalisatgi <rjalisatgi at hotmail.com>
>CC: atapicam at cuivre.fr.eu.org
>Subject: Re: [Atapicam] ATAPICAM support Seagate TR5
Tape drive
>Date: Thu, 21 Aug 2003 11:26:34 +0200
>
>Le 2003-08-20, Rohit Jalisatgi écrivait :
>
> >    <Seagate STT20000A 8A51> at scbus1 target 0 lun
0 (sa0, pass0)
> >    The following READ CDB gives me an error
> >    CDB: 0x08 0x01 0x00 0x00 0x01 0x00
> >    SenseKey : 0x05 ie Illegal Request
> >    Additional Sense: 0x20 0x00 ie Invalid
operation code.
>
>Ah, interesting. The 0x08 opcode (READ_6) is
translated internally by
>the ATAPI/CAM layer to READ_10, and that might
confuse the drive. Could
>you apply the patch below and see if it works around
the problem? (note
>that it might cause failures with other ATAPI units,
such as CD-ROM
>drives, though: this is just a test to confirm the
origin of the
>problem, not an actual fix.)
>
>Thomas.
>
>Index: atapi-cam.c
>===================================================================
>RCS file: /home/ncvs/src/sys/dev/ata/atapi-cam.c,v
>retrieving revision 1.18
>diff -u -r1.18 atapi-cam.c
>--- atapi-cam.c	28 Jul 2003 06:15:58 -0000	1.18
>+++ atapi-cam.c	21 Aug 2003 09:24:13 -0000
>@@ -408,6 +408,7 @@
>  	    }
>  	    break;
>  	}
>+#if 0
>  	case READ_6:
>  	    /* FALLTHROUGH */
>
>@@ -426,6 +427,7 @@
>  	    hcb->cmd[2] = 0;
>  	    hcb->cmd[1] = 0;
>  	    break;
>+#endif
>  	}
>
>  	if ((ccb_h->flags & CAM_DIR_MASK) == CAM_DIR_IN &&
(len & 1)) {
>
>--
>     Thomas.Quinot at Cuivre.FR.EU.ORG


--- jasondic at sbcglobal.net wrote:
> Hi Nate,
> 
>    6 Byte MODE SENSE/SELECT READ/WRITE are usually
> the norm for all IDE tape 
> drives.
> 
> -Jason
> 
> On Wednesday 20 August 2003 16:55, Nate Lawson
> wrote:
> > On Wed, 20 Aug 2003, Rohit Jalisatgi wrote:
> > > > camcontrol devlist
> > >
> > > <Seagate STT20000A 8A51> at scbus1 target 0 lun
> 0
> > > (sa0, pass0)
> > >
> > > The following READ CDB gives me an error
> > >
> > > CDB: 0x08 0x01 0x00 0x00 0x01 0x00
> > >
> > > Scsi Status: 0x02
> > >
> > > Sense Data: 0x70 0x00 0x05 0x00 0x00 0x00 0x00
> 0x0a
> > > 0x00 0x00 0x00 0x00
> > > 0x20 0x00
> > >
> > > SenseKey : 0x05 ie Illegal Request
> > > Additional Sense: 0x20 0x00 ie Invalid operation
> code.
> >
> > That means it doesn't like 6 byte commands.
> >
> > > Could anyone please help me with the above
> error?
> > >
> > > Do I need to apply any patches to the ATAPICAM?
> Does
> > > the ATAPICAM
> > > support IDE tape drives.
> >
> > I may need to add sa(4) support for the
> PIM_NO_6_BYTE flag.  Can someone
> > else remind me if 6 byte commands are ever legal
> for some ATAPI devices?
> > I can't remember if there were any exceptions or
> if 10 byte is the
> > minimum.
> >
> > -Nate
> > _______________________________________________
> > freebsd-scsi at freebsd.org mailing list
> >
>
http://lists.freebsd.org/mailman/listinfo/freebsd-scsi
> > To unsubscribe, send any mail to
> "freebsd-scsi-unsubscribe at freebsd.org"
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


More information about the freebsd-scsi mailing list