summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
...
* In rtrequest and rtinit check for sa_len != 0 for the givenbz2006-05-041-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | destination. These checks are needed so we do not install a route looking like this: (0) 192.0.2.200 UH tun0 => When removing this route the kernel will start to walk the address space which looks like a hang on 64bit platforms because it'll take ages while on 32bit you should see a panic when kernel debugging options are turned on. The problem is in rtrequest1: if (netmask) { rt_maskedcopy(dst, ndst, netmask); } else bcopy(dst, ndst, dst->sa_len); In both cases the len might be 0 if the application forgot to set it. If so ndst will be all-zero leading to above mentioned strange routes. This is an application error but we must not fail/hang/panic because of this. Looks ok: gnn No objections: net@ (silence) MFC after: 8 weeks
* Use G_RAID3_FOREACH_SAFE_BIO() macro instead of G_RAID3_FOREACH_BIO() inpjd2006-05-041-6/+4
| | | | | | | | | two places where g_io_request() is called. g_io_request() can free bio structure so we can't reference it after and G_RAID3_FOREACH_BIO() macro was doing this. Found by: Coverity Prevent analysis tool (with my new models) MFC after: 1 day
* Fix three more bugs in bfe:silby2006-05-042-17/+22
| | | | | | | | | | | | | | - Fix bfe_encap so that it will pass the address of the mbuf back up to its caller if/when it modifies it, as it does when doing a m_defrag on a mbuf chain. - Make sure to unload the dmamap for ALL fragments of a packet, not just the first - Use BUS_DMA_NOWAIT for all bus_dmamap_load calls so that the allocation of the map is not delayed - this driver is not set up to handle such delays. - Reduce the number of RX and TX buffers bfe uses so that it does not use more bounce buffers than busdma is willing to allow it to use With these changes, the driver now works properly for a user with a 2GB system, and it also works on my system when the acceptable address range is lowered to 128MB. Previously, both of these setups would act up after a few minutes of activity.
* Add 4Gb Fibre Channel support.mjacob2006-05-041-1/+10
| | | | Work sponsored by LSI-Logic.
* Remove MPT_PRT_INVARIANT- it was a silly idea.mjacob2006-05-042-8/+3
|
* Gratuitous tag alignment. It bugged me.mjacob2006-05-041-1/+1
|
* Hide another common print under bootverbose.scottl2006-05-031-1/+2
|
* add ath and wlan crypto supportsam2006-05-031-0/+6
| | | | MFC after: 1 month
* add ath and wlan crypto supportsam2006-05-031-0/+6
| | | | | Requested by: many MFC after: 1 month
* Make amr_linux work as a module by avoiding calling amr_linux_ioctl_intambrisko2006-05-033-127/+41
| | | | | | | | from the amr_linux. This simplifies the amr_linux shim and puts the smarts into amr.c. I tested this with 2 amr controllers in one box. It seems to work okay with them.
* Restore the pre-5.x behavior of only beeping if the user makes a badjhb2006-05-031-5/+8
| | | | | | | | | | | selection and not always beeping on startup. The two bytes for the extra 'jmp' instruction were obtained by removing recognition of BSD/OS partitions. Requested by: many Tested by: subset of many Head nod: imp, keramida MFC after: 2 weeks
* Allow bus_dmamap_load() to pass ENOMEM back to the caller. This puts it intoscottl2006-05-032-8/+20
| | | | | | | conformance with the mbuf and uio load routines. ENOMEM can only happen with BUS_DMA_NOWAIT is passed in, thus the deferals are disabled. I don't like doing this, but fixing this fixes assumptions in other important drivers, which is a net benefit for now.
* Detect the snapshot file being prematurely unlinked.tegge2006-05-031-0/+10
|
* Temporarily undo clusters contribution to global runningbufspace whiletegge2006-05-031-0/+4
| | | | handling copy on write for the buffers taking part in the cluster.
* A side effect of calling runningbufwakeup() is that bp->b_runningbufspace istegge2006-05-031-3/+10
| | | | | cleared. Save old value and restore bp->b_runningbufspace before returning from ffs_copyonwrite().
* Close a race when VOP_LOCK() on a snapshot file is attempted at thetegge2006-05-022-42/+110
| | | | | | same time as it is changed back into a normal file. The locker would get the shared "snaplk" lock which would no longer be the correct lock for the vnode.
* Fix previous commit: the resource returned by rman_reserve_resource()marcel2006-05-021-10/+8
| | | | | can be NULL. Make sure to only call rman_set_rid() when the resource is not NULL. While here, improve readability and style.
* Only print the driver name and version if bootverbose is set.scottl2006-05-021-1/+2
|
* Type.yongari2006-05-021-1/+1
| | | | Submitted by: brad@OpenBSD
* Add various constants for the PAT MSR and the PAT PTE and PDE flags.jhb2006-05-018-0/+127
| | | | | | | Initialize the PAT MSR during boot to map PAT type 2 to Write-Combining (WC) instead of Uncached (UC-). MFC after: 1 month
* Break out socket access control and delivery logic from udp6_input()rwatson2006-05-011-96/+55
| | | | | | | | | | | into its own function, udp6_append(). This mirrors a similar structure in udp_input() and udp_append(), and makes the whole thing a lot more readable. While here, add missing inpcb locking in UDP6 input path. Reviewed by: bz MFC after: 3 months
* Add a new 'pmap_invalidate_cache()' to flush the CPU caches via thejhb2006-05-0112-5/+145
| | | | | | | wbinvd() instruction. This includes a new IPI so that all CPU caches on all CPUs are flushed for the SMP case. MFC after: 1 month
* Using an idea from Stephan Uphoff, use the empty pte's that correspondpeter2006-05-011-50/+115
| | | | | | | | to the unused kva in the pv memory block to thread a freelist through. This allows us to free pages that used to be used for pv entry chunks since we can now track holes in the kva memory block. Idea from: ups
* Fix missing changes required for the amd64->i386 conversion. Add thepeter2006-05-011-3/+4
| | | | | | missing VM_ALLOC_WIRED flags to vm_page_alloc() calls I added. Submitted by: alc
* Add inverted amplifier sense quirks for Sony VAIO VGN B1VP/B1XP.ariff2006-05-011-1/+2
| | | | Reported by: Stan Behrens <s.behrens at kon.de>
* Don't attach to Marvell 88E805X (Yukon-II) by default, the driver is notsobomax2006-05-011-0/+2
| | | | | | functional yet. Requested by: bz
* We shouldn't lock the topology here - we will panic on assertion insidepjd2006-04-301-2/+0
| | | | | | | g_raid3_bump_syncid(). Reported by: Bradley W. Dutton <brad-fbsd-stable@duttonbros.com> MFC after: 1 day
* Remove header pollution.scottl2006-04-301-1/+0
|
* Remove some header polution.scottl2006-04-303-3/+0
|
* vn_start_write()/vn_finished_write() is not needed here, becausepjd2006-04-291-2/+0
| | | | | | | | vn_start_write() is always called earlier in the code path and calling the function recursively may lead to a deadlock. Confirmed by: tegge MFC after: 2 weeks
* Lock giant when assigning ni_vp and keep vfslocked state valid.kris2006-04-291-0/+1
| | | | Committed for: jeff
* Add support for fragmenting ipv4 packets.thompsa2006-04-291-7/+85
| | | | | | | | | | | The packet filter may reassemble the ip fragments and return a packet that is larger than the MTU of the sending interface. There is no check for DF or icmp replies as we can only get a large packet to fragment by reassembling a previous fragment, and this only happens after a call to pfil(9). Obtained from: OpenBSD (mostly) Glanced at by: mlaier MFC after: 1 month
* Eliminate unnecessary, recursive acquisitions and releases of the pagealc2006-04-291-5/+2
| | | | | | queues lock by free_pv_entry() and pmap_remove_pages(). Reduce the scope of the page queues lock in pmap_remove_pages().
* vn_start_write() is called only when v_type != VCHR, so correspondingpjd2006-04-281-2/+3
| | | | | | | | | vn_finished_write() should also be called only then. BTW. I fixed two functions here: vn_rdwr() and vn_write(). The latter seems to be unused. MFC after: 3 weeks
* Also check use_pty in the ptmx clone lookup; this means that when ptmxrwatson2006-04-281-0/+3
| | | | | | | support is turned off using the sysctl, we no longer even allow the ptmx device to be looked up. Foot provided by: peter
* Remove the puc-specific hacks. The puc(4) driver now properly usesmarcel2006-04-282-33/+0
| | | | the rman(9) interface.
* Rewrite of puc(4). Significant changes are:marcel2006-04-2825-2334/+2129
| | | | | | | | | | | | | | | | | | | | o Properly use rman(9) to manage resources. This eliminates the need to puc-specific hacks to rman. It also allows devinfo(8) to be used to find out the specific assignment of resources to serial/parallel ports. o Compress the PCI device "database" by optimizing for the common case and to use a procedural interface to handle the exceptions. The procedural interface also generalizes the need to setup the hardware (program chipsets, program clock frequencies). o Eliminate the need for PUC_FASTINTR. Serdev devices are fast by default and non-serdev devices are handled by the bus. o Use the serdev I/F to collect interrupt status and to handle interrupts across ports in priority order. o Sync the PCI device configuration to include devices found in NetBSD and not yet merged to FreeBSD. o Add support for Quatech 2, 4 and 8 port UARTs. o Add support for a couple dozen Timedia serial cards as found in Linux.
* The nvidia binary blob sometimes defers tx completion notification to thejhb2006-04-281-1/+19
| | | | | | | | | | | | | | | | OS dependent layer. Thus, the watchdog timer can go off when the tx engine is working fine but the OS dependent layer just hasn't been called to cleanup finished tx transactions. To workaround this, when the watchdog fires, poke the binary blob to force it to flush any pending tx completions. If this drops the pending tx count to zero then just return without logging a message or resetting the chip. This reportedly fixes the 'device timeout()' errors with at least several NF4 nve(4) parts. Submitted by: Nathan Alexander Whitehorn <nathanw@uchicago.edu> (code) Submitted by: dg (inspiration for comment and explanation) MFC after: 1 week
* Ensure outbound data packets in hostap mode are delivered only tosam2006-04-281-1/+12
| | | | | | | | | | | stations that are associated by making ieee80211_find_txnode return NULL when a unicast frame is to be delivered to an unassociated station. This will be handled differently in the future but for now putting the check here allows all drivers to immediately do the right thing. Reviewed by: avatar MFC after: 1 week
* Interim fix for pmap problems I introduced with my last commit.peter2006-04-281-82/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the code to dyanmically change the pv_entry limits. Go back to a single fixed kva reservation for pv entries, like was done before when using the uma zone. Go back to never freeing pages back to the free pool after they are no longer used, just like before. This stops the lock order reversal due to aquiring the kernel map lock while pmap was locked. This fixes the recursive panic if invariants are enabled. The problem was that allocating/freeing kva causes vm_map_entry nodes to be allocated/freed. That can recurse back into pmap as new pages are hooked up to kvm and hence all the problem. Allocating/freeing kva indirectly allocate/frees memory. So, by going back to a single fixed size kva block and an index, we avoid the recursion panics and the LOR. The problem is that now with a linear block of kva, we have no mechanism to track holes once pages are freed. UMA has the same problem when using custom object for a zone and a fixed reservation of kva. Simple solutions like having a bitmap would work, but would be very inefficient when there are hundreds of thousands of bits in the map. A first-free pointer is similarly flawed because pages can be freed at random and the first-free pointer would be rewinding huge amounts. If we could allocate memory for tree strucures or an external freelist, that would work. Except we cannot allocate/free memory here because we cannot allocate/free address space to use it in. Anyway, my change here reverts back to the UMA behavior of not freeing pages for now, thereby avoiding holes in the map. ups@ had a truely evil idea that I'll investigate. It should allow freeing unused pages again by giving us a no-cost way to track the holes in the kva block. But in the meantime, this should get people booting with witness and/or invariants again. Footnote: amd64 doesn't have this problem because of the direct map access method. I'd done all my witness/invariants testing there. I'd never considered that the harmless-looking kmem_alloc/kmem_free calls would cause such a problem and it didn't show up on the boot test.
* Implement the ipend() method of the serdev I/F.marcel2006-04-282-0/+10
|
* - Don't hold the device sx lock when going to sleep.pjd2006-04-281-6/+23
| | | | | | | | - Prevent possible live-lock in case of memory problems by freeing already completed requests first. Reported and tested by: markus, Bradley W. Dutton <brad-fbsd-stable@duttonbros.com> MFC after: 1 day
* - Remove dead code.pjd2006-04-282-17/+18
| | | | | | | - Comment possible event miss, which isn't critical, but probably can be fixed by replacing the event lock usage with the queue lock. MFC after: 2 weeks
* Be sure to not destroy device twice. This is not possible in theory, butpjd2006-04-281-2/+13
| | | | | | with this change there is even no theoretical race. MFC after: 2 weeks
* Be sure to not destroy device twice. This is not possible in theory, butpjd2006-04-281-2/+13
| | | | | | with this change there is even no theoretical race. MFC after: 2 weeks
* Tweak the DMA limit from rev 1.33, it was off by one byte.silby2006-04-281-1/+1
| | | | Submitted by: scottl
* Switch all bus_dmamap_sync calls that used PREREAD to PREWRITE and allsilby2006-04-281-10/+10
| | | | | | | | POSTWRITE to POSTREAD. No guarantee that all busdma is usage is perfect, but this change (in addition to scott's last two commits) makes if_bfe work with > 1GB of memory in my laptop.
* Enable the rr232x driver for amd64.scottl2006-04-284-0/+14
|
* Fix a typo.scottl2006-04-281-1/+1
|
* Fix a typo that slipped in right before commit.scottl2006-04-281-1/+1
|
OpenPOWER on IntegriCloud