From 33e929e1c42e3eae392bddd857a90b73250beb23 Mon Sep 17 00:00:00 2001 From: Bill Paul Date: Tue, 4 Aug 1998 01:38:52 +0000 Subject: [PATCH] Fix this thing to work properly with multiple tlan adapters; increment unit count correctly. Problem reported by Larry Baird . --- sys/pci/if_tl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/pci/if_tl.c b/sys/pci/if_tl.c index 7b560259f0e0..68ba5cc4b7d6 100644 --- a/sys/pci/if_tl.c +++ b/sys/pci/if_tl.c @@ -274,6 +274,7 @@ static struct tl_type tl_phys[] = { static struct tl_iflist *tl_iflist = NULL; static unsigned long tl_count; +static unsigned long tl_unit_count = 0; static char *tl_probe __P((pcici_t, pcidi_t)); static void tl_attach_ctlr __P((pcici_t, int)); @@ -1537,11 +1538,12 @@ tl_attach_ctlr(config_id, unit) tl_mii_readreg(csr, &frame); if (!frame.mii_data) continue; - if (tl_attach_phy(csr, phys, eaddr, i, ilist)) { + if (tl_attach_phy(csr, tl_unit_count, eaddr, i, ilist)) { printf("tlc%d: failed to attach interface %d\n", unit, i); goto fail; } + tl_unit_count++; phys++; if (phys && i != TL_PHYADDR_MAX) break;