Date: Wed, 21 Oct 2015 17:27:43 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289707 - head/sys/dev/ata/chipsets Message-ID: <201510211727.t9LHRhs4043964@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510211727.t9LHRhs4043964>