From jflemer@psi.speednaked.com  Mon Nov 28 01:38:14 2005
Return-Path: <jflemer@psi.speednaked.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 3DDCA16A424;
	Mon, 28 Nov 2005 01:38:13 +0000 (GMT)
	(envelope-from jflemer@psi.speednaked.com)
Received: from psi.speednaked.com (c-67-166-49-88.hsd1.co.comcast.net [67.166.49.88])
	by mx1.FreeBSD.org (Postfix) with ESMTP id D8E9943D5C;
	Mon, 28 Nov 2005 01:38:11 +0000 (GMT)
	(envelope-from jflemer@psi.speednaked.com)
Received: from psi.speednaked.com (localhost [127.0.0.1])
	by psi.speednaked.com (8.13.4/8.13.4) with ESMTP id jAS1cA4K019581;
	Sun, 27 Nov 2005 18:38:10 -0700 (MST)
	(envelope-from jflemer@psi.speednaked.com)
Received: (from jflemer@localhost)
	by psi.speednaked.com (8.13.4/8.13.4/Submit) id jAS1c9XF019580;
	Sun, 27 Nov 2005 18:38:09 -0700 (MST)
	(envelope-from jflemer)
Message-Id: <200511280138.jAS1c9XF019580@psi.speednaked.com>
Date: Sun, 27 Nov 2005 18:38:09 -0700 (MST)
From: "James E. Flemer" <jflemer@alum.rpi.edu>
Reply-To: "James E. Flemer" <jflemer@alum.rpi.edu>
To: FreeBSD-gnats-submit@freebsd.org
Cc: sos@freebsd.org, jflemer@alum.rpi.edu
Subject: [patch] acd returns incorrect DVD region info (rmi)
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         89650
>Category:       kern
>Synopsis:       [ata] [patch] acd returns incorrect DVD region info (rmi)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    sos
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 28 01:40:03 GMT 2005
>Closed-Date:    Wed Jan 04 21:37:10 GMT 2006
>Last-Modified:  Wed Jan 04 21:37:10 GMT 2006
>Originator:     James E. Flemer
>Release:        FreeBSD 6.0-STABLE i386
>Organization:
n/a
>Environment:
System: FreeBSD null.speednaked.com 6.0-STABLE FreeBSD 6.0-STABLE #2: Thu Nov 24 11:50:28 MST 2005 jflemer@minus.speednaked.com:/usr/obj/usr/src/sys/NULL6 i386

>Description:
	The DVDIOCREADSTRUCTURE ioctl for acd (atapi-cd) returns an incorrect
	value for the rmi field (region management info) when the
	DVD_STRUCT_COPYRIGHT format is requested.  It actually returns the
	value for the cpst field instead.
>How-To-Repeat:
	Use the DVDIOCREADSTRUCTURE/DVD_STRUCT_COPYRIGHT ioctl on cd0 and
	compare it to acd0.  Or compare the ioctl on acd0 to:
	> camcontrol cmd -n acd -u 0 -v -c "ad 0 0 0 0 0 0 1 0 8 0 0" -i 8 "i2 i1 i1 i1 i1 i1 i1"
>Fix:

	Apply patch below.

--- atapi-cd_rmi.diff begins here ---
Index: sys/dev/ata/atapi-cd.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/ata/atapi-cd.c,v
retrieving revision 1.179.2.1
diff -u -b -u -r1.179.2.1 atapi-cd.c
--- sys/dev/ata/atapi-cd.c	25 Aug 2005 16:21:05 -0000	1.179.2.1
+++ sys/dev/ata/atapi-cd.c	27 Nov 2005 23:48:47 -0000
@@ -1505,7 +1505,7 @@
 
     case DVD_STRUCT_COPYRIGHT:
 	s->cpst = d->data[0];
-	s->rmi = d->data[0];
+	s->rmi = d->data[1];
 	break;
 
     case DVD_STRUCT_DISCKEY:
--- atapi-cd_rmi.diff ends here ---
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->sos 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Nov 28 02:10:23 GMT 2005 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=89650 
State-Changed-From-To: open->closed 
State-Changed-By: sos 
State-Changed-When: Wed Jan 4 21:36:29 UTC 2006 
State-Changed-Why:  
Committed to -current, MFC to RELENG_6 will follow. 

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