From owner-svn-src-stable@FreeBSD.ORG Wed Dec 16 18:39:32 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C45CF1065670; Wed, 16 Dec 2009 18:39:32 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 98E7B8FC12; Wed, 16 Dec 2009 18:39:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBGIdWsp007457; Wed, 16 Dec 2009 18:39:32 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBGIdW2d007453; Wed, 16 Dec 2009 18:39:32 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200912161839.nBGIdW2d007453@svn.freebsd.org> From: Marius Strobl Date: Wed, 16 Dec 2009 18:39:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200611 - in stable/8/sys/dev/ata: . chipsets X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Dec 2009 18:39:32 -0000 Author: marius Date: Wed Dec 16 18:39:32 2009 New Revision: 200611 URL: http://svn.freebsd.org/changeset/base/200611 Log: MFC: r200459 Unbreak the ata_atapi() usage. Since r200171 (MFC'ed in r200432) the mode setting functions get a ata_device type device passed instead of a ata_channel one, thus ata_atapi() has to be adjusted accordingly. Reviewed by: mav Modified: stable/8/sys/dev/ata/ata-all.c stable/8/sys/dev/ata/ata-all.h stable/8/sys/dev/ata/chipsets/ata-ite.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/ata-all.c ============================================================================== --- stable/8/sys/dev/ata/ata-all.c Wed Dec 16 18:03:35 2009 (r200610) +++ stable/8/sys/dev/ata/ata-all.c Wed Dec 16 18:39:32 2009 (r200611) @@ -1150,12 +1150,11 @@ ata_satarev2str(int rev) } int -ata_atapi(device_t dev) +ata_atapi(device_t dev, int target) { - struct ata_channel *ch = device_get_softc(device_get_parent(dev)); - struct ata_device *atadev = device_get_softc(dev); + struct ata_channel *ch = device_get_softc(dev); - return (ch->devices & (ATA_ATAPI_MASTER << atadev->unit)); + return (ch->devices & (ATA_ATAPI_MASTER << target)); } int Modified: stable/8/sys/dev/ata/ata-all.h ============================================================================== --- stable/8/sys/dev/ata/ata-all.h Wed Dec 16 18:03:35 2009 (r200610) +++ stable/8/sys/dev/ata/ata-all.h Wed Dec 16 18:39:32 2009 (r200611) @@ -622,7 +622,7 @@ void ata_udelay(int interval); char *ata_unit2str(struct ata_device *atadev); const char *ata_mode2str(int mode); const char *ata_satarev2str(int rev); -int ata_atapi(device_t dev); +int ata_atapi(device_t dev, int target); int ata_pmode(struct ata_params *ap); int ata_wmode(struct ata_params *ap); int ata_umode(struct ata_params *ap); Modified: stable/8/sys/dev/ata/chipsets/ata-ite.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-ite.c Wed Dec 16 18:03:35 2009 (r200610) +++ stable/8/sys/dev/ata/chipsets/ata-ite.c Wed Dec 16 18:39:32 2009 (r200611) @@ -212,12 +212,12 @@ ata_ite_8213_setmode(device_t dev, int t reg40 |= 0x4033; /* Set PIO/WDMA timings. */ if (target == 0) { - reg40 |= (ata_atapi(dev) ? 0x04 : 0x00); + reg40 |= (ata_atapi(dev, target) ? 0x04 : 0x00); mask40 = 0x3300; new40 = timings[ata_mode2idx(piomode)] << 8; } else { - reg40 |= (ata_atapi(dev) ? 0x40 : 0x00); + reg40 |= (ata_atapi(dev, target) ? 0x40 : 0x00); mask44 = 0x0f; new44 = ((timings[ata_mode2idx(piomode)] & 0x30) >> 2) | (timings[ata_mode2idx(piomode)] & 0x03);