Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Aug 2016 09:21:41 -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:  <258CDD7F-7D2B-46D9-B4BE-1A1D35C7D23C@yahoo.com>
In-Reply-To: <CO2PR03MB22158E9C579D7F0F256EA2ECB5140@CO2PR03MB2215.namprd03.prod.outlook.com>
References:  <CO2PR03MB22158E9C579D7F0F256EA2ECB5140@CO2PR03MB2215.namprd03.prod.outlook.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

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.

Scott

> 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://lists.freebsd.org/mailman/listinfo/freebsd-scsi
> To unsubscribe, send any mail to =
"freebsd-scsi-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?258CDD7F-7D2B-46D9-B4BE-1A1D35C7D23C>