From owner-svn-src-head@freebsd.org Wed Oct 21 17:27:45 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F078A1B91D; Wed, 21 Oct 2015 17:27:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB32E12C4; Wed, 21 Oct 2015 17:27:44 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9LHRhYo043965; Wed, 21 Oct 2015 17:27:43 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LHRhs4043964; Wed, 21 Oct 2015 17:27:43 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510211727.t9LHRhs4043964@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 21 Oct 2015 17:27:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289707 - head/sys/dev/ata/chipsets X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Wed, 21 Oct 2015 17:27:45 -0000 Author: mav Date: Wed Oct 21 17:27:43 2015 New Revision: 289707 URL: https://svnweb.freebsd.org/changeset/base/289707 Log: Pass proper device to pci_read_config(). For some reason JMicron driver was different from others at this point. Modified: head/sys/dev/ata/chipsets/ata-jmicron.c Modified: head/sys/dev/ata/chipsets/ata-jmicron.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-jmicron.c Wed Oct 21 16:32:01 2015 (r289706) +++ head/sys/dev/ata/chipsets/ata-jmicron.c Wed Oct 21 17:27:43 2015 (r289707) @@ -142,12 +142,13 @@ ata_jmicron_ch_attach(device_t dev) static int ata_jmicron_setmode(device_t dev, int target, int mode) { - struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); + device_t parent = device_get_parent(dev); + struct ata_pci_controller *ctlr = device_get_softc(parent); mode = min(mode, ctlr->chip->max_dma); /* check for 80pin cable present */ if (ata_dma_check_80pin && mode > ATA_UDMA2 && - pci_read_config(dev, 0x40, 1) & 0x08) { + pci_read_config(parent, 0x40, 1) & 0x08) { ata_print_cable(dev, "controller"); mode = ATA_UDMA2; }