summaryrefslogtreecommitdiffstats
path: root/sys/dev/fe
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2009-03-11 08:12:28 +0000
committerimp <imp@FreeBSD.org>2009-03-11 08:12:28 +0000
commit9ce62c5ad10c007eef43856f8cdfa1a77a561e5e (patch)
tree75a36ae568188b492cac7011ca597a9807f5778c /sys/dev/fe
parenta8b23b6811976b3ff2fcb7aa2717cc5193bb39d9 (diff)
downloadFreeBSD-src-9ce62c5ad10c007eef43856f8cdfa1a77a561e5e.zip
FreeBSD-src-9ce62c5ad10c007eef43856f8cdfa1a77a561e5e.tar.gz
Add support for Hitachi HT-4840-11. This card is supposedly just like
the J181, but not quite. This card's CIS has some quirks that means we have to ignore CFE's 1-9.
Diffstat (limited to 'sys/dev/fe')
-rw-r--r--sys/dev/fe/if_fe_pccard.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/dev/fe/if_fe_pccard.c b/sys/dev/fe/if_fe_pccard.c
index fa2561b..3be91f2 100644
--- a/sys/dev/fe/if_fe_pccard.c
+++ b/sys/dev/fe/if_fe_pccard.c
@@ -64,6 +64,7 @@ static const struct fe_pccard_product {
int mpp_flags;
#define MPP_MBH10302 1
#define MPP_ANYFUNC 2
+#define MPP_SKIP_TO_CFE_10 4
} fe_pccard_products[] = {
/* These need to be first */
{ PCMCIA_CARD(FUJITSU2, FMV_J181), MPP_MBH10302 },
@@ -80,6 +81,7 @@ static const struct fe_pccard_product {
{ PCMCIA_CARD(FUJITSU, LA501), 0 },
{ PCMCIA_CARD(FUJITSU, LA10S), 0 },
{ PCMCIA_CARD(FUJITSU, NE200T), MPP_MBH10302 },/* Sold by Eagle */
+ { PCMCIA_CARD(HITACHI, HT_4840), MPP_MBH10302 | MPP_SKIP_TO_CFE_10},
{ PCMCIA_CARD(RATOC, REX_R280), 0 },
{ PCMCIA_CARD(XIRCOM, CE), MPP_ANYFUNC },
{ { NULL } }
@@ -91,6 +93,7 @@ fe_pccard_probe(device_t dev)
int error;
uint32_t fcn = PCCARD_FUNCTION_UNSPEC;
const struct fe_pccard_product *pp;
+ int i;
if ((pp = (const struct fe_pccard_product *)pccard_product_lookup(dev,
(const struct pccard_product *)fe_pccard_products,
@@ -105,6 +108,16 @@ fe_pccard_probe(device_t dev)
return (error);
if (fcn != PCCARD_FUNCTION_NETWORK)
return (ENXIO);
+ if (pp->mpp_flags & MPP_SKIP_TO_CFE_10) {
+ for (i = 10; i < 27; i++) {
+ if (pccard_select_cfe(dev, i) == 0)
+ goto good;
+ }
+ device_printf(dev,
+ "Hitachi HT-4840-11 workaround failed\n");
+ return ENXIO;
+ }
+ good:;
return (0);
}
return (ENXIO);
@@ -126,6 +139,7 @@ static driver_t fe_pccard_driver = {
};
DRIVER_MODULE(fe, pccard, fe_pccard_driver, fe_devclass, 0, 0);
+MODULE_DEPEND(fe, pccard, 1, 1, 1);
static int fe_probe_mbh(device_t, const struct fe_pccard_product *);
static int fe_probe_tdk(device_t, const struct fe_pccard_product *);
OpenPOWER on IntegriCloud