From owner-svn-src-all@FreeBSD.ORG Thu Dec 18 21:13:46 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EBDB1065674; Thu, 18 Dec 2008 21:13:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 755AF8FC12; Thu, 18 Dec 2008 21:13:46 +0000 (UTC) (envelope-from mav@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 mBILDkLG052443; Thu, 18 Dec 2008 21:13:46 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBILDkwt052441; Thu, 18 Dec 2008 21:13:46 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200812182113.mBILDkwt052441@svn.freebsd.org> From: Alexander Motin Date: Thu, 18 Dec 2008 21:13:46 +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: r186296 - head/sys/dev/ata/chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Dec 2008 21:13:46 -0000 Author: mav Date: Thu Dec 18 21:13:46 2008 New Revision: 186296 URL: http://svn.freebsd.org/changeset/base/186296 Log: Before modularization commit, atapci driver was attaching only to devices of storage class. This check was lost. It is not important for the most cases, but as it was reported on current@, it does important for sis driver and surely inportant for AHCI driver. So restore it there. Submitted by: Toshikazu ICHINOSEKI, Andrey V. Elsukov Discussed on: current@ Modified: head/sys/dev/ata/chipsets/ata-ahci.c head/sys/dev/ata/chipsets/ata-sis.c Modified: head/sys/dev/ata/chipsets/ata-ahci.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-ahci.c Thu Dec 18 21:04:50 2008 (r186295) +++ head/sys/dev/ata/chipsets/ata-ahci.c Thu Dec 18 21:13:46 2008 (r186296) @@ -73,8 +73,9 @@ ata_ahci_probe(device_t dev) char buffer[64]; /* is this a possible AHCI candidate ? */ - if (pci_get_subclass(dev) != PCIS_STORAGE_SATA) - return ENXIO; + if (pci_get_class(dev) != PCIC_STORAGE || + pci_get_subclass(dev) != PCIS_STORAGE_SATA) + return (ENXIO); /* is this PCI device flagged as an AHCI compliant chip ? */ if (pci_read_config(dev, PCIR_PROGIF, 1) != PCIP_STORAGE_SATA_AHCI_1_0) Modified: head/sys/dev/ata/chipsets/ata-sis.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-sis.c Thu Dec 18 21:04:50 2008 (r186295) +++ head/sys/dev/ata/chipsets/ata-sis.c Thu Dec 18 21:13:46 2008 (r186296) @@ -105,6 +105,9 @@ ata_sis_probe(device_t dev) char buffer[64]; int found = 0; + if (pci_get_class(dev) != PCIC_STORAGE) + return (ENXIO); + if (pci_get_vendor(dev) != ATA_SIS_ID) return ENXIO;