From owner-acpi-jp@jp.FreeBSD.org Thu Jan 23 05:42:40 2003
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id h0MKget86070;
	Thu, 23 Jan 2003 05:42:40 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from caduceus.jf.intel.com (fmr06.intel.com [134.134.136.7])
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) with ESMTP/inet id h0MKgdJ86065
	for <acpi-jp@jp.FreeBSD.org>; Thu, 23 Jan 2003 05:42:39 +0900 (JST)
	(envelope-from robert.moore@intel.com)
Received: from talaria.jf.intel.com (talaria.jf.intel.com [10.7.209.7])
	by caduceus.jf.intel.com (8.11.6/8.11.6/d: outer.mc,v 1.51 2002/09/23 20:43:23 dmccart Exp $) with ESMTP id h0MKcqa04398
	for <acpi-jp@jp.FreeBSD.org>; Wed, 22 Jan 2003 20:38:52 GMT
Received: from orsmsxvs040.jf.intel.com (orsmsxvs040.jf.intel.com [192.168.65.206])
	by talaria.jf.intel.com (8.11.6/8.11.6/d: inner.mc,v 1.28 2003/01/13 19:44:39 dmccart Exp $) with SMTP id h0MKNM103917
	for <acpi-jp@jp.FreeBSD.org>; Wed, 22 Jan 2003 20:23:24 GMT
Received: from orsmsx26.jf.intel.com ([192.168.65.26])
 by orsmsxvs040.jf.intel.com (NAVGW 2.5.2.11) with SMTP id M2003012212485514522
 ; Wed, 22 Jan 2003 12:48:55 -0800
Received: by orsmsx26.jf.intel.com with Internet Mail Service (5.5.2653.19)
	id <DL5Z35RA>; Wed, 22 Jan 2003 12:42:30 -0800
Message-ID: <B9ECACBD6885D5119ADC00508B68C1EA0D19BA4A@orsmsx107.jf.intel.com>
From: "Moore, Robert" <robert.moore@intel.com>
To: "'acpi-jp@jp.FreeBSD.org'" <acpi-jp@jp.FreeBSD.org>
Cc: bsd-nomads@clave.gr.jp
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain
Reply-To: acpi-jp@jp.FreeBSD.org
Precedence: list
Date: Wed, 22 Jan 2003 12:42:26 -0800
X-Sequence: acpi-jp 2068
Subject: [acpi-jp 2068] RE: ACPI PCI IDE driver.
Errors-To: owner-acpi-jp@jp.FreeBSD.org
Sender: owner-acpi-jp@jp.FreeBSD.org
X-Originator: robert.moore@intel.com
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+030107

Zero length buffer is not permitted.  _STM assumes a valid image.

A drive that won't ID is a fatal error -- either don't call _STM, or call it
with a basic PIO mode image.

Bob


-----Original Message-----
From: takawata@axe-inc.co.jp [mailto:takawata@axe-inc.co.jp] 
Sent: Wednesday, January 22, 2003 10:42 AM
To: acpi-jp@jp.FreeBSD.org
Cc: bsd-nomads@clave.gr.jp
Subject: [acpi-jp 2067] ACPI PCI IDE driver.

Hi, I am writing a driver for ACPI capable IDE on PCI, 
as descrived ACPI spec 2.0 Section 10.8.
and now each device know about ACPI and each channel 
driver call "_GTM" on sleep and call "_STM" on wakeup.
(Not yet use "_GTF" for now.)
Now I have two questions.

When ATA or ATAPI identify failed,  which value should I 
pass to the _STM method? ZERO length buffer? ZERO Filled buffer?
Or any other object?

Is Zero Length buffer argument permited?
When I try to pass Zero length with NULL pointer attached
to _STM method to indicate the IDENTIFY request is failed,
I get following error from ACPICA:
-0540: *** Error: UtCallocate: Attempt to allocate zero bytes.
and method execution will fail.
How can I do? 
Now I fill the dummy value.

The code is as follows.


