From owner-freebsd-scsi@FreeBSD.ORG Thu Aug 21 14:51:02 2003 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2ED7816A4BF for ; Thu, 21 Aug 2003 14:51:02 -0700 (PDT) Received: from web80510.mail.yahoo.com (web80510.mail.yahoo.com [66.218.79.80]) by mx1.FreeBSD.org (Postfix) with SMTP id A1E6443FDD for ; Thu, 21 Aug 2003 14:51:01 -0700 (PDT) (envelope-from rjalisatgi@yahoo.com) Message-ID: <20030821215101.82009.qmail@web80510.mail.yahoo.com> Received: from [4.21.59.2] by web80510.mail.yahoo.com via HTTP; Thu, 21 Aug 2003 14:51:01 PDT Date: Thu, 21 Aug 2003 14:51:01 -0700 (PDT) From: Rohit Jalisatgi To: jasondic@sbcglobal.net, Nate Lawson In-Reply-To: <200308201800.51405.jasondic@sbcglobal.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: freebsd-scsi@freebsd.org Subject: Re: ATAPICAM support for IDE Tape drive X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2003 21:51:02 -0000 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 >Reply-To: Thomas Quinot >To: Rohit Jalisatgi >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 : > > > 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 > > > > > > 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