Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Jun 2018 21:20:38 +0530
From:      Lakhan Shiva <lakhanshiva@gmail.com>
To:        freebsd-hackers@freebsd.org
Cc:        Warner Losh <imp@bsdimp.com>, chuck@freebsd.org
Subject:   cy PCI driver - possible device id's
Message-ID:  <CAHC0YgfPmPmOQVmHD_uY8d7qHbHLrc439%2Bj34rvLaqo2PMv2VQ@mail.gmail.com>

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

I am working on converting PCI drivers attachments to be table driven.
I have come across the cy (Cyclades Y PCI serial interface driver) -
/sys/dev/cy/cy_pci.c. There is no explicit vendor/device table in this.
However when we look at the probe function -

static int cy_pci_probe(dev)
>     device_t dev;
> {
>     u_int32_t device_id;
>     device_id = pci_get_devid(dev);
>     device_id &= ~0x00060000;
>     if (device_id != 0x0100120e && device_id != 0x0101120e)
>         return (ENXIO);
>     device_set_desc(dev, "Cyclades Cyclom-Y Serial Adapter");
>     return (BUS_PROBE_DEFAULT);
> }
>

It makes it evident that it is possible to have the following as the device
id's for this Cyclades Cyclom-Y serial Adapter:

> 0x0100120e
> 0x0102120e
> 0x0104120e
> 0x0106120e
>
> 0x0101120e
> 0x0103120e
> 0x0105120e
> 0x0107120e
>

Can i conclude this or am i missing something here ? Not 100% sure if these
are all valid device id's but Math says that these are the possible
options. Which all from these could be a practical device id ?
As you may infer, i am trying to construct a device id table for the
Cyclades PCI driver.
Useful Ref: https://www.freebsd.org/cgi/man.cgi?query=cy&sektion=4
Thanks,
Lakhan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHC0YgfPmPmOQVmHD_uY8d7qHbHLrc439%2Bj34rvLaqo2PMv2VQ>