Re: git: 36a8572ee8f5 - main - bus_if: provide a default null rescan method
- In reply to: Mitchell Horne : "Re: git: 36a8572ee8f5 - main - bus_if: provide a default null rescan method"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 23 Jun 2022 19:08:55 UTC
On 6/23/22 15:29, Mitchell Horne wrote: > On 6/23/22 15:22, John Baldwin wrote: >> On 6/23/22 11:16 AM, Mitchell Horne wrote: >>> The branch main has been updated by mhorne: >>> >>> URL: >>> https://cgit.FreeBSD.org/src/commit/?id=36a8572ee8f5db7ecb64bedc5738a363ec7cad36 >>> >>> >>> commit 36a8572ee8f5db7ecb64bedc5738a363ec7cad36 >>> Author: Mitchell Horne <mhorne@FreeBSD.org> >>> AuthorDate: 2022-06-21 13:29:53 +0000 >>> Commit: Mitchell Horne <mhorne@FreeBSD.org> >>> CommitDate: 2022-06-23 18:15:10 +0000 >>> >>> bus_if: provide a default null rescan method >>> There is an existing helper method in subr_bus.c, but almost no >>> drivers >>> know to use it. It also returns the same error as an empty method, >>> making it not very useful. Move this to bus_if.m and return a more >>> sensible error code. >>> This gives a slightly more meaningful error message when attempting >>> 'devctl rescan' on buses and devices alike: >>> "Device not configured" --> "Operation not supported by device" >>> Reviewed by: imp >>> MFC after: 1 week >>> Sponsored by: The FreeBSD Foundation >>> Differential Revision: https://reviews.freebsd.org/D35501 >> >> The cardbus.c and ofw_pcibus.c changes are bugs. These drivers >> inherit from >> the PCI bus so inherit the PCI bus method by default. The null rescan >> was on >> purpose as an override of the inherited method. >> >> I'm fine with changing the default to bus_null_rescan, but the method >> needs to >> stay so that subclasses of bus drivers can override it back to null. >> > > I see, understood. I will revert this portion of the patch in a few > minutes. > > Mitchell Should be fixed by 29afffb942b1, but please have a second look. And thanks! Mitchell