From owner-freebsd-scsi@freebsd.org Thu Aug 18 16:51:14 2016 Return-Path: Delivered-To: freebsd-scsi@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 E0E13BBE7B8 for ; Thu, 18 Aug 2016 16:51:14 +0000 (UTC) (envelope-from scott4long@yahoo.com) Received: from nm44-vm2.bullet.mail.gq1.yahoo.com (nm44-vm2.bullet.mail.gq1.yahoo.com [67.195.87.25]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9F621211 for ; Thu, 18 Aug 2016 16:51:14 +0000 (UTC) (envelope-from scott4long@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1471539067; bh=7JxpbBlOVtH825e9UpQeT2oXJHgisgun0PJvXncRMsM=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=tfM6WKFYvfWpqtYma4S/n3e16hNuhsA9xnoomN4SvOB2cBzqDGak1rShCYiwwqamRu5jXw5ZSx4WkND3kGgpicBscaXih5/lfyu5AHBDdt09jlQ4u6aEu3F/u4dtVJ9EaJeLruqjDDaJLSXr8jUty5RIBLomKqcZh7RvXBvi5vqQMl+LwuOYPdrKPXsoRk64IJFapaQvssmKEx9hpY3npopxwVkJXhsmGn5M5BC8Zqv1lfaaj/FGAqlFU3hOFtZixPx0ZldveOrUzdMfF+pTMX2PLgqQyxi+Vt/DdchjhAfJ8EphU9XGmHxygVaJQqZxs3dQvtf1KjG+wKbgVAtH5A== Received: from [127.0.0.1] by nm44.bullet.mail.gq1.yahoo.com with NNFMP; 18 Aug 2016 16:51:07 -0000 Received: from [216.39.60.180] by nm44.bullet.mail.gq1.yahoo.com with NNFMP; 18 Aug 2016 16:48:12 -0000 Received: from [208.71.42.200] by tm16.bullet.mail.gq1.yahoo.com with NNFMP; 18 Aug 2016 16:48:12 -0000 Received: from [127.0.0.1] by smtp211.mail.gq1.yahoo.com with NNFMP; 18 Aug 2016 16:48:12 -0000 X-Yahoo-Newman-Id: 687887.50512.bm@smtp211.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-4 X-YMail-OSG: O6Yw8gIVM1k98kUFBbvkkkWzNfSfP0Ymobc50ZJrUsQQqdY xuhuLR9qKFzzuQReH7rp8FQHPgdCgI9bfXOQnibuYOCtzFRG6EclH6mOlAX8 P6bCpZCE5Z_j8NF6ICJRurBw2ZsD_gY9puCEQ2OnA8gG1oSbHhMIZOSX1SRI QF8l3_Ue_N1Rd.fewoTKfn.140FXcogjgy8zkR2J3.006pDf8XjvZ.PCWIua cGadwbd1BFVVU6HnkDNDAr8grRu83c6oDkx0HC734H7UYR4HveNfgn_fy5ad c2WzjxfDGvqvpz.3KNG3R30dju_j85alvnHHqkL7zt3LI8Enqud.7QPHseWa SdpXLTjeyrDkPo_jnBAvOJiCcsOJ.kK70fBw3xGSHhc21B.jSzrRCmtpYJm8 UK.ao6VcaWXQakneRKdrQoDMS7HHGo0si19MDgW3jO1sRVkrNjWb4BzHpXl5 axoW35OnVgvr.ZzCGAFYzTxSTfb5D9mg5PecEzqB64.rupEviMqIbq32sFWo ZiVgaAI3WF1c.OF2hQmIJ12wkUTNMzQAqMOkNHGgpfgNiSll.FPsw0C0g_m0 PsZUekiR7et9V X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: How to disable ata driver on Hyper-V From: Scott Long In-Reply-To: Date: Thu, 18 Aug 2016 09:48:11 -0700 Cc: "freebsd-scsi@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <1E246524-3A4D-42A0-A2F6-AF51D4CD6CC3@yahoo.com> References: <258CDD7F-7D2B-46D9-B4BE-1A1D35C7D23C@yahoo.com> To: Hongjiang Zhang X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Aug 2016 16:51:15 -0000 Hi, I=E2=80=99m not sure that I understand. Can you provide an example = boot-time output? Thanks, Scott > On Aug 17, 2016, at 10:48 PM, Hongjiang Zhang = wrote: >=20 > Hi Scott, >=20 > FreeBSD on Hyper-V already has a customized ata driver, which returns = "BUS_PROBE_DEFAULT" or "EXNIO" for enabling or disabling the driver on = ata controller. But this implementation has issues. If the ata = controller has a CD/DVD device on it, the /dev/cd0 device failed to be = created if I put CD/DVD on an ata controller which has been disabled. >=20 > What I want is disable the /dev/ada device but bypass the /dev/cd = device. I found it is difficult for me to determine what type of device = will be created in my customized ata probe function. That is why I want = to disable ata driver. >=20 > Thanks > Hongjiang Zhang >=20 > -----Original Message----- > From: Scott Long [mailto:scott4long@yahoo.com]=20 > Sent: Thursday, August 18, 2016 12:22 AM > To: Hongjiang Zhang > Cc: freebsd-scsi@freebsd.org > Subject: Re: How to disable ata driver on Hyper-V >=20 > Hi, >=20 > There=E2=80=99s no direct way to disable a specific driver or specific = instance of a driver. There are ways to disable a particular PCI = function, but I=E2=80=99m not sure if that=E2=80=99s what you want. Are = you looking to override the default ata driver with your own custom = driver? The way to do that is have your custom driver provide a higher = priority return code from its dev_probe routine. The way this works is = that positive return codes indicate an error. Negative return codes = indicate a priority, with the numbers closer to zero being a higher = priority. Zero is the highest priority, but should be used only with = great care. The priority for the default ahci driver is = BUS_PROBE_DEFAULT, which resolves to (-20). You might consider using = BUS_PROBE_VENDOR, which resolves to (-10). By having your driver look = at the PCI bus:device:function tuple, you can selectively override the = default driver for specific hardware. >=20 > Scott >=20 >> On Aug 17, 2016, at 2:49 AM, Hongjiang Zhang via freebsd-scsi = wrote: >>=20 >> Hi all, >>=20 >> I'm want to disable the default ata driver for FreeBSD on Hyper-V. = How to do that? >>=20 >> Thanks >> Hongjiang Zhang >> _______________________________________________ >> freebsd-scsi@freebsd.org mailing list >> = https://na01.safelinks.protection.outlook.com/?url=3Dhttps%3a%2f%2flists >> = .freebsd.org%2fmailman%2flistinfo%2ffreebsd-scsi&data=3D01%7c01%7chonzha >> = n%40microsoft.com%7cfba44fbedbf7421bb1a008d3c6bafc76%7c72f988bf86f141a >> = f91ab2d7cd011db47%7c1&sdata=3DYuqATsXVz4e4Ohgv%2fYc09SeQ%2fMSLLgpAhro8Nc >> Lm9tI%3d To unsubscribe, send any mail to=20 >> "freebsd-scsi-unsubscribe@freebsd.org"