summaryrefslogtreecommitdiffstats
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
* Expand locking coverage slightly to cover if_drv_flags in a few placesjhb2006-07-201-4/+8
| | | | | | | where it wasn't locked. MFC after: 3 days Reviewed by: davidch
* Since resetting hardware takes a very long time and results in linkyongari2006-07-202-9/+30
| | | | | | | | | | | | | | | | | | | | | renegotiation, we only initialize the hardware only when it is absolutely required. Process SIOCGIFADDR ioctl in em(4) when we know an IPv4 address is added. Handling SIOCGIFADDR in a driver is layering violation but it seems that there is no easy way without rewritting hardware initialization code to reduce settle time after reset. This should fix a long standing bug which didn't send ARP packet when interface address is changed or an alias address is added. Another effect of this fix is it doesn't need additional delays anymore when adding an alias address to the interface. While I'm here add a new if_flags into softc which remembers current prgroammed interface flags and make use of it when we have to program promiscuous mode. Tested by: Atanas <atanas AT asd DOT aplus DOT net> Analyzed by: rwatson Discussed with: -stable
* Protect EEPROM access with the driver lock.yongari2006-07-201-1/+2
|
* Honor IFF_DRV_OACTIVE in em_start_locked().yongari2006-07-201-0/+3
|
* Whitespace fix after s/dev_t/struct cdev */.jhb2006-07-191-2/+2
|
* Initialize svr4_head during MOD_LOAD rather than on demand.jhb2006-07-191-12/+1
|
* Convert sk(4) to use the new bus_alloc_resources() API andyongari2006-07-192-46/+43
| | | | | | | bus_{read,write}_* macros. Submitted by: Antoine Brodin <antoine.brodin AT laposte DOT net> Reviewed by: imp (initial version)
* Remove unnecessary locking for td_dupfd (it requires no locks).jhb2006-07-181-9/+1
|
* Firmware loading improvements:gallatin2006-07-171-13/+95
| | | | | | | | | - Copy ethernet firmware down in small chunks so as to avoid bugs in early versions of the bootstrap firmware. - Attempt to "adopt" the running firmware if we cannot load a suitable firmware image via firmware(9). - Separate firmware validation into its own routine, and check the major/minor driver/firmware ABI version.
* Fix comments.cognet2006-07-172-2/+2
|
* Chain the bus_dmamap_load() calls when mapping a command with a data CCBjhb2006-07-171-24/+42
| | | | | | | | | | | | instead of doing the first load with the BUS_DMA_NOWAIT flag. On 4.x with PAE and > 4gb of RAM this proved disastrous if there weren't enough bounce pages as amr_mapcmd() would return failure but the callback would later fire once enough bounce pages were available and would then overwrite another command's S/G list. MFC after: 3 days Submitted by: scottl (4.x version) Reviewed by: scottl (port from 4.x to HEAD)
* Rename some variables. This fixes some (but not all) problems on the waynetchild2006-07-174-8/+8
| | | | | | for WARNS > 2 cleanlyness. Submitted by: Yuriy Tsibizov <Yuriy.Tsibizov@gfk.ru>
* Prepend temporary sysctls with an underscore.netchild2006-07-171-1/+6
| | | | Submitted by: Yuriy Tsibizov <Yuriy.Tsibizov@gfk.ru>
* Restore the status quo before my last commit. Prior to it, sio tookimp2006-07-171-2/+2
| | | | | | | | | precedence uart. With my last change, it became a tie, and uart seems to always win on my amd64. This was not my intention, so have sio be just a tiny bit more preferred than uart. Note: I'm not making any judgement on the merits of uart winning. I'm just saying that if we want to change it, we do it on purpose.
* Some rearrangement of headers to minimize diffs with outside ofmjacob2006-07-166-64/+71
| | | | | | | | FreeBSD repository and to clean up the license header so as to not pollute the license with file function. Zero all mailbox structures prior to use (just in case). Change the outgoing mailbox count for INIT_FIRMWARE to be correct.
* Fix a compile time problem on amd64. I'm not sure if the fix is correctnetchild2006-07-162-4/+6
| | | | | | | from a semantic point of view, but I notified the author of the driver for confirmation. So far it at least fixes the build and should only lead to not identifying or wrongly identifying a soundcard in the worst case.
* Add sysctl information about things like WWNN/WWPN.mjacob2006-07-162-0/+40
| | | | MFC after: 2 weeks
* If we're in mpt_wait_req and the command times out,mjacob2006-07-162-4/+18
| | | | | | | | | | | | | mark it as timed out. Don't try and free the config request for read_cfg_header that times out because it's still active. Put in code for the config reply handler that will then free up timed out requests. Fix the FC_PRIMITIVE_SEND completion to not try and free a command twice. Dunno how this possibly could have been working for awhile. MFC after: 2 weeks
* Define out unused and incomplete raid quiesce functions.mjacob2006-07-162-8/+12
| | | | | The code never could be called, so we might as well not compile it for now.
* If the card has target mode enabled, and we hangmjacob2006-07-152-40/+177
| | | | | | | | | | | | | | out ELS buffers but *don't* hang out commands, we hang folks on the SAN because the LSI-Logic f/w apparently sends back BUSY or QFULL or some darn thing. If we add command buffers, we have to respond to them sensibly even if we don't have any upstream listeners (scsi_targ or scsi_targ_bh), so put in some local command reponse stuff. MFC after: 2 weeks
* - Connect the snd_emu10kx driver to the build. [1]netchild2006-07-151-1/+1
| | | | | | - Bump __FreeBSD_version, no need to build the port now. Submitted by: Yuriy Tsibizov <Yuriy.Tsibizov@gfk.ru> [1]
* Make the mixer kobj class static. This brings it inline with the channel ornetchild2006-07-151-1/+1
| | | | | | ac97 classes. Tested with: es137x based sound hardware
* Make the MIDI kobj class static. This brings it inline with the channel ornetchild2006-07-153-3/+3
| | | | | | ac97 classes. This allows to link emu10k1 and emu10kx into the same kernel (LINT).
* Add snd_emu10kx driver for Creative SoundBlaster Live! and Audigy seriesnetchild2006-07-154-0/+4416
| | | | | | | | | | | | | | | sound cards with optional pseudo-multichannel playback. It's based on snd_emu10k1 sound driver. Single channel version is available from audio/emu10kx port since some time. The two new ALSA header files (GPLed), which contain Audigy 2 ("p16v") and Audigy 2 Value ("p17v") specific interfaces, are latest versions from ALSA Mercurial repository. This is not connected to the build yet. Submitted by: Yuriy Tsibizov <Yuriy.Tsibizov@gfk.ru>
* - Update ALSA emu10k1.h (it was imported as emu10k1-alsa.h) header file tonetchild2006-07-151-4/+3
| | | | | | | | | | | | latest version from Mercurial repository. It brings definition of some additional Audigy 2 / Audigy 2 Value registers. - Use new #defines from ALSA emu10k1.h - Remove unused include files: + emu10k1-ac97.h was imported from ALSA and never used, + emu10k1.h was imported from Creative Linux emu10k1 driver, but only AUDIGY_CODEBASE was used from it. Submitted by: Yuriy Tsibizov <Yuriy.Tsibizov@gfk.ru>
* Eliminate duplicate p-states entriesbruno2006-07-151-0/+6
| | | | | | | Reported and tested by: ales dot rom at kabelnet dot net Reviewed by: njl Approved by: njl, imp (mentor) MFC after: 3 days
* Cleanup: Use if_initname to set if_dname, if_dunit, and if_xname insteadbrooks2006-07-151-3/+1
| | | | of doing it by hand.
* Allow iic bridges to support a generalized transfer, rather thanimp2006-07-147-12/+117
| | | | | | | | | forcing all transfers to do the start read/write stop by hand. Some smart bridges prefer this sort of operation, and this allows us to support their features more easily. When bridges don't support it, we fall back to using the old-style opertaions. Expand the ioctl interface to expose this function. Unlike the old-style interface, this interface is thread safe, even on old bridges.
* MFp4:imp2006-07-144-0/+277
| | | | | | Initial spibus support. Seems to be OK, but needs some polish. # someone should write a bit-bang spi parallel port interface :-)
* Unlock aac_io_lock before returning, thus eliminates a mutexdelphij2006-07-141-0/+1
| | | | | | | | leak. Submitted by: Beyond Luo <fedora ercist iscas ac cn> PR: kern/100046 Reviewed by: scottl
* Don't attach 2422's yet. It just confuses everyone.mjacob2006-07-141-0/+2
|
* Add some missing braces.mjacob2006-07-141-14/+30
| | | | | | Add MEMORY_BARRIER for the few scratch dma ops that were missing them plus add a couple of hi 32 bit dma ops (we could probably allow 64 bit scratch and request/response queue dma now).
* Fix a few cis entries that were separated with spaces, not with commas.imp2006-07-141-3/+3
| | | | This caused drivers for the cards they matched to not probe.
* no need to print unload anymoreimp2006-07-141-1/+0
|
* no need to print unload anymore.imp2006-07-141-1/+0
|
* Now even more style(9)ish.mr2006-07-131-1/+1
| | | | Submitted by: pjd
* Use the already stored VIA RNG probe informationmr2006-07-131-1/+1
| | | | | | | | instead of probing again. Adjust style(9) somewhat in probe.c Reviewed by: pjd MFC after: 1 week
* Fix ifconfig up when the HW was down. If the driver isn't runningambrisko2006-07-121-2/+7
| | | | | | | | | then we need to call init otherwise just start the rx. Interestingly dhclient seemed to work but ifconfig <IP> didn't for me. Reviewed by: jhb
* Simplify the pager support in DDB. Allowing different db commands tojhb2006-07-121-4/+3
| | | | | | | | | | | | | | | | install custom pager functions didn't actually happen in practice (they all just used the simple pager and passed in a local quit pointer). So, just hardcode the simple pager as the only pager and make it set a global db_pager_quit flag that db commands can check when the user hits 'q' (or a suitable variant) at the pager prompt. Also, now that it's easy to do so, enable paging by default for all ddb commands. Any command that wishes to honor the quit flag can do so by checking db_pager_quit. Note that the pager can also be effectively disabled by setting $lines to 0. Other fixes: - 'show idt' on i386 and pc98 now actually checks the quit flag and terminates early. - 'show intr' now actually checks the quit flag and terminates early.
* Use the already stored VIA RNG probe informationmr2006-07-121-13/+4
| | | | | | instead of probing again. MFC after: 1 week
* Fix config page writes to not strip out the attributes when youmjacob2006-07-125-38/+147
| | | | | | | | | | | | | actually go write the config page. This fixes the long standing problem about updating NVRAM on Fibre Channel cards and seems so far to not break SPI config page writes. Put back role setting into mpt. That is, you can set a desired role for mpt as a hint. On the next reboot, it'll pick that up and redo the NVRAM settings appropriately and warn you that this won't take effect until the next reboot. This saves people the step of having to find a BIOS utilities disk to set target and/or initiator role for the MPT cards.
* Move debug printfs under the proper macro.njl2006-07-121-3/+3
|
* Assume floppy disk is not inserted when we have exhausted retries. Thisjkim2006-07-121-0/+3
| | | | | | | | | | significantly reduces booting time when there is broken floppy disk drive, controller, cable, BIOS, etc. When the floppy controller interface is correctly implemented, disk change signal (DSKCHG) is reflected in the Digital Input Register (DIR) at 0x3f7. However, there are many cases that the signal is unusable. Moreover, some BIOS does not reserve the port at all. In those cases, the register may not function.
* Put in some missing target mode for 2KLOGIN f/w spots.mjacob2006-07-101-10/+24
| | | | MFC after: 1 month
* Clean up the ioctl to not process nonsense on SCSI isp cards.mjacob2006-07-101-40/+44
| | | | MFC after: 1 month
* Convert isp(4) and ispfw(4) to use firmware(9) to manage firmwaremjacob2006-07-098-131/+258
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | loading for the QLogic cards. Because isp(4) exists before the root is mounted, it's not really possible for us to use the kernel's linker to load modules directly from disk- that's really too bad. However, the this is still a net win in in that the firmware has been split up on a per chip (and in some cases, functionality) basis, so the amount of stuff loaded *can* be substantially less than the 1.5MB of firmware images that ispfw now manages. That is, each specific f/w set is now also built as a module. For example, QLogic 2322 f/w is built as isp_2322.ko and Initiator/Target 1080 firmware is built as isp_1080_it.ko. For compatibility purposes (i.e., to perturb folks the least), we also still build all of the firmware as one ispfw.ko module. This allows us to let 'ispfw_LOAD' keep on working in existing loader.conf files. If you now want to strip this down to just the firmware for your h/w, you can then change loader.conf to load the f/w you specifically want. We also still allow for ispfw to be statically built (e.g., for PAE and sparc64). Future changes will look at f/w unloading and also role switching that then uses the kernel linker to load different ips f/w sets. MFC after: 2 months
* Remove stale MAINTAINERmarkm2006-07-091-2/+0
| | | | OK'd by: scottl
* Enhanced floppy controllers have Data Rate Select Register (DSR) at 0x3f4.jkim2006-07-062-8/+30
| | | | | | | | | Use it to reset controller and to select data rate. According to Intel 80277AA datasheet, software reset behaves the same as DOR reset except that it is self clearing. National Semiconductor PC8477B datasheet says the same. As a side effect, we no longer use Configuration Control Register (CCR) at 0x3f7 for these controllers, which is often missing in modern hardware.
* Fix a missing unlock operation in interrupt handler.yongari2006-07-061-1/+3
| | | | | | PR: kern/99205 Submitted by: Alexey Illarionov <littlesavage AT rambler DOT ru> MFC after: 1 week
* Fix typo in comment.yongari2006-07-051-2/+2
| | | | Submitted by: brad AT OpenBSD DOT org
OpenPOWER on IntegriCloud