From alex@alexwang.com  Thu Dec 12 06:53:01 2002
Return-Path: <alex@alexwang.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id DC68E37B404
	for <freebsd-gnats-submit@freebsd.org>; Thu, 12 Dec 2002 06:53:01 -0800 (PST)
Received: from alexwang.com (alexwang.com [61.218.0.204])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 9723243EC2
	for <freebsd-gnats-submit@freebsd.org>; Thu, 12 Dec 2002 06:53:00 -0800 (PST)
	(envelope-from alex@alexwang.com)
Received: (from root@localhost)
	by alexwang.com (8.12.6/8.12.6) id gBCErD2X003888
	for freebsd-gnats-submit@freebsd.org; Thu, 12 Dec 2002 22:53:13 +0800 (CST)
Received: from alexwang.com (localhost.alexwang.com [127.0.0.1])
	by alexwang.com (8.12.6/8.12.6av) with ESMTP id gBCEqVj3003873
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 12 Dec 2002 22:53:08 +0800 (CST)
Received: (from root@localhost)
	by alexwang.com (8.12.6/8.12.6/Submit) id gBCEqOlK003872;
	Thu, 12 Dec 2002 22:52:24 +0800 (CST)
Message-Id: <200212121452.gBCEqOlK003872@alexwang.com>
Date: Thu, 12 Dec 2002 22:52:24 +0800 (CST)
From: Alex Wang <alex@alexwang.com>
Reply-To: Alex Wang <alex@alexwang.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] Can't max-use the DDS-2 and DDS-4 tape in HP DAT 40 tape drive
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         46209
>Category:       kern
>Synopsis:       [PATCH] Can't max-use the DDS-2 and DDS-4 tape in HP DAT 40 tape drive
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    trhodes
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 12 07:00:17 PST 2002
>Closed-Date:    Tue Dec 17 09:30:53 PST 2002
>Last-Modified:  Tue Dec 17 09:30:53 PST 2002
>Originator:     Alex Wang
>Release:        FreeBSD 4.7-RELEASE i386
>Organization:
>Environment:
System: FreeBSD alexwang.com 4.7-RELEASE FreeBSD 4.7-RELEASE #0: Mon Oct 14 05:21:51 CST 2002 alex@alexwang.com:/usr/src/sys/compile/ALEX i386


	
>Description:
I am using the HP DAT 40 tape drive. I found that I can't mix-use
the DDS-2 and DDS-4 tapes.

If I insert DDS-4 tape in the tape drive at boot time, I can
write and read both DDS-2 and DDS-4 tapes. At that moment,
the block size is 1024 KB. Next time I insert DDS-2 in the tape
device at boot time. The block size becomes variable and I am
not able to read the data in both DDS-2 and DDS-4.

I know that I could use mt(1) to set the blocksize. But I suggest
that we could add this in scsi driver. I spent a lot of time to
find out this problem and don't want other to waste their time
again.

Thanks,

Wang, Chun-Pin (Alex Wang)
	
>How-To-Repeat:
	
>Fix:

	

--- scsi_sa.patch begins here ---
Index: scsi_sa.c
===================================================================
RCS file: /home/ncvs/src/sys/cam/scsi/scsi_sa.c,v
retrieving revision 1.45.2.12
diff -u -b -r1.45.2.12 scsi_sa.c
--- scsi_sa.c	2002/08/02 06:25:56	1.45.2.12
+++ scsi_sa.c	2002/12/12 14:42:26
@@ -306,6 +306,10 @@
 #endif
 	{
 		{ T_SEQUENTIAL, SIP_MEDIA_REMOVABLE, "HP",
+		  "C56*", "*"}, SA_QUIRK_VARIABLE|SA_QUIRK_2FM, 0
+	},
+	{
+		{ T_SEQUENTIAL, SIP_MEDIA_REMOVABLE, "HP",
 		  "T20*", "*"}, SA_QUIRK_FIXED|SA_QUIRK_1FM, 512
 	},
 	{
--- scsi_sa.patch ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: trhodes 
State-Changed-When: Mon Dec 16 09:42:58 PST 2002 
State-Changed-Why:  
A different version of this patch has been committed to current.  Set 
`patched' until I MFC.  Thanks for the submission! 


Responsible-Changed-From-To: freebsd-bugs->trhodes 
Responsible-Changed-By: trhodes 
Responsible-Changed-When: Mon Dec 16 09:42:58 PST 2002 
Responsible-Changed-Why:  
A different version of this patch has been committed to current.  Set 
`patched' until I MFC.  Thanks for the submission! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=46209 
State-Changed-From-To: patched->closed 
State-Changed-By: trhodes 
State-Changed-When: Tue Dec 17 09:30:20 PST 2002 
State-Changed-Why:  
Patched in both current and stable.  Thanks for the submission! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=46209 
>Unformatted:
