Date: Thu, 18 Aug 2016 09:48:11 -0700 From: Scott Long <scott4long@yahoo.com> To: Hongjiang Zhang <honzhan@microsoft.com> Cc: "freebsd-scsi@freebsd.org" <freebsd-scsi@freebsd.org> Subject: Re: How to disable ata driver on Hyper-V Message-ID: <1E246524-3A4D-42A0-A2F6-AF51D4CD6CC3@yahoo.com> In-Reply-To: <SN2PR03MB22242FF40A67A282C905C504B5150@SN2PR03MB2224.namprd03.prod.outlook.com> References: <CO2PR03MB22158E9C579D7F0F256EA2ECB5140@CO2PR03MB2215.namprd03.prod.outlook.com> <258CDD7F-7D2B-46D9-B4BE-1A1D35C7D23C@yahoo.com> <SN2PR03MB22242FF40A67A282C905C504B5150@SN2PR03MB2224.namprd03.prod.outlook.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <honzhan@microsoft.com> = 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 <honzhan@microsoft.com> > 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 = <freebsd-scsi@freebsd.org> 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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1E246524-3A4D-42A0-A2F6-AF51D4CD6CC3>