summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Use the correct file name for the ldscript.cognet2005-11-251-2/+2
|
* Send the packet to BPF after setting the duration field of the frame.damien2005-11-241-24/+24
| | | | MFC after: 1 week
* o Force the sending of an extra URB if there is less than 2 bytes leftdamien2005-11-241-5/+23
| | | | | | | | at the end of the last URB (URB = USB Request Block = 64 bytes). o Free the AMRR reserved xfer in detach. o Minor tweaks. MFC after: 1 week
* Fix the following bugs:ru2005-11-241-5/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - In ifc_name2unit(), disallow leading zeroes in a unit. Exploit: ifconfig lo01 create - In ifc_name2unit(), properly handle overflows. Otherwise, either of two local panic()'s can occur, either because no interface with such a name could be found after it was successfully created, or because the code will bogusly assume that it's a wildcard (unit < 0 due to overflow). Exploit: ifconfig lo<overflowed_integer> create - Previous revision made the following sequence trigger a KASSERT() failure in queue(3): Exploit: ifconfig lo0 destroy; ifconfig lo0 destroy This is because IFC_IFLIST_REMOVE() is always called before ifc->ifc_destroy() has been run, not accounting for the fact that the latter can fail and leave the interface operating (like is the case for "lo0"). So we ended up calling LIST_REMOVE() twice. We cannot defer IFC_IFLIST_REMOVE() until after a call to ifc->ifc_destroy() because the ifnet may have been removed and its memory has been freed, so recover from this by re-inserting the ifnet in the cloned interfaces list if ifc->ifc_destroy() indicates a failure.
* Fix typo.le2005-11-242-2/+2
|
* Remember the bus_dmamap_t where we loaded the mbuf, and sync this map insteadcognet2005-11-241-1/+3
| | | | of tx_buffer->map, or we could end up syncing the wrong map.
* Since we want a vinum geom created anytime the module loads, movele2005-11-243-137/+28
| | | | | | | | | | | the geom creation to a seperate init function and ignore the tasting. The config is now parsed only in the vinumdrive geom, which hopefully fixes the problem, that the drive class tasted before the vinum class had a chance, for good. Also restore the behaviour that the module can be loaded at boot time and on a running system.
* Fix parsing of atime, clusterr, clusterw, exec, suid, symfollowrodrigc2005-11-241-4/+4
| | | | | | mount options. Noticed by: Amir Shalem < amir at boom dot org dot il>
* Fix prototype.ru2005-11-241-1/+1
|
* Fix prototype to match the code and documentation.ru2005-11-241-1/+1
|
* Add missing "struct" in i386/i386/machdep.c,v 1.497 by deischen@.ru2005-11-244-4/+4
|
* Only copy out the battery status/info if there was no error.njl2005-11-241-5/+6
|
* Use a magic number to know we were started from the elf wrapper.cognet2005-11-243-9/+24
| | | | Add a dummy _start function to make the non-elf version of the wrapper work.
* Create a non-elf pure binary version of the kernel as well.cognet2005-11-242-15/+34
|
* Merge in new driver version from Intel - 3.2.18.glebius2005-11-243-170/+497
| | | | | | | | The most important change is support for adapters based on 82571 and 82572 chips. Tested on: 82547EI on i386 Tested on: 82540EM on sparc64
* Correct division by zero error in comment.kris2005-11-241-1/+1
|
* In nmount() and vfs_donmount(), do not strcmp() the options in the iovecrodrigc2005-11-231-36/+46
| | | | | | | | | | | | | | directly. We need to copyin() the strings in the iovec before we can strcmp() them. Also, when we want to send the errmsg back to userspace, we need to copyout()/copystr() the string. Add a small helper function vfs_getopt_pos() which takes in the name of an option, and returns the array index of the name in the iovec, or -1 if not found. This allows us to locate an option in the iovec without actually manipulating the iovec members. directly via strcmp(). Noticed by: kris on sparc64
* Add locking and mark MPSAFE:jhb2005-11-232-55/+98
| | | | | | | | | | | - Add locked variants of start, init, and ifmedia_upd. - Add a mutex to the softc and remove spl calls. - Use callout(9) rather than timeout(9). - Setup interrupt handler last in attach. - Use M_ZERO rather than bzero. MFC after: 1 week Tested by: wpaul
* MFi386: Sort and add COUNT_{IPIS,XINVLTLB_HITS}.jhb2005-11-231-2/+4
| | | | Pointy hat to: jhb (2)
* Sort.jhb2005-11-232-5/+5
|
* MFP4: Bring in arm9 cache-related functionscognet2005-11-231-50/+169
| | | | Obtained from: NetBSD
* Optimize PLCP length field computation for 802.11b rates.damien2005-11-232-10/+8
|
* Somehow memmove() got mapped to memset() in the patch table. Create awpaul2005-11-231-1/+12
| | | | real memmove() implementation and use that instead.
* - Quiet the pci_link(4) devices so that they don't show up in dmesg now.jhb2005-11-231-1/+22
| | | | | | | | | | | - Improve panic message if we fail to read the PCI bus number from a bridge device. - Don't try to lookup a BIOS IRQ for a link unless the link is routed via an ISA IRQ since BIOSen currently only route PCI link devices via ISA IRQs. Tested by: Mathieu Prevot bsdhack at club-internet dot fr MFC after: 1 week
* Userland applications may include queue.h and define INVARIANTSemaste2005-11-231-2/+2
| | | | | | | | but not provide a panic(9) implementation. Thus, enable the sanity checks under INVARIANTS only if _KERNEL is also defined. Submitted by: jmallett Approved by: rwatson (mentor)
* Try to fix problems with periodic hangs by never directly calling _BIF.njl2005-11-231-22/+34
| | | | | | | | Instead, re-evaluate _BIF only when we get a notify and use the cached results. We also still evaluate _BIF once on boot. Also, optimize the init loop a little by only querying for a particular info if it's not valid. MFC after: 2 days
* Simplify checks for valid battery info via DeMorgan's Rule. Nonjl2005-11-231-9/+3
| | | | functional change.
* Garbage collect machine/smptests.h now that it is empty and no longer used.jhb2005-11-222-42/+0
|
* Make COUNT_IPIS and COUNT_XINVLTLB_HITS real kernel options and takejhb2005-11-225-14/+7
| | | | them out of machine/smptests.h.
* Garbage collect unused {VERBOSE_,}CPUSTOP_ON_DDBBREAK macros.jhb2005-11-221-6/+0
|
* Garbage collect the code to store diagnostics codes in a CMOS registerjhb2005-11-223-107/+0
| | | | | | | during SMP startup. We haven't had any issues with starting up the APs on i386 in quite a while now which is all this code is really useful for. If someone ever does really need it they can always dig it up out of the attic.
* - Add a workaround (change the interrupt map mask to compare the fullmarius2005-11-222-29/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | INO) for incorrect interrupt map entries on E250 machines. These incorrect entries caused the INO of the on-board HME to be also assigned to the second on-board NS16550 and to the on-board printer port controller. Further down the road caused hme(4) to fail to attach to the on-board HME in FreeBSD 5 and 6 as INTR_FAST and non-INTR_FAST handlers can't share the same IRQ there (it's unknown what whould happen in -CURRENT now that INTR_FAST and non-INTR_FAST handlers can share an IRQ but I'd expect funny problems with uart(4)). - Make sure there are exactly 4 PCI ranges instead of just checking that the bridge has a 'ranges' property in the OFW device tree at all. Besides the fact that currently the 64bit memory range isn't used by this driver it we can't really work with less than 4 ranges and don't have memory for more than 4 bus handles for the ranges in the softc. - Remove sc_range and sc_nrange from softc; for the bridges supported by this driver we no longer need to know the ranges besides the bus handles obtained from them once this driver is attached. That way we also can free the memory allocated for sc_range during attach again. - Remove sc_dvmabase from the softc and pass it to psycho_iommu_init() via an additional argument as we no longer need to know the DVMA base in this driver once the IOMMU is initialized. - Remove sc_dmatag from the softc, there isn't much sense in keeping the nexus dma tag around locally. PR: 88279 [1] Info from: OpenSolaris [1] Tested by: kensmith [1] MFC after: 1 month
* Some clean-up, style changes and changes that will reduce differencesmarius2005-11-223-247/+244
| | | | | | | | | | | | | | | | | | | | | | | | | between this driver and other Host-PCI bridge drivers based on this one: - Make the code fit into 80 columns. - Make the code adhere style(9) (don't use function calls in initializers, use uintXX_t instead of u_intXX_t, add missing prototypes, ...). - Remove unused and superfluous struct declaration, softc member, casts, includes, etc. - Use FBSDID. - Sprinkle const. - Try to make comments and messages consistent in style throughout the driver. - Use convenience macros for the number of interrupts and ranges of the bridge. - Use __func__ instead of hardcoded function names in panic strings and error messages. Some of the hardcoded function names actually were outdated through moving code around. [1] - Rename softc members related to the PCI side of the bridge to sc_pci_* in order to make it clear which side of the bridge they refer to (so stuff like sc_bushandle vs. sc_bh is less confusing while reading the code). PR: 76052 [1]
* - Add ofw_bus_if.h to SRCS on sparc64 as envctrl.c and pcf_ebus.c dependmarius2005-11-221-8/+11
| | | | | | on it. - Sync with sys/conf/files* and build pcf_isa.c only on i386 for now. - Try to adhere to style.Makefile(5) (sorting, whitespace).
* Conditionalize the compilation of the envctrl.c front-end of pcf(4)marius2005-11-221-1/+1
| | | | | | additionally on ebus(4) as the 'SUNW,envctrl' devices (as well as 'SUNW,envctrltwo' and 'SUNW,rasctrl', which we might want to also support in envctrl.c in the future) are only found on EBus.
* Move zs.c from files to files.powerpc as zs(4) by now is only supportedmarius2005-11-222-1/+1
| | | | | | | | | on powerpc (more or less...). That way people updating from FreeBSD 5 to FreeBSD 6 and beyond on sparc64 will get an error from config(8) rather than a mysterious compile error when they have a stale 'device zs' in their kernel config file. MFC after: 2 weeks
* - Convert these bus drivers to make use of the newly introduced set ofmarius2005-11-229-611/+334
| | | | | | | | | | | | | ofw_bus_gen_get_*() for providing the ofw_bus KOBJ interface in order to reduce code duplication. - While here sync the various sparc64 bus drivers a bit (handle failure to attach a child gracefully instead of panicing, move the printing of child resources common to bus_print_child() and bus_probe_nomatch() implementations of a bus into a <bus>_print_res() function, ...) and fix some minor bugs and nits (plug memory leaks present when attaching a bus or child device fails, remove unused struct members, ...). Additional testing by: kris (central(4) and fhc(4))
* - Add a new method ofw_bus_default_get_devinfo() that allows to retrievemarius2005-11-225-2/+215
| | | | | | | | | | | | | | | | a newly introduced struct ofw_bus_devinfo which can hold the OFW info of a device recallable via the ofw_bus KOBJ interface. Introduce a set of functions ofw_bus_gen_get_*() which use ofw_bus_default_get_devinfo() to provide generic subroutines for implementing the rest of the ofw_bus KOBJ interface in a bus driver. This is inspired by bus_get_resource_list() and bus_generic_rl_*_resource() and allows to reduce code duplication in bus drivers as they only have to provide an ofw_bus_default_get_devinfo() implementation in order to provide the ofw_bus KOBJ interface via ofw_bus_gen_get_*(). - While here add a comment to ofw_bus_if.m describing the intention of the ofw_bus KOBJ interface. Reviewed by: marcel
* Remove unused function and variables.marius2005-11-221-19/+0
|
* Check IFF_DRV_RUNNING in the re_intr() loop. It can disappear,glebius2005-11-221-4/+6
| | | | | | since re_rxeof() drops the lock for some time. Reported & tested by: XueFeng Deng <dsnofe yahoo.com.cn>
* Fix interaction with Windows 2000/XP based servers:bp2005-11-221-1/+3
| | | | | | | | | | If the complete reply on the TRANS2_FIND_FIRST2 request fits exactly into one responce packet, then next call to TRANS2_FIND_NEXT2 will return zero entries and server will close current transaction. To avoid subsequent errors we should not perform FIND_CLOSE2 request. PR: kern/78953 Submitted by: Jim Carroll
* Cache the result of battery info retrieval from smbat as wellume2005-11-221-22/+77
| | | | | | | as cmbat. Reviewed by: njl MFC after: 3 days
* Prevent module unloading if there are active connections.bp2005-11-221-1/+2
| | | | | | PR: kern/89085 Submitted by: Rostislav Krasny MFC after: 1 week
* Fix a bug in the loop in sonewconn that makes room on the incompletejdp2005-11-222-2/+2
| | | | | | | | | connection queue for a new connection. It was removing connections from the wrong list. Submitted by: Paul Mikesell Sponsored by: Isilon Systems MFC after: 1 week
* Resolve misalignment traps caused by changes to IF_LLADDR().marcel2005-11-222-8/+8
| | | | | | | | | Use de16dec() and le16dec() to fetch the link-level address from struct ifnet. Tested on: alpha Reviewed by: jhb See also: de(4)
* Overhaul nve(4) locking to make it more like other ethernet drivers injhb2005-11-212-91/+113
| | | | | | | | | | | | | | | | | the tree. - Add locked variants of nve_start(), nve_init(), and nve_ifmedia_upd(). - Use callout_* to manage callouts rather than timeout(9). - Mark interrupt handler MPSAFE (IFF_NEEDGIANT was already clear). - Lock the driver lock in driver entry points such as the interrupt handler, if_start, and if_init rather than locking the driver mutex in the various work functions called by the binary blob. The spin lock used by the binary block can probably be stubbed out now. - Use IFQ_DRV_IS_EMPTY() macro rather than doing it by hand. - Fix locking in detach. - Remove some unused fields from the softc. Tested by: cognet MFC after: 2 weeks
* Fix the code to look up the BIOS IRQ for a given link device by readingjhb2005-11-211-3/+15
| | | | | | | | | | | | | | | the IRQ set by the BIOS in existing devices to actually get the correct bus number of the child PCI bus. I was not reading the bus number from the bridge device correctly. The __BUS_ACCESSOR() macros (from which pcib_get_bus() is built) assume that the passed in argument is a child device. However, at the time I'm reading the bus there is no child device yet, so I was passing in the pcib device as the child device. The parent of the pcib device probably returned an error in the case of a host bridge, thus resulting in random stack garbage for the bus number. For PCI-PCI bridges, the bus number being used was actually the subvendor of the PCI-PCI bridge device itself. MFC after: 1 week
* Various fixes to make de(4) not panic after ru@'s IF_LLADDR() changes:jhb2005-11-214-60/+44
| | | | | | | | | | | | | | | - Don't call tulip_addr_filter() to reset the RX address filter in tulip_reset() since that gets called before ether_ifattach(). Just call it in tulip_init_locked(). - Use be16dec() and le16dec() to parse MAC addresses when programming the RX filter. - Let ether_ioctl() handle SIOCSIFMTU since we were doing the exact same thing with the added bonus that we leaked the driver lock if the MTU was > ETHERMTU in the homerolled version. This part will be MFC'd. Clue from: wpaul (1) Stolen from: marcel (2 via patch for dc(4)) MFC after: 1 week
* Turn PUC_FASTINTR back off on by default on sparc64 since it breaks withjhb2005-11-211-2/+0
| | | | | | the built-in serial ports on the ultra60 and e4500. In collusion with: kris
* Don't enable PUC_FASTINTR by default in the source. Instead, enable itjhb2005-11-217-4/+12
| | | | | | | | | | | via the DEFAULTS kernel configs. This allows folks to turn it that option off in the kernel configs if desired without having to hack the source. This is especially useful since PUC_FASTINTR hangs the kernel boot on my ultra60 which has two uart(4) devices hung off of a puc(4) device. I did not enable PUC_FASTINTR by default on powerpc since powerpc does not currently allow sharing of INTR_FAST with non-INTR_FAST like the other archs.
OpenPOWER on IntegriCloud