From owner-svn-src-head@FreeBSD.ORG Thu Mar 12 06:30:59 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDA991065678; Thu, 12 Mar 2009 06:30:59 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CCCA58FC23; Thu, 12 Mar 2009 06:30:59 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n2C6UxBH019298; Thu, 12 Mar 2009 06:30:59 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n2C6UxT8019297; Thu, 12 Mar 2009 06:30:59 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200903120630.n2C6UxT8019297@svn.freebsd.org> From: Warner Losh Date: Thu, 12 Mar 2009 06:30:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189724 - head/sys/dev/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Mar 2009 06:31:00 -0000 Author: imp Date: Thu Mar 12 06:30:59 2009 New Revision: 189724 URL: http://svn.freebsd.org/changeset/base/189724 Log: Check the Disk FUNCE recorded in the CIS to see if we should probe for both disks, or if we should suppress the slave drive. Default to suppressing the slave, in the case that this REQIURED tuple turns out to not actually be present... Modified: head/sys/dev/ata/ata-card.c Modified: head/sys/dev/ata/ata-card.c ============================================================================== --- head/sys/dev/ata/ata-card.c Thu Mar 12 06:25:30 2009 (r189723) +++ head/sys/dev/ata/ata-card.c Thu Mar 12 06:30:59 2009 (r189724) @@ -90,6 +90,7 @@ ata_pccard_attach(device_t dev) struct ata_channel *ch = device_get_softc(dev); struct resource *io, *ctlio; int i, rid, err; + uint16_t funce; if (ch->attached) return (0); @@ -132,7 +133,11 @@ ata_pccard_attach(device_t dev) /* initialize softc for this channel */ ch->unit = 0; - ch->flags |= (ATA_USE_16BIT | ATA_NO_SLAVE); + ch->flags |= ATA_USE_16BIT; + funce = 0; /* Default to sane setting of FUNCE */ + pccard_get_funce_disk(dev, &funce); + if (!(funce & PFD_I_D)) + ch-> flags |= ATA_NO_SLAVE; ata_generic_hw(dev); err = ata_probe(dev); if (err)