summaryrefslogtreecommitdiffstats
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
* sys/dev/hwpmc/hwpmc_{amd,piv,ppro}.c:jkoshy2005-07-095-34/+44
| | | | | | | | | | | | | | | | | | - Update driver interrupt statistics correctly. sys/sys/pmc.h, sys/dev/hwpmc/hwpmc_mod.c: - Fix a bug affecting debug printfs. - Move the 'stalled' flag from being in a bit in the 'pm_flags' field of a 'struct pmc' to a field of its own in the same structure. This flag is updated from the NMI handler and keeping it separate makes it easier to avoid races with other parts of the code. sys/dev/hwpmc/hwpmc_logging.c: - Do arithmetic with 'uintptr_t' types rather that casting to and from 'char *'. Approved by: re (scottl)
* Use m_length (m, NULL) instead of m->m_pkthdr.len.rik2005-07-093-3/+3
| | | | | Problems reported by: strijar at urai dot ru Approved by: re (scottl)
* Lost cx_mpsafenet check.rik2005-07-091-2/+3
| | | | | Pointy hat: me Approved by: re (scottl)
* Lost t_oproc() callback assignment.rik2005-07-091-0/+1
| | | | | Pointyhats: phk (who lost it), me (who didn't notice that) Approved by: re (scottl)
* Lost CX_UNLOCK().rik2005-07-091-0/+4
| | | | | Pointy hat: me Approved by: re (scottl)
* Protect from partially initialized channels.rik2005-07-093-0/+6
| | | | Approved by: re (scottl)
* Space & alignment nits.rik2005-07-093-21/+20
| | | | Approved by: re (scottl)
* Fix the build. The SMC_8020BT define doesn't exist yet.scottl2005-07-091-0/+2
| | | | Approved by: re (implicit)
* Noticed that NetBSD's sm driver has the PSION GOLDCARD listed, so listimp2005-07-091-3/+2
| | | | | | | | | | | that since I can't test it directly. The driver also lists the EM1144 as being supported, but in reality it isn't. The EM1144-T, {XJ,CC}{3288,3336} have the SMC chips in them, but aren't conformant MFC cards, so they need their own driver. Also, it does little harm to list the 8020BT, so remove #if 0. Approved by: re (scottl)
* oops ... forgot to declare sc in my previous commit. unbreak build.damien2005-07-081-0/+1
| | | | Approved by: re (scottl)
* fix allocation of rx dma buffers. buffers must be contiguous.damien2005-07-081-2/+2
| | | | Approved by: re (scottl)
* Make sure that all the necessary USB endpoints are found during devicedamien2005-07-082-2/+7
| | | | | | | attachment. Reviewed by: silby (mentor) Approved by: re (scottl)
* ral_init() takes a struct ral_softc as parameter not a struct ifnet.damien2005-07-082-2/+2
| | | | | | | Fixes a panic that occured when setting the interface parameters while the interface was associated. Approved by: re (scottl)
* reclaim node reference when ieee80211_encap failssam2005-07-083-4/+13
| | | | | Reviewed by: avatar Approved by: re (scottl)
* update ural idssam2005-07-082-2/+34
| | | | | | Reviewed by: damien Approved by: re (scottl) Obtained from: openbsd
* reclaim mbuf when ieee80211_crypto_encap failssam2005-07-074-4/+12
| | | | | Approved by: re (scottl) Obtained from: netbsd
* Fix ifnet fallout in if_ti.scottl2005-07-071-8/+7
| | | | | Reviewed by: brooks Approved by: re
* only invoke ath_rate_tx_complete to update rate control state when thesam2005-07-072-1/+5
| | | | | | | | | | frame being sent is to be ack'd and hasn't been filtered by the h/w; this insures we don't pass in tx descriptors that have no meaningful state (e.g. mcast/bcast frames are not acked and so have no tx retry counts) Approved by: re (scottl) Obtained from: Atheros
* Add support for Farallon EtherMAC PC Card.imp2005-07-064-66/+65
| | | | | | | | | Move ethernet MAC address setting into pccard attachment Fix panic from IFP2ENADDR() use prior to if_alloc Remove OLDCARD compat support. This should work still on oldcard, however. sn_attach now requires that the resources be activated now, so adjust. Approved by: re (scottl)
* Add device entry for a Farallon EtherMac PC Card that I won on ebay. Thisimp2005-07-061-0/+1
| | | | | | one is supported by the sn driver. Approved by: re (scottl)
* Add support for IODATA USB-RSAQ3 USB-Serial Adapter.hrs2005-07-032-0/+3
| | | | | | Reported by: Tomokazu Hirai Approved by: re (scottl) MFC after: 3 days
* - Update the CPU version check to recognize P4/EMT64 CPUs. [1]jkoshy2005-07-031-1/+1
| | | | | | | | | - Allow libpmc(3) to support P4/EMT64 PMCs on the amd64 architecture and AMD K8 PMCs on the i386. [2] Submitted by: ps [1] Pointy hat: myself [2] Approved by: re (scottl)
* o Make ipw(4) more robust against frames received with a bad length.damien2005-07-031-3/+9
| | | | | | | o Minor consistency tweaks. Reviewed by: silby (mentor) Approved by: re (scottl)
* o Add new ids for the Belkin F5D7050damien2005-07-031-3/+10
| | | | | | | | | o Indent usb ids properly o Check the return value of if_alloc() o Call if_free() in ural_detach() Reviewed by: silby (mentor) Approved by: re (scottl)
* Add another ural(4) device (Belkin F5D7050)damien2005-07-031-0/+1
| | | | | Reviewed by: silby (mentor) Approved by: re (scottl)
* Upon relection, we shouldn't allow the tuple structs to be modified byimp2005-07-013-11/+7
| | | | | | | the functor, so make it a const pointer, and chase down the resulting const-poisoning. Approved by: re (scottl)
* Fix another fallout from the ifnet change that assumed that a softcharti2005-07-016-9/+9
| | | | | | | starts with an ifatm which in turns has an ifnet. Remove also a couple of unneccessary casts that could hide such things in the future. Approved by: re
* Make a pass and cleanup the printfs from this driver.imp2005-07-013-21/+11
| | | | Approved by: re (scottl) blanket ep
* Minor cleanup of ep driver and pccard attachment:imp2005-07-013-45/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Grab the MAC address out of the CIS if the card has the special 3Com 0x88 tuple. Most 3Com cards don't have this tuple, but we prefer it to the eeprom since it only appears to be present when the eeprom doesn't have the info. So far, I've only observed this on my 3C362 and 3C362B cards, but the NetBSD driver implies that the 3C362C also has this tuple, and that some 3C574 cards do too (none of mine do). ep_pccard_mac was written after looking at the NetBSD code. o Store the enet addr in the softc for this device, so we can use the overridden MAC to set the station address. o Create a routine to set the station address and use it where we need it. o setup the cmd shitfs and such before we call ep_alloc(), and remove setting up the cmd shift value there. It initializes to 0, and those attachments that need to frob it do so before calling ep_alloc. o Remove some obsolete comments o No longer a need to export ep_get_macaddr, so make it static o ep_alloc already grabs the EEPROM id, so we don't need to grab it again in ep_pccard_attach. o eliminate unit, it isn't needed, fix some printfs to be device_printf instead. # All my pccards except the 3C1 work now. Didn't test ISA or cbus cards # that I have: 3C509B-TP or 3C569B-J-TPO Tested on: 3C589B, 3C589C, 3C589D, 3C589D-TP, 3C562, 3C562B/3C563B, 3C562D/3C563D, 3CCFE574BT, 3CXEM556, 3CCSH572BT, 3C574-TX, 3CCE589EC, 3CXE589EC, 3CCFEM556, 3C1 Approved by: re (scottl)
* Use correct pointer type. This should fix non-functional re(4)yongari2005-07-011-1/+1
| | | | | | driver on 64bit architectures. Approved by: re (scottl)
* Add a much-requested feature: The ability for pccard attachments toimp2005-07-014-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | scan the CIS for interesting tuples. 95% of what can be obtained from the CIS is harvested by the pccard layer and presented to the user in standard function calls. However, there are special needs at times where the standard stuff doesn't suffice. This is for those special cases. CARD_SCAN_CIS(device_get_parent(dev), function, argp) scans the CIS of the card, passing each tuple to function with the tuple and argp as its arguments. Returning 0 continues the scan, while returning 1 terminates the scan. The value of the last invocation of function is returned from this function. int (*pccard_scan_t)(struct pccard_tuple *tuple, void *argp) function called for each tuple. Elements of the CIS tuple can be read with pccard_tuple_read_{1,2,3,4,n}(). You are reading the actual tuple memory each time, in case your card has registers in the CIS. # I suppose these things should be documented in pccard(4) or something like # that. # I plan on unifying cardbus CIS support in a similar way. Approved by: re (scottl)
* MFP4:jkoshy2005-06-302-24/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - pmcstat(8) gprof output mode fixes: lib/libpmc/pmclog.{c,h}, sys/sys/pmclog.h: + Add a 'is_usermode' field to the PMCLOG_PCSAMPLE event + Add an 'entryaddr' field to the PMCLOG_PROCEXEC event, so that pmcstat(8) can determine where the runtime loader /libexec/ld-elf.so.1 is getting loaded. sys/kern/kern_exec.c: + Use a local struct to group the entry address of the image being exec()'ed and the process credential changed flag to the exec handling hook inside hwpmc(4). usr.sbin/pmcstat/*: + Support "-k kernelpath", "-D sampledir". + Implement the ELF bits of 'gmon.out' profile generation in a new file "pmcstat_log.c". Move all log related functions to this file. + Move local definitions and prototypes to "pmcstat.h" - Other bug fixes: + lib/libpmc/pmclog.c: correctly handle EOF in pmclog_read(). + sys/dev/hwpmc_mod.c: unconditionally log a PROCEXIT event to all attached PMCs when a process exits. + sys/sys/pmc.h: correct a function prototype. + Improve usage checks in pmcstat(8). Approved by: re (blanket hwpmc)
* o Fix a write mbuf-after-free bug. The duration field of the 802.11 headerdamien2005-06-291-9/+23
| | | | | | | | | | | was written in the old fragmented mbuf chain instead of the defragmented one. Thus, the duration field of outgoing frames was incorrect. o Only call m_defrag() if the mbuf fragmentation threshold is greater than what is currently supported by the driver. Reviewed by: silby (mentor) Approved by: re (scottl)
* Add a chipset field to the lookup. Use this chipset type to determineimp2005-06-281-168/+58
| | | | | | | | | | | | which command to use to read the eeprom and which devices have an MII. Simplify code by no longer using the OLDCARD compat rouintes (I don't know if this breaks OLDCARD on pc98 or not, but OLDCARD on pc98 days are numbered, I hope). This also removes a number of kludges that we had before because they are OBE. Add a convenience routine to lookup the device to avoid many casts in many places. Tested with: 3C589D-TP, 3CCSH572BT Approved by: re (scottl, blanket ep)
* Disable the drm_initmap calls in radeon_cp.c, due to them resulting in improperanholt2005-06-281-0/+6
| | | | | | | | | | handling of pci resources, and mapping framebuffer leading to panics on X startup. The proper solution involves use of bus_alloc_resource without RF_ACTIVE, but this code is being rewritten in DRM CVS currently, and disabling for now doesn't remove any features, so take the easy route. PR: kern/80718 Approved by: re (scottl)
* Zero donecount on auto request sense.sos2005-06-281-0/+1
| | | | | PR: 81450 Approved by: re@ (scottl)
* Dont call ata_finish in ad_dump as that is no longer needed and causes panic.sos2005-06-271-10/+11
| | | | | | | Dont try to enable read/write caching on devices that doesn't support it, this reduces the noise from ATA on flash devices and the like. Approved by: re@ (scottl)
* Implement suspend/resume operation for snd_csa(4)glebius2005-06-274-17/+220
| | | | | | | PR: kern/82243 Submitted by: Serge Semenenko Approved by: re (scottl) MFC after: 1 month
* Add a quirk for a motherboard whose acpi timer runs too fast.dwmalone2005-06-261-0/+8
| | | | | | Approved by: re (scottl) Approved by: nate MFC after: 2 weeks
* Fix some long standing bugs in writing to the BPF device attached todwmalone2005-06-261-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | a DLT_NULL interface. In particular: 1) Consistently use type u_int32_t for the header of a DLT_NULL device - it continues to represent the address family as always. 2) In the DLT_NULL case get bpf_movein to store the u_int32_t in a sockaddr rather than in the mbuf, to be consistent with all the DLT types. 3) Consequently fix a bug in bpf_movein/bpfwrite which only permitted packets up to 4 bytes less than the MTU to be written. 4) Fix all DLT_NULL devices to have the code required to allow writing to their bpf devices. 5) Move the code to allow writing to if_lo from if_simloop to looutput, because it only applies to DLT_NULL devices but was being applied to other devices that use if_simloop possibly incorrectly. PR: 82157 Submitted by: Matthew Luckie <mjl@luckie.org.nz> Approved by: re (scottl)
* o When calling ep_get_macaddr(), provide it a local buffer. Add a commentimp2005-06-264-19/+22
| | | | | | | | | that says why we do this (or rather, explains that it is some voodoo magic that's poorly understood). The local buffer fixes the crash on attach. o Rename get_e() to ep_get_e() to avoid namespace pollution. Submitted by: mux Approved by: re (scottl)
* Make the initialization in the AGPv3 case match that of Linux. Fixes hangs onanholt2005-06-261-8/+28
| | | | | | | X startup with DRI enabled, with a v3-capable card. Tested by: Tom McLaughlin <tmclaugh@sdf.lonestar.org> Approved by: re (scottl)
* Mark the permanent map for radeon registers read-only. Failure to set this flaganholt2005-06-241-1/+2
| | | | | | | | | allowed writing to the registers by any user that can open the DRI device, and therefore ability to initiate DMA. This came in with the merge from DRI CVS on 2005-04-15. Approved by: re (scottl) Obtained from: DRM CVS
* Backout the change I made before 5.4-R since I wasn't aware that it was onlydwhite2005-06-241-0/+21
| | | | | | | | | | | | | a problem with one particular switch module. Create a kernel option BGE_FAKE_AUTONEG that restores the 5.4 behavior, which should make the DNLK switch module work. IBM/Intel blades with Intel or AD switch modules should work without patching or kernel options with this commit. Hardware for testing provided by several folks, including Danny Braniss <danny@cs.huji.ac.il>, Achim Patzner <ap@bnc.net>, and OffMyServer. Approved by: re
* Eliminate unused argument in PCMCIA_CARD macro.imp2005-06-2419-211/+238
| | | | | | | | Provide a backwards compatible way to have the extra macro by defining PCCARD_API_LEVEL 5 before including pccarddevs for driver writers that want/need to have the same driver on 5 and 6 with pccard attachments. Approved by: re (dwhite)
* Add wireless + flash CF card I haveimp2005-06-241-0/+1
| | | | Approved by: re (pccard API changes)
* Fix a read mbuf-after-free error in the iwi driver that was provoked bysilby2005-06-231-9/+6
| | | | | | | the trash allocator being used on mbufs. Reviewed by: damien Approved by: re (scottl)
* polled commands can read or write, so bus_dmamap_sync properlyps2005-06-231-2/+16
| | | | | | according to the type of request. Approved by: re
* Struct ifatm isn't at the beginning of the softc anymore. Use theharti2005-06-221-2/+2
| | | | | | correct way (IFP2IFATM()) to access it. Approved by: re
* Free the struct ifnet when detaching is complete. Also add BPF stuff.harti2005-06-221-0/+23
| | | | Approved by: re
OpenPOWER on IntegriCloud