summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Use our own callout instead of if_slowtimo() for driving lance_watchdog()marius2006-12-064-12/+25
| | | | in order to avoid races accessing if_timer.
* - Use the hme_tick() callout instead of if_slowtimo() for drivingmarius2006-12-062-17/+22
| | | | | | hme_watchdog() in order to avoid races accessing if_timer. - Use bus_get_dma_tag() so hme(4) works on platforms requiring it. - Don't bother to set if_mtu to ETHERMTU, ether_ifattach() does that.
* - Use the gem_tick() callout instead of if_slowtimo() for drivingmarius2006-12-062-22/+25
| | | | | | | | gem_watchdog() in order to avoid races accessing if_timer. While at it relax the watchdog a bit by reloading it in gem_tint() if there are still packets enqueued. - Don't bother to set if_mtu to ETHERMTU, ether_ifattach() does that. - Fix inconsistencies in prototypes.
* - Use our own callout (the dc_tick() callout uses varying periodsmarius2006-12-062-27/+35
| | | | | | | | | depending on the NIC and isn't used at all with HomePNA links) instead of if_slowtimo() for driving dc_watchdog() in order to avoid races accessing if_timer. - Use bus_get_dma_tag() so dc(4) works on platforms requiring it. - Don't bother to set if_mtu to ETHERMTU, ether_ifattach() does that. - Remove an alpha remnant in dc_softc.
* Use callout mechanism instead of timeout()/untimeout().ume2006-12-053-3/+4
| | | | MFC after: 1 week
* Fix an off by one error in struct nve_tx_desc's frags[] array as a resultjhb2006-12-051-1/+1
| | | | | | | | of the nvenet lib upgrade (the constant went from 63 (2^n - 1) to 32 (2^n)). For reasons that are not obvious to me this fixes the driver on at least some NICs. MFC after: 3 days
* Use a different bitmask for superpages' base address so that itru2006-12-053-9/+6
| | | | | | | doesn't conflict with the PG_PDE_PAT bit. (We still don't mask off all the reserved bits but that's okay for now.) Reviewed by: alc
* Make ISPCTL_PLOGX find a handle to log into the management servermjacob2006-12-053-75/+88
| | | | | | with- not hope for the best. Change some things which were gated off of 24XX to be gated off of 2K login support. Convert some isp_prt calls to xpt_print calls.
* Add a chip timeout to ENABLE/MODIFY/DISABLE lun calls.mjacob2006-12-051-0/+1
| | | | MFC after: 1 month
* use xpt_print functionmjacob2006-12-051-3/+2
|
* Add an xpt_print function to reduce most of the xpt_print_path/printfmjacob2006-12-0512-259/+216
| | | | | | | pairs. Convert the core code to use it. Reviewed by: scsi (various folks weighing in with good advice) MFC after: 2 weeks
* const poisonimp2006-12-053-3/+3
| | | | submitted by: john wehle
* More properly cleanup the iicbus child when deleting it.imp2006-12-051-6/+27
| | | | | | | These are from patches by John Wehle, but the commentary has been updated by me. Obtained from: ports/multimedia/pvr250, indirectly
* Reference Hauppage's cxm_iic bit-bang device here.imp2006-12-051-0/+5
| | | | | | | | Add a note that suggests a cleanup. Note: This patch was derived based on looking at the pvrxxx/pvr250 ports' Makefiles only, and may be incomplete. It is not derived from anything I saw from Hauppage.
* Fix gdb issue where the i-cache was not being updated when a breakpointgrehan2006-12-057-3/+46
| | | | | | | | | | | | | | | | | | | | | | | was written into a user's address space. The fix is to modify uiomove_fromphys to sync the icache when an executable user-space page is written into. Alan Cox suggested that there should probably be a higher-level interface to this in the ptrace code, but agreed that this is an OK short-term solution. Files changed: pmap.h - declaration of pmap_page_executable() pmap_dispatch.c - pass through the page_executable call to the mmu object mmu_oea.c - implement the page_executable method by examining the PTE_EXEC field in the vm_page_t uio_machdep.c - in uiomove_fromphys(), if the op was a UIO_WRITE to user-space, and if the page is executable, sync the icache since this is at the least a breakpoint-write from gdb. Reported by: marcel Tested by: marcel, grehan on g3+g4 Discussed with: alc MFC after: 2 weeks
* Initial cut at Basic Domain Validation- just add some states tomjacob2006-12-042-9/+216
| | | | | | traverse through during probing. Reviewed by: scsi (scottl)
* MFP4: 109653jkim2006-12-041-2/+25
| | | | | Linux mknod(2) can open any files, not just char/block or fifo files. This fixes Linux Test Project test cases mknod01, mknod07 and mknod09.
* MFP4: 109652jkim2006-12-041-39/+38
| | | | | | | | | | | | Fixes for 'blocking in fifoor state' problem of LTP tests. linux_*stat*() functions were opening files with O_RDONLY to get major/minor pair for char/block special files. Unfortunately, when these functions are used against fifo, it is blocked forever because there is no writer. Instead, we only open char/block special files for major/minor conversion. We have to get rid of kern_open() entirely from translate_path_major_minor() but today is not the day. While I am here, add checks for errors before calling translate_path_major_minor().
* Bug fix for obscenely large wait times on uncontested lockskmacy2006-12-041-4/+4
| | | | | | | if waittime was zero (the lock was uncontested) l->lpo_waittime in the hash table would not get initialized. Inspection prompted by questions from: Attilio Rao
* - Add BGE_FLAG_JUMBO flag which idicates jumbo frame capability. Some day wejkim2006-12-042-22/+24
| | | | | may be able to support jumbo frames for BCM5714 and BCM5780. - Rename BGE_IS_5705_OR_BEYOND() to BGE_IS_5705_PLUS() for consistency.
* Use bge_flags to save chipset family and remove dead code while I am here.jkim2006-12-042-53/+43
|
* - separate out rounding memory ranges to 4M boundaries from OFW memory ↵kmacy2006-12-043-46/+73
| | | | | | | | | allocation bug workaround - create real_phys_avail which includes all memory ranges to be added to the direct map - merge in nucleus memory to real_phys_avail - distinguish between tag VA and index VA in tsb_set_tte_real for cases where page_size != index_page_size - clean up direct map loop
* Fix an edge case in rman_manage_region() where it didn't handle a resourcejhb2006-12-041-4/+7
| | | | | | | ending at ULONG_MAX properly. While here, use TAILQ_FOREACH_SAFE(). Tested by: "Stephane E. Potvin" <sepotvin at videotron-ca> MFC after: 1 week
* Add two new flags to if_bridge(4) indicating whether the edge flagsyrinx2006-12-044-3/+18
| | | | | | | | | | | | | | of the bridge port and path cost have been administratively set or calculated automatically by RSTP. Make sure to transition from non-edge to edge when the port goes down and the edge flag was manually set before. This is needed to comply with the condition ((!portEnabled && AdminEdge) || ....) in the Bridge Detection State Machine (IEE802.1D-2004, p. 171). Reviewed by: thompsa Approved by: bz (mentor)
* Fix my error in rev. 1.152glebius2006-12-041-1/+1
| | | | Submitted by: oleg
* if a thread blocked on userland condition variable isdavidxu2006-12-044-5/+25
| | | | | | | | | | pthread_cancel()ed, it is expected that the thread will not consume a pthread_cond_signal(), therefor, we use thr_wake() to mark a flag, the flag tells a thread calling do_cv_wait() in umtx code to not block on a condition variable. Thread library is expected that once a thread detected itself is in pthread_cond_wait, it will call the thr_wake() for itself in its SIGCANCEL handler.
* Do not forget to call pmap_free_l2_bucket() in pmap_remove_pages().cognet2006-12-041-0/+1
| | | | | | This can fix the pmap-related panics reported on arm. MFC After: 3 days
* recent changes have caused TRAP_TRACING to induce corruptionkmacy2006-12-041-2/+2
| | | | disable until the issue has been tracked down
* Remove the HME_LOCK_ASSERT() in hme_mifinit(), which was added in themarius2006-12-041-1/+0
| | | | | previous revision; it's actually ok when invoking hme_mifinit() from hme_config() without the lock held.
* - In hme_stop() mask all interrupts.marius2006-12-041-45/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - In hme_eint() print MIF register contents on MIF interrupts. - In hme_mifinit() don't bother to preserve the previous MIF config. This was mainly done in order to preserve the PHY select bit (external or internal PHY) but which only needs to be set as appropriate when reading from or writing to the desired PHY in hme_mii_{read,write}reg(). Similarly don't bother to set the PHY select bit in hme_mii_statchg(). - In hme_mii_{read,write}reg() ignore requests to PHYs other than the external and internal PHY one. - Move enabling/disabling the MII drivers of the external transceiver from hme_init_locked() and based on the sheer presence of an external to hme_mifinit() and based on the currently selected media, defaulting to the internal transceiver when the media hasn't been set, yet. Invoke hme_mifinit() from the newly added hme_mediachange_locked() so the setting of the MII drivers is updated when changing media. These changes keep the MII bus from wedging (which manifests in the HME and the PHYs no longer being able to communicate with each other) when the PHY device drivers isolate the unused PHY in two-PHY configurations as present in f.e. Netra t1 100 while changing media, either from hme_init_locked() (see also below) or via ifconfig(8). They also allow for using both transceivers/PHYs. - In the newly added hme_mediachange_locked() also reset the PHYs in two- PHY configurations before invoking mii_mediachg(). This is required for successfully unisolating the previously unused PHY when switching between PHYs. - Now that changing media should no longer cause problems back out rev. 1.27 and re-enable setting the current media in hme_init_locked() (see the commit message of rev. 1.23 for more info). These changes are roughly a merge of NetBSD gem.c rev. 1.32 - 1.35 (1.30 was already fixed differently in our 1.36; 1.31 and 1.32 were wrong) with some parts reworked and things that don't make sense like setting the MII drivers and restoring the previous MIF and XIF settings in hme_mii_{read, write}reg() omitted. MFC after: 2 weeks
* Improve style(9) conformance of igmp.c.rwatson2006-12-041-45/+43
|
* Fix SIOCGDRVSPEC/BRDGGIFSSTP ioctl: make it copyin() the usersyrinx2006-12-031-1/+1
| | | | | | | | provided buffer length before trying to use it. Reviewed by: thompsa Approved by: bz (mentor) MFC after: 3 days
* MFP4 (110939):netchild2006-12-031-1/+1
| | | | | | MFi386: return EOPNOTSUPP for unknown module events. Submitted by: rdivacky
* Sync with i386 (remove the LINUX stuff) now that the module is usable.netchild2006-12-031-5/+0
|
* MFP4 (110957)netchild2006-12-031-2/+3
| | | | | | | | | | Use TAILQ_FOREACH_SAFE instead of the unsafe one where an item is removed from the queue. This prevents a panic on kldunload. Submitted by: rdivacky Tested by: bsam
* o Do not leave uninitialized birthtime: in MSDOSFSMNT_LONGNAMEmaxim2006-12-031-2/+4
| | | | | | | | | | | | set birthtime to FAT CTime (creation time) and in the other cases set birthtime to -1. o Set ctime to mtime instead of FAT CTime which has completely different meaning. PR: kern/106018 Submitted by: Oliver Fromme MFC after: 1 month
* Fix a massive couple of botches here: the NVRAM settingsmjacob2006-12-031-23/+15
| | | | | | | | | | | | | read wasn't flagging the SYNC mode was enabled. The temp values for offset and sync period were uint8_t, but were being assigned and shifted from a uint32_t value. This didn't show up in testing because a random number of 1030 cards set a bit that says "honor BIOS negotiation", which means this whole code path was skipped. This should clear up at least some of the negotation issues that have been seen.
* Fix XPT_GET_TRANSPORT_SETTINGS to zero validity and flags-mjacob2006-12-031-13/+24
| | | | | this was causing us to not negotiate sync at all, or at random.
* Remove CTS_SPI_FLAGS_TAG_ENB. Nobody is using it and at least onemjacob2006-12-031-1/+0
| | | | | | | | | | | | | author can't remember why it was there. The CTS_SCSI_FLAGS_TAG_ENB remains in place, and makes sense, and is checked all over the place. The CTS_SPI_FLAGS_TAG_ENB was probably an attempt to distinguish protocol and transport tag capabilities. At the very least this can be confusing and prone to many bugs, so let's just assume that the transport tag case just flows from the protocol (and vice versa) for now.
* Optimized RTC accesses by avoiding null writes to the index registerbde2006-12-033-27/+48
| | | | | | | | | | | | | | | | | | | | | | | | | and by only delaying when an RTC register is written to. The delay after writing to the data register is now not just a workaround. This reduces the number of ISA accesses in the usual case from 4 to 1. The usual case is 2 rtcin()'s for each RTC interrupt. The index register is almost always RTC_INTR for this. The 3 extra ISA accesses were 1 for writing the index and 2 for delays. Some delays are needed in theory, but in practice they now just slow down slow accesses some more since almost eveyone including us does them wrong so modern systems enforce sufficient delays in hardware. I used to have the delays ifdefed out, but with the index register optimization the delays are rarely executed so the old magic ones can be kept or even implemented non- magically without significant cost. Optimizing RTC interrupt handling is more interesting than it used to be because RTC interrupts are currently needed to fix the more efficient apic timer interrupts on some systems. apic_timer_hz is normally 2000 so the RTC interrupt rate needs to be 2048 to keep the apic timer firing on such systems. Without these changes, each RTC interrupt normally took 10 ISA accesses (2 PIC accesses and 2 sets of 4 RTC accesses). Each ISA access takes 1-1.5uS so 10 of then at 2048 Hz takes 2-3% of a CPU. Now 4 of them take 0.8-1.2% of a CPU.
* Introduce userspace condition variable, since we have already POSIXdavidxu2006-12-032-19/+225
| | | | | | priority mutex implemented, it is the time to introduce this stuff, now we can use umutex and ucond together to implement pthread's condition wait/signal.
* Forced commit: previous revision just correctly reflected thatmjacob2006-12-031-1/+0
| | | | the number of attached devices is 16 bits wide, not 8 bits wide.
* Fix a debug message which didn't quite get it right about data direction.mjacob2006-12-034-102/+163
| | | | | | Fix things to use the LSI-Logic Fusion Library mask and shift names for offset and sync, no matter how awkward they are, in preference to just plain numbers.
* Add missing includes for <sys/buf.h> and <sys/bio.h>.rodrigc2006-12-021-0/+2
|
* - Probe Davicom DM9102 PHYs.marius2006-12-021-30/+8
| | | | | | | | | | | | | | - Don't set MIIF_NOISOLATE so amphy(4) can be used in configurations with multiple PHYs. There doesn't seem to be a problem with isolating AM79c873 and workalikes per se nor in combination with the NICs they're used with and amphy(4) was already adding IFM_NONE anyway. - Use mii_phy_add_media() instead of mii_add_media() so the latter can be eventually retired. - Take advantage of mii_phy_setmedia(). - Fix a whitespace nit. Obtained from: NetBSD dmphy(4) (except for the last item) MFC after: 2 weeks
* - In acphy_service() for the MII_TICK case don't bother to check whethermarius2006-12-021-30/+7
| | | | | | | | | | | | | | | | | | | the currently selected media is of type IFM_AUTO as auto-negotiation doesn't need to be kicked anyway. - Fix a whitespace nit. - Probe another Altima PHY, which is a AC101 workalike and integrated in at least ADMtek ADM8511 but apparently is not mentioned in any publically available data sheet so the actual identifier is unknown. - Don't set MIIF_NOISOLATE so acphy(4) can be used in configurations with multiple PHYs. There doesn't seem to be a problem with isolating AC101 and workalikes per se nor in combination with the NICs they're used with. - Use mii_phy_add_media() instead of mii_add_media() so the latter can be eventually retired. - Take advantage of mii_phy_setmedia(). Obtained from: NetBSD (except for the first and second item) MFC after: 2 weeks
* - Add another Altima PHY, which is a AC101 workalike and integratedmarius2006-12-021-1/+3
| | | | | | | | | | | in at least ADMtek ADM8511 but apparently is not mentioned in any publically available data sheet so the actual identifier is unknown. - Add Davicom DM9102 PHY. - Add DM9101 to the description of AMD 79C873 as at least some Davicom DM9101F identify identical to AMD 79C873. Obtained from: NetBSD MFC after: 2 weeks
* - Don't set MIIF_NOISOLATE so tdkphy(4) can be used in configurationsmarius2006-12-021-37/+9
| | | | | | | | | | | | | | | | | with multiple PHYs. There doesn't seem to be a problem with isolating 78Q2120 per se nor in combination with the NICs they're used with and tdkphy(4) was already adding IFM_NONE anyway. - Set MIIF_NOLOOP as loopback doesn't work with this PHY. The MIIF_NOLOOP flag currently triggers nothing but hopefully will be respected by mii_phy_setmedia() later on. - Use mii_phy_add_media() instead of mii_add_media() so the latter can be eventually retired. - Take advantage of mii_phy_setmedia(). Thanks to Hans-Joerg Sirtl for lending me test hardware. Obtained from: NetBSD tqphy(4) MFC after: 2 weeks
* - Don't set MIIF_NOISOLATE so rgephy(4) can be used in configurationsmarius2006-12-021-13/+3
| | | | | | | | | | | with multiple PHYs and un-comment case IFM_NONE in case MII_MEDIACHG rgephy_service(). There doesn't seem to be a problem with isolating RTL8169S and their internal PHY. - Take advantage of mii_phy_add_media(). [1] Obtained from: NetBSD [1] Tested by: yongari MFC after: 2 weeks
* Some style changes to a couple of PHY drivers:marius2006-12-027-94/+53
| | | | | | | | | | | | | - Fix some whitespace nits. - Fix some spelling in comments. - Use MII_ANEGTICKS instead of 5. - Don't define variables in nested scope. - Remove superfluous returns at the end of void functions. - Remove unused static global rgephy_mii_model. - Remove dupe $Id$ in tdkphy(4). - Sort brgphys table. MFC after: 2 weeks
OpenPOWER on IntegriCloud