summaryrefslogtreecommitdiffstats
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
...
* Change role defines so that they better match class 3 service parameters.mjacob2004-02-071-3/+4
| | | | | | Add ISPCTL_GET_PDB isp_control operation. MFC after: 1 week
* Reduce AAC_MAX_FIBS to work around some yet-unidentified bugs in thescottl2004-02-071-1/+1
| | | | | | | | handling of resources shortages. The driver is now so fast that it can completely fill all 512 slots on the card, but for some reason only 511 slots are being allocated. Anything that tries to go into the 512th slot gets silently lost. Both bugs need to be fixed at a later date, but this should fix the reports of hangs in getblk and vinvalb.
* - Broaden the scope of locking in aac_command_thread() again to catch somescottl2004-02-071-11/+17
| | | | | | | | | edge cases in the loop. - Try to grab a command before dequeueing the bio from the bioq. The old behaviour of requeuing deferred bios to the end of the bioq is arguably wrong. This should be fixed in the future to check the bioq head without automatically dequeueing the bio.
* Add an #ifdef _KERNEL so that this file can be used from userland.scottl2004-02-071-1/+2
|
* Make all ACPI debug layers unique again. This makes debugging a morephilip2004-02-061-6/+6
| | | | | | | pleasant experience (for certain definition of 'pleasant'). Submitted by: Mark Santcroos <marks@ripe.net> Approved by: njl (mentor)
* MFNetBSD:sanpei2004-02-061-2/+9
| | | | | | | netbsd.org -> NetBSD.org(rev.1.109) fix typo in comment(rev.1.90) add list of ``already merged''
* Commit simple workarounf for the "LiteOn" hang on boot problem.sos2004-02-061-0/+1
| | | | | | This allows the system to boot so I can get the world out of my mailbox and get some work done to figure out what this mess is all about.
* Make LINT compile on amd64peter2004-02-061-2/+2
|
* Make this compile on amd64.peter2004-02-061-6/+6
| | | | "I'll cope" by: sam
* Fixed style of DPADD and LDADD assignments as per style.Makefile(5).ru2004-02-051-2/+2
|
* Added missing DPADD.ru2004-02-051-0/+1
|
* Fix wrong check.pjd2004-02-052-2/+2
| | | | Approved by: jake, scottl (mentor)
* Eliminate global cons_unavailable flag and replace it by the statuskan2004-02-051-6/+9
| | | | | bit maintained on a per-device basis. Single variable is inadequate on machines running with multiple consoles enabled.
* Compile on amd64. (pointer/int mismatches and printf int vs long )peter2004-02-051-5/+5
|
* When creating raid5 or striped plexes, avoid falling out of boundsle2004-02-041-24/+27
| | | | | | | | when checking the given stripe size. Also move the code a bit around to avoid duplication. Approved by: joerg (mentor)
* Expand the mask for the Avlab Technology, PCI IO 2S entry to cover thejhb2004-02-041-1/+1
| | | | | | | | 2S-650 and 2S-850 variants. PR: kern/45285 Submitted by: Andrey Zakharchenko <avz AT jscc.ru> MFC after: 1 week
* aic7xxx.c:gibbs2004-02-041-4/+2
| | | | | | | Shorten a diagnostic printf to fit in 80 columns. In ahc_abort_scbs() remove an incorrect diagnostic test that printed a spurious warning.
* aic79xx.c:gibbs2004-02-046-135/+327
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | aic79xx.seq: Convert the COMPLETE_DMA_SCB list to an "stailq". This allows us to safely keep the SCB that is currently being DMA'ed back the host on the head of the list while processing completions off of the bus. The newly completed SCBs are appended to the tail of the queue. In the past, we just dequeued the SCB that was in flight from the list, but this could result in a lost completion should the host perform certain types of error recovery that must cancel all in-flight SCB DMA operations. Switch from using a 16bit completion entry, holding just the tag and the completion valid bit, to a 64bit completion entry that also contains a "status packet valid" indicator. This solves two problems: o The SCB DMA engine on at least Rev B. silicon does not properly deal with a PCI disconnect that occurs at a non-64bit aligned offset in the chips "source buffer". When the transfer is resumed, the DMA engine continues at the correct offset, but may wrap to the head of the buffer causing duplicate completions to be reported to the host. By using a completion buffer in host memory that is 64bit aligned and using 64bit completion entries, such disconnects should only occur at aligned addresses. This assumes that the host bridge will only disconnect on cache-line boundaries and that cache-lines are multpiles of 64bits. o By embedding the status information in the completion entry we can avoid an extra memory reference to the HSCB for commands that complete without error. Use the comparison of a "host freeze count" and a "sequencer freeze count" to allow the host to process most SCBs that complete with non-zero status without having to clear critical sections. Instead the host can just pause the sequencer, performs any necessary cleanup in the waiting for selection list, increments its freeze count on the controller, and unpauses. This is only possible because the sequencer defers completions of SCBs with bad status until after all pending selections have completed. The sequencer then avoids referencing any data structures the host may touch during completion of the SCB until the freeze counts match. aic79xx.c: Change the strategy for allocating our sentinal HSCB for the QINFIFO. In the past, this allocation was tacked onto the QOUTFIFO allocation. Now that the qoutfifo has grown to accomodate larger completion entries, the old approach will result in a 64byte allocation that costs an extra page of coherent memory. We now do this extra allocation via ahd_alloc_scbs() where the "unused space" can be used to allocate "normal" HSCBs. In our packetized busfree handler, use the ENSELO bit to differentiate between packetized and non-packetized unexpected busfree events that occur just after selection, but before the sequencer has had the oportunity to service the selection. When cleaning out the waiting for selection list, use the SCSI mode instead of the command channel mode. The SCB pointer in the command channel mode may be referenced by the SCB dma engine even while the sequencer is paused, whereas the SCSI mode SCB pointer is only accessed by the sequencer. Print the "complete on qfreeze" sequencer SCB completion list in ahd_dump_card_state(). This list holds all SCB completions that are deferred until a pending select-out qfreeze event has taken effect. aic79xx.h: Add definitions and structures to handle the new SCB completion scheme. Add a controller flag that indicates if the controller is in HostRAID mode. aic79xx.reg: Remove macros used for toggling from one data fifo mode to the other. They have not been in use for some time. Add scratch ram fields for our new qfreeze count scheme, converting the complete dma list into an "stailq", and providing for the "complete on qfreeze" SCB completion list. Some other fields were moved to retain proper field alignment (alignment >= field size in bytes). aic79xx.seq: Add code to our idle loop to: o Process deferred completions once a qfreeze event has taken full effect. o Thaw the queue once the sequencer and host qfreeze counts match. Generate 64bit completion entries passing the SCB_SGPTR field as the "good status" indicator. The first bit in this field is only set if we have a valid status packet to send to the host. Convert the COMPLETE_DMA_SCB list to an "stailq". When using "setjmp" to register an idle loop handler, do not combine the "ret" with the block move to pop the stack address in the same instruction. At least on the A, this results in a return to the setjmp caller, not to the new address at the top of the stack. Since we want the latter (we want the newly registered handler to only be invoked from the idle loop), we must use a separate ret instruction. Add a few missing critical sections. Close a race condition that can occur on Rev A. silicon. If both FIFOs happen to be allocated before the sequencer has a chance to service the FIFO that was allocated first, we must take special care to service the FIFO that is not active on the SCSI bus first. This guarantees that a FIFO will be freed to handle any snapshot requests for the FIFO that is still on the bus. Chosing the incorrect FIFO will result in deadlock. Update comments. aic79xx_inline.h Correct the offset calculation for the syncing of our qoutfifo. Update ahd_check_cmdcmpltqueues() for the larger completion entries. aic79xx_pci.c: Attach to HostRAID controllers by default. In the future I may add a sysctl to modify the behavior, but since FreeBSD does not have any HostRAID drivers, failing to attach just results in more email and bug reports for the author. MFC After: 1week
* - add an identify method, since the disk device used to be pickedgrehan2004-02-041-3/+29
| | | | | | up in the recursive OpenFirmware node walk. Rely on the psim config file to have a "ofwdisk" device alias - minor white space nits
* Implement support for single packet sends. The Intel Centrino driverwpaul2004-02-031-7/+29
| | | | | | | | | | | | | | | | | | | | | | | | that Asus provides on its CDs has both a MiniportSend() routine and a MiniportSendPackets() function. The Microsoft NDIS docs say that if a driver has both, only the MiniportSendPackets() routine will be used. Although I think I implemented the support correctly, calling the MiniportSend() routine seems to result in no packets going out on the air, even though no error status is returned. The MiniportSendPackets() function does work though, so at least in this case it doesn't matter. In if_ndis.c:ndis_getstate_80211(), if ndis_get_assoc() returns an error, don't bother trying to obtain any other state since the calls may fail, or worse cause the underlying driver to crash. (The above two changes make the Asus-supplied Centrino work.) Also, when calling the OID_802_11_CONFIGURATION OID, remember to initialize the structure lengths correctly. In subr_ndis.c:ndis_open_file(), set the current working directory to rootvnode if we're in a thread that doesn't have a current working directory set.
* Notify the user (at kern.emerg) that the system will be shutting down ifnjl2004-02-031-5/+13
| | | | | | it is still above the critical temperature on the next poll cycle. This is a 10 second advance notice by default. Document the private (non-standard) notify we will be using with devd(8).
* If the temperature is at _HOT or _CRT for 3 sequential readings, shutdownnjl2004-02-021-14/+21
| | | | | | | | | | | | | the system. Also, decrease the poll interval to 10 seconds from 30 seconds. This is needed because some systems will report an invalid high temperature for one poll cycle. It is suspected this is due to the embedded controller timing out. A typical value is 138C for one cycle on a system that is otherwise 65C. This prevents the system from prematurely shutting down after one invalid reading. It will still shut down after 30 seconds of high temperature, which is the same as previous default behavior. Tested by: Scott Lambert <lambert AT lambertfam.org>
* Add CRD_F_KEY_EXPLICIT which allows the key to be changed perphk2004-02-021-0/+2
| | | | | | | | operation, just like it was possible to change the IV. Currently supported on Hifn and software engines only. Approved by: sam@
* Move the enabling of interrupt back to where it was some time ago.sos2004-02-021-4/+3
| | | | This apparently was what broke the boot with some devices (liteon).
* MFNetBSD: URL updates(rev.1.108)sanpei2004-02-021-4/+4
|
* Fix support for the Promise TX4 on amd64.sos2004-02-022-1/+2
| | | | | Somehow the bridge on there shows up with another PCI id than it does on x86, no idea why...
* Add new Apple GEM PCI id.grehan2004-02-021-0/+1
|
* Use the OID_802_11_CONFIGURATION OID when deciding if the underlying driverwpaul2004-02-011-2/+4
| | | | | | | | | | | | | | | is for an 802.11 device or not. At least one driver I have does not support the OID_802_11_NETWORK_TYPES_SUPPORTED OID. Also, for now, don't do anything special in the ndis_suspend() method. I originally wanted to shut down the NIC but leave the IFF_UP flag alone since technically the interface is meant to remain up, but an interrupt may be delivered to the ISR on suspend, and if this happens while the NIC is halted, we will crash, since none of the miniport driver methods will function. This needs to be dealt with properly later, but for now this prevents a panic, and the resume method properly re-inits the NIC.
* Add the Canon N1240U to the mix. It appears to be similar to theimp2004-01-311-0/+1
| | | | | | | 1220U and supported by sane # someone should update the man page to include all the devices that # uscanner supports.
* Be more robust in the probe. We dont want to get into a loop withsos2004-01-302-24/+38
| | | | | reinitting when we try to identify devices. If they dont interrupt on identify we retry once. If this fails we simply ignore that device.
* Add NEC uPD72873.simokawa2004-01-302-0/+5
| | | | Submitted by: Christian Laursen <xi@borderworlds.dk>
* Use device_identify and bus_add_child methods to add a firewiresimokawa2004-01-303-30/+57
| | | | | bus on fwohci. This should fix attach failure caused by a race between firewire and fwochi initialization for the kernel module.
* Take the plunge and make this driver be INTR_FAST. This re-arranges thescottl2004-01-303-61/+55
| | | | | | | | | interrupt handler so that no locks are needed, and schedules the command completion routine with a taskqueue_fast. This also corrects the locking in the command thread and removes the need for operation flags. Simple load tests show that this is now considerably faster than FreeBSD 4.x in the SMP case when multiple i/o tasks are running.
* Cleanups/cosmetics.sos2004-01-293-9/+8
|
* Add dependency to snd_via8233mr2004-01-291-0/+1
|
* Fix a bug where we never managed to include the sense data we wanted to send.mjacob2004-01-291-2/+2
|
* Go back to using AUTHMODE_AUTO if WEP is on. In some cases, the Centrinowpaul2004-01-291-1/+3
| | | | | | won't associate in BSS mode if you use AUTHMODE_SHARED. I probably don't understand enough to know when SHARED should be used vs. OPEN or WPA. For now, go back to what works.
* Fix longstanding buglet- for centrally handled CTIO2s we were checking the wrongmjacob2004-01-291-2/+3
| | | | | | | bit for this being the last CTIO2. It didn't matter since it really was the last CTIO2 and the resources recycled, but still.... Add in CTIO3 define for future DAC work.
* Fix for those lost interrupts on probe on lots of controller types.sos2004-01-281-6/+6
| | | | Note to self, just because an idea is good, it doesn't apply everywhere.
* Use the biotask functionality in GEOM to put finished requests onsos2004-01-287-32/+36
| | | | | | | instead of taskqueue_swi. This shaves from 1 to 10% of the overhead. Overhaul the locking once more, there was a few possible races that are now closed.
* Change KASSERT() in feed_vchan16() into an explicit test and call totruckman2004-01-288-140/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | panic() so that the buffer overflow just beyond this point is always caught, even when the code is not compiled with INVARIANTS. Change chn_setblocksize() buffer reallocation code to attempt to avoid the feed_vchan16() buffer overflow by attempting to always keep the bufsoft buffer at least as large as the bufhard buffer. Print a diagnositic message Danger! %s bufsoft size increasing from %d to %d after CHANNEL_SETBLOCKSIZE() if our best attempts fail. If feed_vchan16() were to be called by the interrupt handler while locks are dropped in chn_setblocksize() to increase the size bufsoft to match the size of bufhard, the panic() code in feed_vchan16() will be triggered. If the diagnostic message is printed, it is a warning that a panic is possible if the system were to see events in an "unlucky" order. Change the locking code to avoid the need for MTX_RECURSIVE mutexes. Add the MTX_DUPOK option to the channel mutexes and change the locking sequence to always lock the parent channel before its children to avoid the possibility of deadlock. Actually implement locking assertions for the channel mutexes and fix the problems found by the resulting assertion violations. Clean up the locking code in dsp_ioctl(). Allocate the channel buffers using the malloc() M_WAITOK option instead of M_NOWAIT so that buffer allocation won't fail. Drop locks across the malloc() calls. Add/modify KASSERTS() in attempt to detect problems early. Abuse layering by adding a pointer to the snd_dbuf structure that points back to the pcm_channel that owns it. This allows sndbuf_resize() to do proper locking without having to change the its API, which is used by the hardware drivers. Don't dereference a NULL pointer when setting hw.snd.maxautovchans if a hardware driver is not loaded. Noticed by Ryan Sommers <ryans at gamersimpact.com>. Tested by: Stefan Ehmann <shoesoft AT gmx.net> Tested by: matk (Mathew Kanner) Tested by: Gordon Bergling <gbergling AT 0xfce3.net>
* Add an ACPI_FUNCTION_TRACE() to the newly-added acpi_Startup() routineroam2004-01-281-0/+2
| | | | | | | to get the ACPI_DEBUG case (and LINT in particular) to build. Reviewed by: jhb, njl Approved by: jhb
* While USB keyboards attach as ukbd[0-9]+, the device node created bydes2004-01-271-1/+2
| | | | | | | | | | | kbd_attach() is called kbd[0-9]+, with a different unit number. This makes it impossible to write a devd rule which will automatically switch to a USB keyboard when one is attached, because there is no way to guess the correct device node to pass to kbdcontrol. Therefore, change kbd_attach() to create a device node using the keyboard device's real name (atkbd0, ukbd0...), and create the kbd[0-9]+ node as an alias for backward compatibility.
* This should have been checked in as part of the last update to if_ndis.c:wpaul2004-01-271-0/+1
| | | | | add yet another member to the ndis_softc as part of the workaround for the net80211 dain bramage.
* Add a kludge to avoid having ndis_init() called needlessly by dhclientwpaul2004-01-271-10/+22
| | | | | | | | on an SIOCSIFADDR (by way of brain damage in net80211). Also, avoid trying to set NDIS_80211_AUTHMODE_AUTO since the Microsoft documentation I have recommends not using it, and the Centrino driver seems to dislike being told to use it.
* Add TUNABLE_STR to make "hw.acpi.os_name" more correct. However, the callnjl2004-01-271-3/+2
| | | | to getenv_string() still doesn't work.
* Use the M_BZERO flag with malloc() in a couple of places.wpaul2004-01-271-8/+6
|
* Move the code to initialize ACPI-CA into a separate acpi_Startup() functionjhb2004-01-262-24/+42
| | | | | | | that other modules can call to initialize ACPI-CA before the new-bus probe and change acpi_identify() to call it. Reviewed by: njl
* Get rid of the last two uses of NG_NODELEN + 1 in the base system byharti2004-01-262-2/+2
| | | | replacing them with NG_NODESIZ.
* Fix a panic in dsp_clone when trying to access a soundmatk2004-01-251-0/+3
| | | | | | | device that doesn't exists. I'm using my discretion and committing without mentor approval since Seigo is away. Noticed by: Maxime Henrion <mux@freebsd.org>
OpenPOWER on IntegriCloud