From 18dbbeacf2af644a49af747a484a7b3cd6085369 Mon Sep 17 00:00:00 2001 From: Jason Wright Date: Thu, 3 Dec 1998 04:16:59 +0000 Subject: o Don't match pci product 0xae33, as it's a pciide controller; reported by mickey@ (pr 652). o use switch for matching pci products --- sys/dev/pci/if_tl.c | 45 ++++++++++++++++++--------------------------- 1 file changed, 18 insertions(+), 27 deletions(-) (limited to 'sys/dev/pci/if_tl.c') diff --git a/sys/dev/pci/if_tl.c b/sys/dev/pci/if_tl.c index dcce040d8c1..2cddde48ae1 100644 --- a/sys/dev/pci/if_tl.c +++ b/sys/dev/pci/if_tl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tl.c,v 1.4 1998/11/23 21:55:56 jason Exp $ */ +/* $OpenBSD: if_tl.c,v 1.5 1998/12/03 04:16:58 jason Exp $ */ /* * Copyright (c) 1997, 1998 @@ -3001,38 +3001,29 @@ tl_probe(parent, match, aux) } if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_COMPAQ) { - if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_COMPAQ_N100TX) - return 1; - if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_COMPAQ_Nunknown) - return 1; - if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_COMPAQ_N10T) - return 1; - if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_COMPAQ_IntNF3P) - return 1; - if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_COMPAQ_DPNet100TX) - return 1; - if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_COMPAQ_IntPL100TX) - return 1; - if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_COMPAQ_DP4000) - return 1; - if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_COMPAQ_N10T2) - return 1; - if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_COMPAQ_N10_TX_UTP) - return 1; - if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_COMPAQ_NF3P) - return 1; - if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_COMPAQ_NF3P_BNC) + switch (PCI_PRODUCT(pa->pa_id)) { + case PCI_PRODUCT_COMPAQ_N100TX: + case PCI_PRODUCT_COMPAQ_N10T: + case PCI_PRODUCT_COMPAQ_IntNF3P: + case PCI_PRODUCT_COMPAQ_DPNet100TX: + case PCI_PRODUCT_COMPAQ_IntPL100TX: + case PCI_PRODUCT_COMPAQ_DP4000: + case PCI_PRODUCT_COMPAQ_N10T2: + case PCI_PRODUCT_COMPAQ_N10_TX_UTP: + case PCI_PRODUCT_COMPAQ_NF3P: + case PCI_PRODUCT_COMPAQ_NF3P_BNC: return 1; + } return 0; } if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_OLICOM) { - if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_OLICOM_OC2183) - return 1; - if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_OLICOM_OC2325) - return 1; - if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_OLICOM_OC2326) + switch (PCI_PRODUCT(pa->pa_id)) { + case PCI_PRODUCT_OLICOM_OC2183: + case PCI_PRODUCT_OLICOM_OC2325: + case PCI_PRODUCT_OLICOM_OC2326: return 1; + } return 0; } -- cgit v1.2.3