diff options
author | Bill Paul <wpaul@FreeBSD.org> | 1998-08-04 01:38:52 +0000 |
---|---|---|
committer | Bill Paul <wpaul@FreeBSD.org> | 1998-08-04 01:38:52 +0000 |
commit | 33e929e1c42e3eae392bddd857a90b73250beb23 (patch) | |
tree | 5bf16c6c86eff6d97fb2e73892db31757c476717 /sys | |
parent | 194b64e83de9d275d55a1339b2f7e41702b48f4d (diff) | |
download | src-33e929e1c42e3eae392bddd857a90b73250beb23.tar.gz src-33e929e1c42e3eae392bddd857a90b73250beb23.zip |
Fix this thing to work properly with multiple tlan adapters; increment
unit count correctly.
Problem reported by Larry Baird <lab@gta.com>.
Notes
Notes:
svn path=/head/; revision=38065
Diffstat (limited to 'sys')
-rw-r--r-- | sys/pci/if_tl.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; |