From owner-freebsd-hackers@freebsd.org Tue Jun 5 15:50:52 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4327EFF2B34 for ; Tue, 5 Jun 2018 15:50:52 +0000 (UTC) (envelope-from lakhanshiva@gmail.com) Received: from mail-oi0-x231.google.com (mail-oi0-x231.google.com [IPv6:2607:f8b0:4003:c06::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7558D807A7; Tue, 5 Jun 2018 15:50:51 +0000 (UTC) (envelope-from lakhanshiva@gmail.com) Received: by mail-oi0-x231.google.com with SMTP id i205-v6so2540494oib.1; Tue, 05 Jun 2018 08:50:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=tCQOPiJjUL8LqOf9/sX/jiK0NE3urixmJNQj5iz9iMc=; b=NnEIcLNLZAiMMUZ7E4EV3rgQtzVOBEztVgc4T/qgxdsGKLVPIJbY58YkqhehHtjj4y zDnpWUHQm0OGWLyA21gBCgVZ7Q2QWXa0dmj2jlMGLPcCajI4gz01UCvwjFHjtmUuaIpp iaVCR9ZxtBN4jFyi7jOWPXj/oW2H3T+TqMstvBQGJjjCiEM2xkcXM7IAE2+Jf7GaiMpG m/8Fa/AQTIaVPuC+ZcDNIJ15PMvCGMp1s2gsOAXY2Y3L1E7Kvkuv5bhnnmB+8v5B7+JW TUosuEhM9WJQDBETHHYpAzJBJI3jcpf57y02441Gi4QbwToKSVHJvqnCWzGGrX9ZlX/g g1ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=tCQOPiJjUL8LqOf9/sX/jiK0NE3urixmJNQj5iz9iMc=; b=ZKjlTL5oMloMkaig2Kb98qclYSpd0FTjgDLOqpC52Qc4G8VUxLeO7GVfypOZb4sfgX KJZvConiTiMr4ZIbozGSt+Patv1ct9lMFRDKWEMPuOuRyhYPUtvBL4AUl0JSYrcG/UN2 w9YGEMJ49Vgh9tjWJkeGABEf4biCtET/A1et7QFxL1OPErd7nPl2T8L66TZJxtMwdswe fjtBYLq3i64tDZqxDs02iqZSUBkWEk0Dw7wqJM6kE4zyJGhAOpDiKSfdIvnw3e8R1cyT OcDHfE+qdZKE4/mESYD6bd3XRyJdAZdhAiLv25RYdPcyyP/K38XFzbZ4baJAMbRIx8GV J8fw== X-Gm-Message-State: APt69E36pYrQyfLiU+G3luazrwgqlJ85Qh3g+ZzNXS8Ky7MKAnQE1bWE OiLqjoMRgOcTWLKh9JvvRT+gH+HyUuDy0Y9Ijk+MLOZI X-Google-Smtp-Source: ADUXVKJN36osOkDbQWQ/IxuQDyHKqWkYle+sWJYmMxO3TIefxHCvxcBZABLSNPEaM/Q3hxaZ7MBGnkTCJgHDIfKpBeI= X-Received: by 2002:aca:5bc5:: with SMTP id p188-v6mr13870687oib.295.1528213850438; Tue, 05 Jun 2018 08:50:50 -0700 (PDT) MIME-Version: 1.0 From: Lakhan Shiva Date: Tue, 5 Jun 2018 21:20:38 +0530 Message-ID: Subject: cy PCI driver - possible device id's To: freebsd-hackers@freebsd.org Cc: Warner Losh , chuck@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jun 2018 15:50:52 -0000 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