Date: Thu, 21 Aug 2003 14:51:01 -0700 (PDT) From: Rohit Jalisatgi <rjalisatgi@yahoo.com> To: jasondic@sbcglobal.net, Nate Lawson <nate@root.org> Cc: freebsd-scsi@freebsd.org Subject: Re: ATAPICAM support for IDE Tape drive Message-ID: <20030821215101.82009.qmail@web80510.mail.yahoo.com> In-Reply-To: <200308201800.51405.jasondic@sbcglobal.net>
next in thread | previous in thread | raw e-mail | index | archive | help
HI ALL, The patch below (from Thomas.Quinot@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@cuivre.fr.eu.org> >Reply-To: Thomas Quinot <thomas@cuivre.fr.eu.org> >To: Rohit Jalisatgi <rjalisatgi@hotmail.com> >CC: atapicam@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@Cuivre.FR.EU.ORG --- jasondic@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@freebsd.org mailing list > > > http://lists.freebsd.org/mailman/listinfo/freebsd-scsi > > To unsubscribe, send any mail to > "freebsd-scsi-unsubscribe@freebsd.org" > __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030821215101.82009.qmail>