Date: Sun, 8 Jul 2018 00:01:53 +0300 From: Andriy Gapon <avg@FreeBSD.org> To: Warner Losh <imp@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336068 - in head/sys: dev/amdsmb modules/amdsmb Message-ID: <b8e35e4b-88fc-5cd8-1d98-1289d0351cea@FreeBSD.org> In-Reply-To: <201807071555.w67FtqrL004956@repo.freebsd.org> References: <201807071555.w67FtqrL004956@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 07/07/2018 18:55, Warner Losh wrote: > Author: imp > Date: Sat Jul 7 15:55:52 2018 > New Revision: 336068 > URL: https://svnweb.freebsd.org/changeset/base/336068 > > Log: > Update AMDSMB to use PCI_MATCH Just curious if anyone still uses this driver for ancient hardware. maybe de-orbit time? > Differential Review: https://reviews.freebsd.org/D16172 Just curious what's the point of referencing a review request that - had no reviewers - had no reviews - does not even have a description > Added: > head/sys/modules/amdsmb/ > head/sys/modules/amdsmb/Makefile (contents, props changed) > Modified: > head/sys/dev/amdsmb/amdsmb.c > > Modified: head/sys/dev/amdsmb/amdsmb.c > ============================================================================== > --- head/sys/dev/amdsmb/amdsmb.c Sat Jul 7 15:25:16 2018 (r336067) > +++ head/sys/dev/amdsmb/amdsmb.c Sat Jul 7 15:55:52 2018 (r336068) > @@ -125,24 +125,22 @@ struct amdsmb_softc { > > static int amdsmb_detach(device_t dev); > > +struct pci_device_table amdsmb_devs[] = { > + { PCI_DEV(AMDSMB_VENDORID_AMD, AMDSMB_DEVICEID_AMD8111_SMB2), > + PCI_DESCR("AMD-8111 SMBus 2.0 Controller") } > +}; > + > static int > amdsmb_probe(device_t dev) > { > - u_int16_t vid; > - u_int16_t did; > + const struct pci_device_table *tbl; > > - vid = pci_get_vendor(dev); > - did = pci_get_device(dev); > + tbl = PCI_MATCH(dev, amdsmb_devs); > + if (tbl == NULL) > + return (ENXIO); > + device_set_desc(dev, tbl->descr); > > - if (vid == AMDSMB_VENDORID_AMD) { > - switch(did) { > - case AMDSMB_DEVICEID_AMD8111_SMB2: > - device_set_desc(dev, "AMD-8111 SMBus 2.0 Controller"); > - return (BUS_PROBE_DEFAULT); > - } > - } > - > - return (ENXIO); > + return (BUS_PROBE_DEFAULT); > } > > static int > > Added: head/sys/modules/amdsmb/Makefile > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/modules/amdsmb/Makefile Sat Jul 7 15:55:52 2018 (r336068) > @@ -0,0 +1,8 @@ > +# $FreeBSD$ > + > +.PATH: ${SRCTOP}/sys/dev/amdsmb > + > +KMOD= amdsmb > +SRCS= amdsmb.c bus_if.h device_if.h pci_if.h smbus_if.h > + > +.include <bsd.kmod.mk> > -- Andriy Gapon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b8e35e4b-88fc-5cd8-1d98-1289d0351cea>