From 8acad61ebd1e919453e654473d37b7fd2d83fb72 Mon Sep 17 00:00:00 2001 From: miod Date: Fri, 18 Mar 2022 11:09:39 +0000 Subject: [PATCH] Add bwfm chips to sdmmcdevs in order to get symbolic constants for them. ok jsg --- sys/dev/sdmmc/if_bwfm_sdio.c | 37 ++++++++++++++++++------------------ sys/dev/sdmmc/sdmmcdevs | 29 +++++++++++++++++++++++----- 2 files changed, 43 insertions(+), 23 deletions(-) diff --git a/sys/dev/sdmmc/if_bwfm_sdio.c b/sys/dev/sdmmc/if_bwfm_sdio.c index 01506a98b10..c19ec37e847 100644 --- a/sys/dev/sdmmc/if_bwfm_sdio.c +++ b/sys/dev/sdmmc/if_bwfm_sdio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bwfm_sdio.c,v 1.42 2021/11/02 14:49:53 patrick Exp $ */ +/* $OpenBSD: if_bwfm_sdio.c,v 1.43 2022/03/18 11:09:39 miod Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation * Copyright (c) 2016,2017 Patrick Wildt @@ -45,6 +45,7 @@ #include +#include #include #include @@ -207,27 +208,27 @@ bwfm_sdio_match(struct device *parent, void *match, void *aux) /* Look for Broadcom. */ cis = &sf->sc->sc_fn0->cis; - if (cis->manufacturer != 0x02d0) + if (cis->manufacturer != SDMMC_VENDOR_BROADCOM) return 0; /* Look for supported chips. */ switch (cis->product) { - case 0x4324: - case 0x4330: - case 0x4334: - case 0x4329: - case 0x4335: - case 0x4339: - case 0x4345: - case 0x4354: - case 0x4356: - case 0x4359: - case 0xa887: /* BCM43143 */ - case 0xa94c: /* BCM43340 */ - case 0xa94d: /* BCM43341 */ - case 0xa962: /* BCM43362 */ - case 0xa9a6: /* BCM43430 */ - case 0xa9bf: /* BCM43364 */ + case SDMMC_PRODUCT_BROADCOM_BCM4324: + case SDMMC_PRODUCT_BROADCOM_BCM4329: + case SDMMC_PRODUCT_BROADCOM_BCM4330: + case SDMMC_PRODUCT_BROADCOM_BCM4334: + case SDMMC_PRODUCT_BROADCOM_BCM4335: + case SDMMC_PRODUCT_BROADCOM_BCM4339: + case SDMMC_PRODUCT_BROADCOM_BCM4345: + case SDMMC_PRODUCT_BROADCOM_BCM4354: + case SDMMC_PRODUCT_BROADCOM_BCM4356: + case SDMMC_PRODUCT_BROADCOM_BCM4359: + case SDMMC_PRODUCT_BROADCOM_BCM43143: + case SDMMC_PRODUCT_BROADCOM_BCM43340: + case SDMMC_PRODUCT_BROADCOM_BCM43341: + case SDMMC_PRODUCT_BROADCOM_BCM43362: + case SDMMC_PRODUCT_BROADCOM_BCM43430: + case SDMMC_PRODUCT_BROADCOM_BCM43364: break; default: return 0; diff --git a/sys/dev/sdmmc/sdmmcdevs b/sys/dev/sdmmc/sdmmcdevs index 11fce6919af..d8210b690b6 100644 --- a/sys/dev/sdmmc/sdmmcdevs +++ b/sys/dev/sdmmc/sdmmcdevs @@ -1,4 +1,4 @@ - $OpenBSD: sdmmcdevs,v 1.8 2007/05/11 17:16:16 mglocker Exp $ + $OpenBSD: sdmmcdevs,v 1.9 2022/03/18 11:09:39 miod Exp $ /* * Copyright (c) 2006 Uwe Stuehler @@ -24,6 +24,7 @@ vendor CGUYS 0x0092 C-guys, Inc. vendor TOSHIBA 0x0098 Toshiba vendor SOCKETCOM 0x0104 Socket Communications, Inc. vendor ATHEROS 0x0271 Atheros +vendor BROADCOM 0x02d0 Broadcom vendor SYCHIP 0x02db SyChip Inc. vendor SPECTEC 0x02fe Spectec Computer Co., Ltd vendor GLOBALSAT 0x0501 Globalsat Technology Co. @@ -38,10 +39,28 @@ vendor ABOCOM 0x13d1 AboCom Systems, Inc. product ABOCOM SDW11G 0xac02 SDW11G /* Atheros */ -product ATHEROS AR6001_8 0x0108 AR6001 -product ATHEROS AR6001_9 0x0109 AR6001 -product ATHEROS AR6001_a 0x010a AR6001 -product ATHEROS AR6001_b 0x010b AR6001 +product ATHEROS AR6001_8 0x0108 AR6001 +product ATHEROS AR6001_9 0x0109 AR6001 +product ATHEROS AR6001_a 0x010a AR6001 +product ATHEROS AR6001_b 0x010b AR6001 + +/* Broadcom */ +product BROADCOM BCM4324 0x4324 BCM4324 +product BROADCOM BCM4329 0x4329 BCM4329 +product BROADCOM BCM4330 0x4330 BCM4330 +product BROADCOM BCM4334 0x4334 BCM4334 +product BROADCOM BCM4335 0x4335 BCM4335 +product BROADCOM BCM4339 0x4339 BCM4339 +product BROADCOM BCM4345 0x4345 BCM4345 +product BROADCOM BCM4354 0x4354 BCM4354 +product BROADCOM BCM4356 0x4356 BCM4356 +product BROADCOM BCM4359 0x4359 BCM4359 +product BROADCOM BCM43143 0xa887 BCM43143 +product BROADCOM BCM43340 0xa94c BCM43340 +product BROADCOM BCM43341 0xa94d BCM43341 +product BROADCOM BCM43362 0xa962 BCM43362 +product BROADCOM BCM43430 0xa9a6 BCM43430 +product BROADCOM BCM43364 0xa9bf BCM43364 /* C-guys, Inc. */ product CGUYS TIACX100 0x0001 TI ACX100 SD-Link11b WiFi Card -- 2.20.1