summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Assert that the entropy source category provided by a caller submittingrwatson2004-10-121-0/+6
| | | | | entropy is valid, as an invalid source will cause dereferencing of an array of queues to an incorrect memory location.
* Add a note ahea of the esource enum that if new entropy sourcerwatson2004-10-121-0/+4
| | | | | categories are added, the set of entropy source assertions in the harvesting code also need to be updated.
* Do not enable ECHO modes by default when a tty port is opened. If the otherphk2004-10-121-1/+1
| | | | | device also does echo'ing this can result in a character-storm before we ever get a chance to disable the echo modes.
* Fix packet flow when both ng_ether(4) and bridge(4) are in use:glebius2004-10-124-51/+37
| | | | | | | | | | | | | | | - push all bridge logic from if_ethersubr.c into bridge.c make bridge_in() return mbuf pointer (or NULL). - call only bridge_in() from ether_input(), after ng_ether_input() was optinally called. - call bridge_in() from ng_ether_rcv_upper(). Long description: http://lists.freebsd.org/mailman/htdig/freebsd-net/2004-May/003881.html Reported by: Jian-Wei Wang <jwwang at FreeBSD.csie.NCTU.edu.tw> Tested by: myself, Sergey Lyubka Reviewed by: sam Approved by: julian (mentor) MFC after: 2 months
* Mark i4b IPR and SPPP drivers as NET_NEEDS_GIANT(), as they bothrwatson2004-10-122-0/+4
| | | | | | | | interface with the network stack but are not yet sufficiently synchronized to run without the Giant lock. It migh be possible to mark the interfaces as IFF_NEEDSGIANT, but I'm unable to test that configuration and am unfamiliar with the architecture of i4b.
* Use generic tty code.phk2004-10-121-94/+13
| | | | New device names are ttyy{unit}
* Use generic tty code instead of local copies.phk2004-10-121-269/+98
| | | | | | | | New devicename is ttyy{unit}{port} No callout devices created as there is no modemcontrol on these ports. Add data structure to represent each port to avoid excessive array use.
* Pass through the commands necessary to format USB floppy devices,bms2004-10-121-5/+4
| | | | | | | | | from within umass_ufi_transform(). This includes the 12-byte commands FORMAT_UNIT, WRITE_AND_VERIFY, VERIFY, and READ_FORMAT_CAPACITIES (sorted in numerical order). Reviewed by: ken, scottl MFC after: 2 weeks
* Add necessary data structures and definitions for the 12-byte SCSIbms2004-10-121-0/+79
| | | | | | | | commands READ_FORMAT_CAPACITIES, WRITE_AND_VERIFY, and VERIFY. Reviewed by: ken, scottl Source: USB Mass Storage UFI Specification v1.0 MFC after: 2 weeks
* Use generic tty code instead of (comparatively little) local copies.phk2004-10-122-171/+52
|
* Add missing zero flag argument.phk2004-10-121-1/+1
|
* Add zero flags argument to sysctl calls.phk2004-10-121-1/+1
|
* Add missing zero flag arguments to sysctl calls.phk2004-10-123-3/+3
| | | | Add missing pointy hat to peter@
* Add missing zero flag arguments to calls to userland_sysctl()phk2004-10-122-9/+10
|
* Account for failure in vm_pager_allocate() or vm_pager_get_pages() ingreen2004-10-121-1/+19
| | | | | | | | | md(8). The former is generally not going to fail, but the latter can fail when the underlying swap device returns an error. There are still plenty of other places where vm_pager_get_pages() failing will lead directly to crashes, so it's a good idea to put your swap on RAID if you care enough to put any of your disks on RAID....
* When loading GEOM modules, we expect the actual load process to be donegreen2004-10-121-1/+9
| | | | | | | | | | | | | | | | by the time that kldload(8) returns. Satisfy that by making the GEOM module load event -- only when the kernel is !cold -- wait until the GEOM module init function has finished instead of returning immediately. This is the other half of fixing md(8) (actually, "mfs" in fstab(5)) that is similar to r1.128 of src/sys/dev/md/md.c. This bug would be why RAM disks would often fail on boot and the first call to mdconfig(8) would probably fail. pjd has ideas for not requiring kldload(8) to work synchronously for control devices that could make this obsolete. Silence on: -arch
* Further modify bulk endpoint behavior to be able to tear down thegreen2004-10-121-4/+17
| | | | | current transfer fully in the "purge" routine, and to actually finish kicking out any read()s in progress.
* * Remove the acpi attachment from the es1888. It has an identify methodnjl2004-10-123-3/+2
| | | | | | | | | that conjures up the device node so it isn't true PNP. Noticed by jhb@. * Add an attachment for esscontrol since it too uses ISA_PNP_PROBE. * Move an attachment from snd_mss to snd_pnpmss. The latter is the real PNP user.
* Put on my peril sensitive sunglasses and add a flags field to the internalpeter2004-10-117-33/+84
| | | | | | | | | | | | | | | | sysctl routines and state. Add some code to use it for signalling the need to downconvert a data structure to 32 bits on a 64 bit OS when requested by a 32 bit app. I tried to do this in a generic abi wrapper that intercepted the sysctl oid's, or looked up the format string etc, but it was a real can of worms that turned into a fragile mess before I even got it partially working. With this, we can now run 'sysctl -a' on a 32 bit sysctl binary and have it not abort. Things like netstat, ps, etc have a long way to go. This also fixes a bug in the kern.ps_strings and kern.usrstack hacks. These do matter very much because they are used by libc_r and other things.
* Belatedly catch up with the dev_t/cdev changes from a few months back.peter2004-10-111-0/+5
| | | | | | | Extract the struct cdev pointer and the tty device from inside rather than incorrectly casting the 'struct cdev *' pointer to a 'dev_t' int. Not that this was particularly important since it was only used for reading vmcore files.
* MFi386: sync with latest updatespeter2004-10-111-3/+36
|
* Revert the change from rev 1.168. ru convinced me that the situationjoerg2004-10-111-1/+1
| | | | | | | that was fixed by this should not normally happen, and since I did not record the traces of my failed build attempt that had been solved with that change, it's not entirely clear whether it hadn't been a pilot error on my end. In dubio pro reo. :-)
* Trace information about a buffer while we still control it.ups2004-10-111-2/+3
| | | | | Reviewed by: phk Approved by: sam (mentor)
* Update C3 support when BM control is not present.njl2004-10-111-16/+28
| | | | | | * Fix a bug where caches were flushed on non-C3 transitions. * Be sure a working flush cache instruction is present before using it. * Disable C3 completely if it isn't present.
* Make the lower range of the memory area 0x80000000 again. Alsoimp2004-10-112-2/+20
| | | | | | introduce hw.{pci,acpi}.host_mem_start tunable to change this. MFC: ASAP
* Correctly unregister a netisr by clearing the ni->ni_queue field to NULL asandre2004-10-111-0/+1
| | | | | | | | | well. This field is actually used by various netisr functions to determine the availablility of the specified netisr. This uncomplete unregister leads directly to a crash when the KLD unregistering the netisr is unloaded. Submitted by: Sam <sah@softcardsystems.com> MFC after: 3 days
* Add acpi attachments for ISA sound drivers. This is needed so they'llnjl2004-10-114-0/+4
| | | | | | | probe and attach when ACPI is enabled. Submitted by: takawata (sbc fix) MFC after: 1 day
* Rename _m_tag_free() to m_tag_free_default() and make it non-static.glebius2004-10-112-3/+4
| | | | Approved by: sam
* Use a default MD_ROOT_SIZE of 65535.cognet2004-10-111-0/+1
|
* Use MD_ROOT_SIZE, instead of our own macro.cognet2004-10-111-7/+7
|
* When harvesting entropy from an ethernet mbuf, do so before freeing therwatson2004-10-111-1/+1
| | | | | | mbuf. RELENG_5 candidate.
* Add entropy harvest mutex to hard-coded spin lock witness lock order,rwatson2004-10-111-2/+1
| | | | | | | | remove previous entropy harvesting mutex names as they are no longer present. Commit to this file was ommitted when randomdev_soft.c:1.5 was made. Feet shot: Robert Huff <roberthuff at rcn dot com>
* Rework sofree() logic to take into account a possible race with accept().rwatson2004-10-111-5/+19
| | | | | | | | | | | | | | | | | | | | | | Sockets in the listen queues have reference counts of 0, so if the protocol decides to disconnect the pcb and try to free the socket, this triggered a race with accept() wherein accept() would bump the reference count before sofree() had removed the socket from the listen queues, resulting in a panic in sofree() when it discovered it was freeing a referenced socket. This might happen if a RST came in prior to accept() on a TCP connection. The fix is two-fold: to expand the coverage of the accept mutex earlier in sofree() to prevent accept() from grabbing the socket after the "is it really safe to free" tests, and to expand the logic of the "is it really safe to free" tests to check that the refcount is still 0 (i.e., we didn't race). RELENG_5 candidate. Much discussion with and work by: green Reported by: Marc UBM Bocklet <ubm at u-boot-man dot de> Reported by: Vlad <marchenko at gmail dot com>
* Assign pointer NULL, not 0.glebius2004-10-111-1/+1
| | | | Approved by: julian (mentor)
* Notify the user when the battery is critically low. In the future, wenjl2004-10-111-0/+4
| | | | | | | may want to shut down here but the chance of BIOS vendors getting this wrong is high. They're only supposed to announce this when all batteries hit their critical level but past experience indicates we should be conservative about this for now.
* If bus mastering control is not available (PM2_BLK), don't just disablenjl2004-10-111-16/+27
| | | | | C3. Instead, flush caches before entering C3. This may be slower but provides good power savings.
* Match surrounding style, not style(msmith).njl2004-10-111-16/+16
|
* Move the code for halting the CPU (acpi_cpu_c1) into machdep files.njl2004-10-117-17/+25
| | | | | | This removes the last MD portion of acpi_cpu.c. MFC after: 2 weeks
* Fix conflicts I didn't fix before I committed my busspace changes.imp2004-10-112-8/+4
| | | | Noticed by: ru@ (and likely tinderbox, I haven't checked)
* Fix off-by-one error in fd_native_types that results in a panic on bootpeadar2004-10-101-0/+1
| | | | | | for machines with 2.88M floppies. Reviewed By: phk
* Rename thread args to be called "td" rather than "p" to bedwmalone2004-10-101-6/+6
| | | | | | | | consistent with other bits of this file. There should be no functional change. Submitted by: Andrea Campi (many moons ago) MFC after: 2 month
* Dont sleep with lock held.sos2004-10-101-1/+1
|
* Revert last commit since it breaks API.glebius2004-10-102-11/+14
| | | | Requested by: sam
* Don't release the slot twice.. sched_rem() has already done it.julian2004-10-101-1/+0
| | | | | Submitted by: stephan uphoff (ups at tree dot com) MFC after: 3 days
* Remove duplicate line.julian2004-10-101-1/+0
|
* Convert to newbus. (chances are we could now move this to dev/pbioimp2004-10-102-92/+122
| | | | | | since I believe it is now MI, but that hasn't been done yet). Reviewed by: dds
* Modify entropy harvesting locking strategy:rwatson2004-10-091-50/+41
| | | | | | | | | | | | | | | | | | | | | | | | | - Trade off granularity to reduce overhead, since the current model doesn't appear to reduce contention substantially: move to a single harvest mutex protecting harvesting queues, rather than one mutex per source plus a mutex for the free list. - Reduce mutex operations in a harvesting event to 2 from 4, and maintain lockless read to avoid mutex operations if the queue is full. - When reaping harvested entries from the queue, move all entries from the queue at once, and when done with them, insert them all into a thread-local queue for processing; then insert them all into the empty fifo at once. This reduces O(4n) mutex operations to O(2) mutex operations per wakeup. In the future, we may want to look at re-introducing granularity, although perhaps at the granularity of the source rather than the source class; both the new and old strategies would cause contention between different instances of the same source (i.e., multiple network interfaces). Reviewed by: markm
* Fix fsbtodb() for UFS1. This fixes an overflow for file sizes >1 TB,njl2004-10-091-1/+1
| | | | | | | allowing for sizes up to 4 TB. This doesn't affect UFS2 since b is already a 64 bit type, coincidental with daddr_t. Submitted by: bde
* In the previous revision, I did not intend to change the default valuegreen2004-10-091-1/+1
| | | | | | of "nosleepwithlocks." Submitted by: ru
* Acquire the send socket buffer lock around tcp_output() activitiesrwatson2004-10-091-2/+14
| | | | | | | | | | reaching into the socket buffer. This prevents a number of potential races, including dereferencing of sb_mb while unlocked leading to a NULL pointer deref (how I found it). Potentially this might also explain other "odd" TCP behavior on SMP boxes (although haven't seen it reported). RELENG_5 candidate.
OpenPOWER on IntegriCloud