Changeset 172
- Timestamp:
- Sep 2, 2010, 11:24:08 AM (14 years ago)
- Location:
- freebsd-mos-driver
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
freebsd-mos-driver/Makefile
r171 r172 29 29 lsmod: 30 30 kldstat 31 32 core: 33 kgdb /usr/obj/usr/src/sys/GENERIC/kernel.debug `ls /var/crash/vmcore.* | tail -1` -
freebsd-mos-driver/if_mos.c
r171 r172 421 421 mos_miibus_readreg(struct device *dev, int phy, int reg) 422 422 { 423 struct mos_softc *sc = (void *)dev;423 struct mos_softc *sc = device_get_softc(dev); 424 424 uWord val; 425 425 int i,res, locked; … … 455 455 mos_miibus_writereg(device_t dev, int phy, int reg, int val) 456 456 { 457 struct mos_softc *sc = (void *)dev;457 struct mos_softc *sc = device_get_softc(dev); 458 458 int i, locked; 459 459 … … 535 535 struct mii_data *mii = GET_MII(sc); 536 536 537 MOS_LOCK_ASSERT(sc, MA_OWNED); 538 537 539 sc->mos_link = 0; 538 540 if (mii->mii_instance) { 539 struct mii_softc *miisc; 541 struct mii_softc *miisc; 542 540 543 LIST_FOREACH(miisc, &mii->mii_phys, mii_list) 541 544 mii_phy_reset(miisc); 542 545 } 543 546 mii_mediachg(mii); 544 545 547 return (0); 546 548 } … … 555 557 struct mii_data *mii = GET_MII(sc); 556 558 559 MOS_LOCK(sc); 557 560 mii_pollstat(mii); 561 MOS_UNLOCK(sc); 562 558 563 ifmr->ifm_active = mii->mii_media_active; 559 564 ifmr->ifm_status = mii->mii_media_status; … … 571 576 u_int8_t hashtbl[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; 572 577 578 MOS_LOCK_ASSERT(sc, MA_OWNED); 573 579 574 580 rxmode = mos_reg_read_1(sc, MOS_CTL); … … 909 915 return; 910 916 917 MOS_LOCK_ASSERT(sc, MA_OWNED); 911 918 DPRINTFN(0xff,"%s: %s: enter\n", "mos", __func__); 912 919 … … 999 1006 u_int8_t rxmode; 1000 1007 1008 MOS_LOCK_ASSERT(sc, MA_OWNED); 1009 1001 1010 /* 1002 1011 * Cancel pending I/O and free all RX/TX buffers. … … 1071 1080 mos_reset(sc); 1072 1081 1082 MOS_LOCK_ASSERT(sc, MA_OWNED); 1073 1083 ifp->if_flags &= ~IFF_DRV_RUNNING; 1074 1084
Note:
See TracChangeset
for help on using the changeset viewer.