Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Jul 2018 18:59:42 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Andriy Gapon <avg@freebsd.org>
Cc:        Warner Losh <imp@freebsd.org>, src-committers <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:  <CANCZdfqriso7Y6Y81jw5aTrS2Xri15G6Y6995mT1a5Dp4gH5FA@mail.gmail.com>
In-Reply-To: <CANCZdfrLUARGSffT_bn2ME%2Bkxt_VZM0m4=QV4D0NqkzyA74OJQ@mail.gmail.com>
References:  <201807071555.w67FtqrL004956@repo.freebsd.org> <b8e35e4b-88fc-5cd8-1d98-1289d0351cea@FreeBSD.org> <CANCZdfrLUARGSffT_bn2ME%2Bkxt_VZM0m4=QV4D0NqkzyA74OJQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jul 7, 2018, 6:51 PM Warner Losh <imp@bsdimp.com> wrote:

>
>
> On Sat, Jul 7, 2018, 6:42 PM Andriy Gapon <avg@freebsd.org> wrote:
>
>> 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?
>>
>
> No. All such discussions are on hold until I get the depreciation doc
> done, due by the end of the month. Then it might be a good one, but there
> is a lot in line in front of it...
>
> >   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
>>
>
> I shared it there for my GSoC student, and it wound up getting pushed as
> part of a different commute train by mistake.
>

Stupid autocorrect. Commit train. An unrelated fix was committed to the
branch I had for this by mistake (the ath one). I was in a hurry since I
wanted to get on the road and didn't check before pushing. My bad. I didn't
think it worth backing out...

Warner
>
> > 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?CANCZdfqriso7Y6Y81jw5aTrS2Xri15G6Y6995mT1a5Dp4gH5FA>