summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* some tweaks to build picobsd for different architectures.luigi2011-11-232-5/+13
|
* Plug fd leakskevlo2011-11-233-0/+4
|
* fix formatting warning using casts. The numbers involvedluigi2011-11-231-4/+4
| | | | | are small and these are debug statements, so there is no reason to obfuscate the format string with PRIsomeKINDofINTEGER
* Fix build without INVARIANTS.trociny2011-11-231-0/+2
| | | | Discussed with: kib
* Fix build, hopefully.trociny2011-11-231-33/+42
| | | | Reviewed by: kib
* Re-lock the ath lock after ath_reset() has been called.adrian2011-11-231-0/+1
| | | | | | | | | | The calibrate callout is done with the sc lock held. This only showed up when using an older NIC (AR5212) whose radio/phy requires the rfgain adjustment. Pointy-hat-to: adrian Sponsored by: Hobnob, Inc.
* Remove unused variable mii.kevlo2011-11-231-2/+0
| | | | | | This variable is initialized but not used. Reviewed by: yongari
* Tidy up the statistic documentation.adrian2011-11-231-2/+2
| | | | Sponsored by: Hobnob, Inc.
* Add the new statistics introduced in r227868.adrian2011-11-231-7/+14
| | | | Sponsored by: Hobnob, Inc.
* Flesh out the TX aggregation completion statistics.adrian2011-11-233-5/+16
| | | | | | | | | * Failall is now named just that. * Add TX ok and TX fail, for aggregate frame sub-frames. This will break athstats; a followup commit wil resolve this. Sponsored by: Hobnob, Inc.
* Disable accepting frames in re_stop() to put RX MAC into idle state.yongari2011-11-231-3/+15
| | | | | | | | | | | | | | | | | | Because there is no reliable way to know whether RX MAC is in stopped state, rejecting all frames would be the only way to minimize possible races. Otherwise it's possible to receive frames while stop command execution is in progress and controller can DMA the frame to freed RX buffer during that period. This was observed on recent PCIe controllers(i.e. RTL8111F). While this change may not be required on old controllers it wouldn't make negative effects on old controllers. One side effect of this change is disabling receive so driver reprograms RL_RXCFG to receive WOL frames when it is put into suspend or shutdown. This should address occasional 'memory modified free' errors seen on recent RealTek controllers.
* fdopendir(): Do not close the passed file descriptor on failure.jilles2011-11-221-4/+13
| | | | Reviewed by: delphij
* Perform media change after setting IFF_DRV_RUNNING flag. Without it,yongari2011-11-221-2/+2
| | | | | | driver would ignore the first link state update if controller already established a link such that it would have to take additional link state handling in re_tick().
* Writing access to RL_CFG5 register also requires EEPROM writeyongari2011-11-221-5/+6
| | | | | | | | | | | | | access. While I'm here, enable WOL through magic packet but disable waking up system via unicast, multicast and broadcast frames. Otherwise, multicast or unicast frame(e.g. ICMP echo request) can wake up system which is not probably wanted behavior on most environments. This was not known as problem because RL_CFG5 register access had not effect until this change. The capability to wake up system with unicast/multicast frames are still set in driver, default off, so users who need that feature can still activate it with ifconfig(8).
* Rename device_delete_all_children() into device_delete_children().hselasky2011-11-2232-32/+32
| | | | | Suggested by: jhb @ and marius @ MFC after: 1 week
* s,KOBJMETHOD_END,DEVMETHOD_END,g in order to fully hide the explicit mentionmarius2011-11-2227-30/+30
| | | | of kobj(9) from device drivers.
* Style change.hselasky2011-11-221-2/+2
| | | | | Suggested by: jhb @ and marius @ MFC after: 1 week
* Remove yet another outdated note about procfs(5) being required.trociny2011-11-221-6/+0
| | | | Spotted by: arundel
* forgot to merge NETMAP entries in sys/conf !luigi2011-11-223-0/+8
|
* Update to use DEVMETHOD_END.marius2011-11-221-1/+1
|
* - There's no need to overwrite the default device method with the defaultmarius2011-11-22156-585/+238
| | | | | | | | | | one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel - While at it, use DEVMETHOD_END. Discussed with: jhb - Also while at it, use __FBSDID.
* For IP1001 PHY, do not set multi-port device(MASTER). Ideally thisyongari2011-11-221-1/+2
| | | | | | | | | | bit should not affect link establishment process of auto-negotiation if manual configuration is not used, which is true in auto-negotiation. However it seems setting this bit interfere with IP1001 PHY's down-shifting feature such that establishing a 10/100Mbps link failed when 1000baseT link is not available during auto-negotiation process. Tested by: Andrey Smagin <samspeed <> mail dot ru >
* Remove libpam from _prebuild_libs. This should unbreak the -jX build.des2011-11-221-2/+1
| | | | MFC after: 3 weeks
* No need in procfs(5).trociny2011-11-222-25/+1
| | | | MFC after: 2 weeks
* Now kvm_getenvv() and kvm_getargv() don't need procfs(5).trociny2011-11-222-341/+27
| | | | MFC after: 2 weeks
* Add new options, -e and -x, to display process environment variablestrociny2011-11-226-12/+228
| | | | | | and ELF auxiliary vectors. MFC after: 2 weeks
* Announce flow control capability to underlying PHY driver.yongari2011-11-221-4/+11
| | | | | | Pause timer value is initialized to 0xFFFF. Controller allows just 4 different TX pause thresholds. The lowest possible threshold value looks too aggressive so use next available threshold value.
* Retire linprocfs_doargv(). Instead use new functions, proc_getargv()trociny2011-11-221-146/+14
| | | | | | | | | | and proc_getenvv(), which were implemented using linprocfs_doargv() as a reference. Suggested by: kib Reviewed by: kib Approved by: des (linprocfs maintainer) MFC after: 2 weeks
* Rework link establishment and link state detection logic.yongari2011-11-221-18/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove MIIBUS statchg callback and program VGE_DIAGCTL before initiating link establishment. Previously driver used to program VGE_DIAGCTL after getting a link in statchg callback. It seems the VGE_DIAGCTL register works like a kind of MII register such that it requires setting a 'to be' mode in advance rather than relying on resolved speed/duplex of established link. This means the statchg callback is not needed in driver. In addition, if there was no link at the time of media change, this was not called at all. - Introduce vge_ifmedia_upd_locked() to change current media to configured one. Actual media change is performed only after PHY reset and VGE_DIAGCTL setup. - In WOL configuration, make sure to clear forced mode such that controller can rely on auto-negotiation. - Unlike most other drivers that use miibus(4), vge(4) used controller's auto-polling feature for link state tracking via interrupt. This came from controller's inefficient mechanism to access MII registers. On link state change interrupt, vge(4) used to get current link state with series of MII register accesses. Because vge(4) already enabled auto polling, read PHY status register to resolved speed/duplex/flow control parameters. vge(4) still does not drive MII_TICK to reduce number of MII register accesses which in turn means the driver does not know the status of auto-negotiation. This was a one of long standing issue of vge(4). Probably driver may be able to implement a timer that keeps track of auto-negotiation state and restart auto-negotiation when driver couldn't establish a link within a specified period. However the controller does not provide a reliable way to detect auto-negotiation failure so I'm not sure whether it's worth to implement it in driver. Alternatively driver can completely disable MII auto-polling and let miibus(4) poll link state by driving MII_TICK. This may reduce unnecessary overhead of stopping/restarting MII auto-polling of controller. Unfortunately it was known that some variants of controller does not work correctly if MII auto-polling is disabled.
* In procfs_doproccmdline() if arguments are not cashed read them fromtrociny2011-11-221-30/+8
| | | | | | | | | the process stack. Suggested by: kib Reviewed by: kib Tested by: pho MFC after: 2 weeks
* Add new sysctls, KERN_PROC_ENV and KERN_PROC_AUXV, to returntrociny2011-11-223-5/+409
| | | | | | | | | | | | | | | | environment strings and ELF auxiliary vectors from a process stack. Make sysctl_kern_proc_args to read not cached arguments from the process stack. Export proc_getargv() and proc_getenvv() so they can be reused by procfs and linprocfs. Suggested by: kib Reviewed by: kib Discussed with: kib, rwatson, jilles Tested by: pho MFC after: 2 weeks
* Improve logging:glebius2011-11-221-2/+2
| | | | | | - don't hardcode function name - use LOG_DEBUG for such a debug message - print error value
* style(9) nitglebius2011-11-221-1/+2
|
* Fix SIOCDIFADDR semantics: if no address is specified, then delete first one.glebius2011-11-221-1/+1
|
* - Add a DEVMETHOD_END alias for KOBJMETHOD_END so that along with 'driver_t'marius2011-11-222-3/+4
| | | | | | | | | and DEVMETHOD() we can fully hide the explicit mention of kobj(9) from device drivers. - Update the example in driver.9 to use DEVMETHOD_END. Submitted by: jhb MFC after: 3 days
* Always start MII auto polling before accessing any MII registers.yongari2011-11-221-0/+2
|
* Define __FreeBSD_kernel__ macro in sys/param.h.rmh2011-11-221-0/+16
| | | | | | | | | | | | | | | | | __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, which by definition is always true on FreeBSD. This macro is also defined on other systems that use the kernel of FreeBSD, such as GNU/kFreeBSD. It is tempting to use this macro in userland code when we want to enable kernel-specific routines, and in fact it's fine to do this in code that is part of FreeBSD itself. However, be aware that as presence of this macro is still not widespread (e.g. older FreeBSD versions, 3rd party compilers, etc), it is STRONGLY DISCOURAGED to check for this macro in external applications without also checking for __FreeBSD__ as an alternative. Approved by: kib (mentor) MFC after: 2 weeks
* Append unit number to the WMI status device name to allow attachingjh2011-11-222-6/+6
| | | | | | | multiple acpi_wmi(4) instances. PR: kern/162491 Reviewed by: avg
* Avoid panics from recursive rename operations. Not a perfect patch butivoras2011-11-221-6/+3
| | | | | | | | | good enough for now. PR: kern/159418 Submitted by: Gleb Kurtsou Reviewed by: kib MFC after: 1 month
* Fix a crash when trying to duplicate a locale that contains some implicit C ↵theraven2011-11-221-1/+6
| | | | | | | locale components. Reported by: Michael Butler Approved by: dim (mentor)
* Put all the messages from msdosfs under the MSDOSFS_DEBUG ifdef.kib2011-11-225-1/+24
| | | | | | They are confusing to user, and not informative for general consumption. MFC after: 1 week
* Remove the wrong comment about ufs not being loadable.kib2011-11-221-5/+4
| | | | | | | Note that only root filesystem module needs to be available before root is mounted. MFC after: 1 week
* - Use ppb_assert_locked() rather than using explicit mtx_assert callattilio2011-11-224-34/+12
| | | | | | - Make ppbus code agnostic in regard of INVARIANTS option MFC after: 2 weeks
* - fix some style(9) nits with my last commiteadler2011-11-222-3/+5
| | | | | | | - add a comment explaining why I used '|' instead of '||' Submitted by: danfe@ Approved by: emaste@
* This patch enables the new/default NFS server's use of sharedrmacklem2011-11-221-9/+1
| | | | | | | vnode locking for read, readdir, readlink, getattr and access. It is hoped that this will improve server performance for these operations, since they will no longer be serialized for a given file/vnode.
* - add check for pointer equality prior to performing the O(n) passeadler2011-11-224-18/+28
| | | | | | | | | - while here change 's' to 's1' in strcoll Submitted by: eadler@ Reviewed by: theraven@ Approved by: brooks@ MFC after: 2 weeks
* (Hopefully) Fix the build with clang by removing a typedef that's no longer ↵theraven2011-11-211-2/+0
| | | | | | needed. Approved by: brooks (mentor)
* Use the correct lock when calling msleep().adrian2011-11-211-1/+1
| | | | | | | | | This fixes panics that users have been seeing when operating in station mode, where the interface undergoes a lot more resets then in hostap mode (ie whilst doing channel scanning.) Reported by: arundel, wblock@wonkity.com Sponsored by: Hobnob, Inc.
* The DC calibration result obtained during initialization can't bebschmidt2011-11-212-1/+29
| | | | | | | | | | passed over to the runtime firmware on 6050 devices. Instead let the runtime firmware do the calibration itself. This fixes support for the 6050 series devices. Obtained from: OpenBSD Submitted by: kevlo Tested by: lx, Tz-Huan Huang(earlier version)
* Fix some whitespace pollution.adrian2011-11-211-3/+1
|
OpenPOWER on IntegriCloud