summaryrefslogtreecommitdiffstats
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
* Add support for serial communication with Windows CE based Handheld Computer.takawata2007-01-281-0/+383
| | | | Obtained from: NetBSD
* Add some vendor IDs mainly from NetBSD.takawata2007-01-281-0/+5
|
* Add speaker control for HP xw4300. This hardware doesn't respond toariff2007-01-281-2/+17
| | | | | | | | | | | | unsolicited pin sense event and need manual control to turn off speaker volume while attaching headphone. Tested by: Ingeborg Hellemo <Ingeborg.Hellemo@cc.uit.no> Disable global Acer + ALC883 headphone automute settings since there are few models that does not respect this and causing broken behaviour. Reported/Tested by: Pavel Argentov <argentoff@rtelekom.ru>
* Add the SMART command to the ATA instruction set.remko2007-01-271-0/+1
| | | | | | | | | When the disk has an error, it will now print SMART instead of 'Unknown CMD'. PR: kern/93368 Submitted by: Garry Belka <garry at NetworkPhysics dot COM> Approved by: sos
* Rearrange locking order to avoid LOR (cat /dev/midistat).ariff2007-01-271-3/+9
| | | | Reported by: rodrigc
* Massive inlining cleanups/removal to make it survive on WARNS=2.ariff2007-01-271-92/+90
|
* Reduce maximum DMA segments from 128 to 64. We don't need more than that.ariff2007-01-271-1/+1
|
* Total DMA segments should include total number of record channel(s).ariff2007-01-261-1/+1
|
* Fix forever broken ua_chan_setblocksize() uninitialized return valueariff2007-01-261-7/+13
| | | | which causing divide by zero panic in other places (notably chn_sync()).
* Sync uaudio_sndstat_prepare_pcm() output with sndstat_prepare_pcm() to getariff2007-01-261-4/+12
| | | | simmilar (debugging) output.
* Add missing MIIBUS_MEDIAINIT() call.dwhite2007-01-261-0/+1
|
* Collapse 5706C and 5708C PHYs into one entry. ID 0x15 is actually used fordwhite2007-01-262-3/+1
| | | | the SERDES PHY on these chips and we want gentbi to pick this up, not brgphy.
* Add support for SERDES PHY configurations. These are commonly found indwhite2007-01-261-43/+13
| | | | | | | blade systems, such as the Dell 1955 and the Intel SBXD132. Development hardware for this work was provided by Broadcom and iXsystems. A SBXD132 blade for testing was provided by Iron Systems.
* Whoops- #ifdef problem caused uninitialized transport. Not horriblymjacob2007-01-251-1/+1
| | | | a problem, but caused annoying messages.
* The TCP checksum offload handling in the 8111B/8168B and 8101E PCIe canwpaul2007-01-251-1/+6
| | | | | | | | | | | | | | | apparently be confused by short TCP segments that have been manually padded to the minimum ethernet frame size. The driver does short frame padding in software as a workaround for a bug in the 8169 PCI devices that causes short IP fragments to be corrupted due to an apparent conflict between the hardware autopadding and hardware IP checksumming. To fix this, we avoid software padding for short TCP segments, since the hardware seems to autopad and checksum these correctly (even the older 8169 NICs get these right). Short UDP packets appear to be handled correctly in all cases. This should work around the IP header checksum bug in the 8169 while not tripping the TCP checksum bug in the 8111B/8168B and 8101E.
* Add missing function trace for debug prints.njl2007-01-231-0/+2
|
* Remove a PCI ID entry that conflicts with the AMR driver.scottl2007-01-231-1/+0
|
* It seems that enabling Tx and Rx before setting descriptor DMAyongari2007-01-231-15/+17
| | | | | | | | | | | | | addresses shall access invalid descriptor DMA addresses on PCIe hardwares and then panicked the system. To fix it set descriptor DMA addresses before enabling Tx and Rx such that hardware can see valid descriptor DMA addresses. Also set RL_EARLY_TX_THRESH before starting Tx and Rx. Reported by: steve.tell AT crashmail DOT de Tested by: steve.tell AT crashmail DOT de Obtained from: NetBSD MFC after: 1 week
* Clean up some of the various platform and release specific dma tagmjacob2007-01-233-47/+36
| | | | | | | stuff so it is centralized in isp_freebsd.h. Take out PCI posting flushed in qla2100/2200 register reads except for 2100s.
* Expand the MSI/MSI-X API to address some deficiencies in the MSI-X support.jhb2007-01-229-27/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - First off, device drivers really do need to know if they are allocating MSI or MSI-X messages. MSI requires allocating powerof2() messages for example where MSI-X does not. To address this, split out the MSI-X support from pci_msi_count() and pci_alloc_msi() into new driver-visible functions pci_msix_count() and pci_alloc_msix(). As a result, pci_msi_count() now just returns a count of the max supported MSI messages for the device, and pci_alloc_msi() only tries to allocate MSI messages. To get a count of the max supported MSI-X messages, use pci_msix_count(). To allocate MSI-X messages, use pci_alloc_msix(). pci_release_msi() still handles both MSI and MSI-X messages, however. As a result of this change, drivers using the existing API will only use MSI messages and will no longer try to use MSI-X messages. - Because MSI-X allows for each message to have its own data and address values (and thus does not require all of the messages to have their MD vectors allocated as a group), some devices allow for "sparse" use of MSI-X message slots. For example, if a device supports 8 messages but the OS is only able to allocate 2 messages, the device may make the best use of 2 IRQs if it enables the messages at slots 1 and 4 rather than default of using the first N slots (or indicies) at 1 and 2. To support this, add a new pci_remap_msix() function that a driver may call after a successful pci_alloc_msix() (but before allocating any of the SYS_RES_IRQ resources) to allow the allocated IRQ resources to be assigned to different message indices. For example, from the earlier example, after pci_alloc_msix() returned a value of 2, the driver would call pci_remap_msix() passing in array of integers { 1, 4 } as the new message indices to use. The rid's for the SYS_RES_IRQ resources will always match the message indices. Thus, after the call to pci_remap_msix() the driver would be able to access the first message in slot 1 at SYS_RES_IRQ rid 1, and the second message at slot 4 at SYS_RES_IRQ rid 4. Note that the message slots/indices are 1-based rather than 0-based so that they will always correspond to the rid values (SYS_RES_IRQ rid 0 is reserved for the legacy INTx interrupt). To support this API, a new PCIB_REMAP_MSIX() method was added to the pcib interface to change the message index for a single IRQ. Tested by: scottl
* Change the remainder of the drivers for DMA'ing devices enabled in themarius2007-01-2114-39/+56
| | | | | | | | sparc64 GENERIC and the sound device drivers known working on sparc64 to use bus_get_dma_tag() to obtain the parent DMA tag so we can get rid of the sparc64_root_dma_tag kludge eventually. Except for ath(4), sk(4), stge(4) and ti(4) these changes are runtime tested (unless I booted up the wrong kernels again...).
* Correct a logic bug in the previous change.marius2007-01-211-1/+1
|
* The multicast hash table has 8 slots in the BCE hardware, not 4 slots likescottl2007-01-201-4/+4
| | | | | | | the BGE hardware. Adapt the driver for this. Submitted by: Mike Karels MFC After: 3 days
* Add macros for the individual divisor bits as some MC146818A-compatiblemarius2007-01-201-4/+7
| | | | chips also use them for different purposes.
* Remove BUS_DMA_WAITOK from bus_dma_tag_create() invocations as it'smarius2007-01-204-7/+7
| | | | no valid flag there.
* Add front-ends for the 'lebuffer' variants found on some SBus cards.marius2007-01-202-0/+708
| | | | | | | | | These are shared-memory variants based on Am79C90-compatible chips that apart from the missing DMA engine are similar to the 'ledma' variant including using a (pseudo-)bus/device for the buffer that the actual LANCE device hangs off from. The performance of these is close to that of the 'ledma' one, like expected at a few times the CPU load though.
* For setting the port PCnet chips must be powered down or stopped andmarius2007-01-201-7/+15
| | | | | | | | | | unlike documented may not take effect without an initialization. So don't invoke (*sc_mediachange) directly in lance_mediachange() but go through lance_init_locked(). It's suboptimal to impose this for all chips but given that besides the affected PCI bus front-end the only other front-end which supports media selection is and likely ever will be the 'ledma' front-end I see not enough reason to break the in-driver API for this (though one could argue both ways here).
* Use bus_get_dma_tag() to obtain the parent DMA tag so le(4) works onmarius2007-01-203-3/+3
| | | | platforms requiring this.
* Grumble- let a linux-ism slip in and had an llx whichmjacob2007-01-201-9/+12
| | | | then choked on a 64 bit platforms. Oops.
* MFP4: Move default setting to the end of isp_reset instead of themjacob2007-01-207-93/+138
| | | | | | | | | | front of isp_init so we can read NVRAM even if we're role ISP_NONE. Prepare for reintroduction of channels (for FC) for N-Port Virtualization. Fix a botch in handle assignment that caused us to nuke one device when a new one arrives and end up with two devices with the same identity in the virtual target mapping table.
* - In miibus_attach() remove IFM_IMASK from the dontcare_mask of themarius2007-01-201-2/+17
| | | | | | | | | | | | | | | | ifmedia_init() invocation. IFM_IMASK makes only sense here when all of the maxium of 32 PHYs on each one MII bus support disjoint sets of media, which generally isn't the case (though it would be nice if we had a way to let NIC drivers indicate that for the few card models where the PHY configuration is known/fixed and IFM_IMASK actually makes sense). - Add and use a miibus_print_child() for the bus_print_child method which additionally prints the PHY number (which actually is the PHY address) so one can figure out the media instance <-> PHY number mapping from the PHY driver attach output. This is intented to be usefull in situations where the addresses of the PHYs on the bus are known (f.e. of internal/ integrated PHYs) so one can feed the appropriate media instance number to ifconfig(8) (with the upcoming change for ifconfig(8)). This is more or less inspired by the NetBSD mii_print().
* - Don't set MIIF_NOISOLATE so ukphy(4) can be used in configurations withmarius2007-01-201-3/+1
| | | | | | | | | multiple PHYs. In case some PHYs currently driven by ukphy(4) exhibit problems when isolating due to incomplete implementations or silicon bugs we'll need to add specific drivers for these. Looking at NetBSD and OpenBSD I don't expect problems here though (quite the contrary; we still seem to set MIIF_NOISOLATE without good reason in a bunch of PHY drivers). - Fix a style(9) whitespace nit.
* - Change the PCI-X registers constants to be relative to the PCI-X PCIjhb2007-01-193-22/+88
| | | | | | | | | capability rather than hardcoded offsets for a particular card. While I'm here, expand the constants some. - Change the ahd(4) driver to use pci_find_extcap() to locate the PCI-X capability to keep up with the first change. Reviewed by: scottl, gibbs (earlier version)
* Cope gracefully with device_get_children returning an error.imp2007-01-191-2/+5
| | | | | Obtained from: Hans Petter Selasky P4: http://perforce.freebsd.org/chv.cgi?CH=112957
* - Add a uart_rxready() and corresponding device-specific implementationsmarius2007-01-185-35/+35
| | | | | | | | | | | | | | | that can be used to check whether receive data is ready, i.e. whether the subsequent call of uart_poll() should return a char, and unlike uart_poll() doesn't actually receive data. - Remove the device-specific implementations of uart_poll() and implement uart_poll() in terms of uart_getc() and the newly added uart_rxready() in order to minimize code duplication. - In sunkbd(4) take advantage of uart_rxready() and use it to implement the polled mode part of sunkbd_check() so we don't need to buffer a potentially read char in the softc. - Fix some mis-indentation in sunkbd_read_char(). Discussed with: marcel
* - Probe the CS4231 in USIII machines.marius2007-01-181-6/+4
| | | | | | - Remove unused variables. [1] Reported by: Coverity Prevent (CID 700, 701) [1]
* Wrap the EISA-specific parts of the dpt(4) and si(4) back-ends inmarius2007-01-184-0/+21
| | | | | | | the newly added DEV_EISA. This is done so that these back-ends can be compiled on platforms not providing in{b,w,l}()/out{b,w,l}() and friends (but may wish to use them together with bus front-ends other than the EISA one).
* On sparc64 also use the fillw() this header provides for ia64 somarius2007-01-181-2/+4
| | | | | the sparc64 MD code doesn't need to provide a memsetw() along with the ISA compat cruft.
* Fix a buffer overflow iff USB_DEBUG is set, hw.usb.ums.debug is > 5 and themarkus2007-01-171-3/+4
| | | | | | | | | total size of all input reports is < 6. PR: usb/106435 Submitted by: Eygene Ryabinkin <rea-fbsd@codelabs.ru> Approved by: emax (mentor) MFC after: 3 days
* Add PCI Id's for upcoming controllers.scottl2007-01-171-1/+3
| | | | | Obtained from: LSI Corp. MFC After: 3 days
* - Merge sys/sparc64/creator/creator_upa.c into sys/dev/fb/creator.c.marius2007-01-162-87/+452
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The separate bus front-end was inherited from the OpenBSD creator(4), which at that time had a mainbus(4) (for USI/II machines, which use an UPA interconnection bus as the nexus) and an upa(4) (for USIII machines, which use a subordinate/slave UPA bus hanging off from the Fireplane/Safari interconnection bus) front-end. With FreeBSD and newbus there is/will be no need to have two separate bus front-ends for these busses, so we can easily coallapse the shared front-end and the back-end into a single source file (note that the FreeBSD creator_upa.c was misnomer anyway; based on what it actually attached to that should have been creator_nexus.c), actually OpenBSD meanwhile also has moved to a shared front-end and a single source file. Due to the low-level console support creator.c also wasn't free from bus related things before. While at it, also split sys/sparc64/creator/creator.h into a sys/dev/fb/creatorreg.h that only contains register macros and move the structures to the top of sys/dev/fb/creator.c as suggested by style(9) so creator(4) is no longer scattered over two directories. - Use OF_decode_addr()/sparc64_fake_bustag() to obtain the bus tags and handles for the low-level console support instead of hardcoding support for AFB/FFB hanging off from nexus(4) only. This is part 2/4 of allowing creator(4) to work in USIII machines (which have a UPA bus hanging off from the Fireplane/Safari bus reflected by the nexus), which already makes it work as the low-level console there. - Allocate resources in the bus attach routine regardless of whether creator(4) is used as for the low-level console and thus the required bus tags and handles have been already obtained or not so the resources are marked as taken in the respective RMAN. - For both obtaining the bus tags and handles for the low-level console support as well as allocating the corresponding resources in the regular bus attach routine don't bother to get all for the maximum of 24 register banks but only (for) the two tag/handle pairs required for providing the video interface for syscons(4) support. If we can't allocate the rest of them just limit the memory range accessible via creator_fb_mmap() accordingly. - Sanity check the memory range spanned by the first and last resources and the resources in between as far as possible, as the XFree86/Xorg sunffb(4) expects to be able to access the whole region, even though the backing resources are actually non-continuous. Limit and check the memory range accessible via creator_fb_mmap() accordingly. - Reduce the size of buffers for OFW properties to what they actually need to hold. - Rename some tables to creator_<foo> for consistency. - Also for the sizes in the creator_fb_mmap() mapping table entries use macros for consistency, add macros for the remaining register banks for completeness.
* o In re_newbuf() and re_encap() if re_dma_map_desc() aborts the mappingmarius2007-01-161-47/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | operation as it ran out of free descriptors or if there are too many segments in the first place, call bus_dmamap_unload() in order to unload the already loaded segments. For trying to map the defragmented mbuf (chain) in re_encap() this introduces re_dma_map_desc() setting arg.rl_maxsegs to 0 as a new failure mode. Previously we just ignored this case, corrupting our view of the TX ring. o In re_txeof(): - Don't clear IFF_DRV_OACTIVE unless there are at least 4 free TX descriptors. Further down the road re_encap() will bail if there aren't at least 4 free TX descriptors, causing re_start() to abort and prepend the dequeued mbuf again so it makes no sense to pretend we could process mbufs again when in fact we won't. While at it replace this magic 4 with a macro RL_TX_DESC_THLD throughout this driver. - Don't cancel the watchdog timeout as soon as there's at least one free TX descriptor but instead only if all descriptors have been handled. It's perfectly normal, especially in the DEVICE_POLLING case, that re_txeof() is called when only a part of the enqueued TX descriptors have been handled, causing the watchdog to be disarmed prematurely. o In re_encap(): - If m_defrag() fails just drop the packet like other NIC drivers do. This should only happen when there's a mbuf shortage, in which case it was possible to end up with an IFQ full of packets which couldn't be processed as they couldn't be defragmented as they were taking up all the mbufs themselves. This includes adjusting re_start() to not trying to prepend the mbuf (chain) if re_encap() has freed it. - Remove dupe initialization of members of struct rl_dmaload_arg to values that didn't change since trying to process the fragmented mbuf chain. While at it remove an unused member from struct rl_dmaload_arg. o In re_start() remove a abandoned, banal comment. The corresponding code was moved to re_attach() some time ago. With these changes re(4) now survives one day (until stopped) of hammering out packets here. Reviewed by: yongari MFC after: 2 weeks
* Disable MSI for the Intel 845 and 865 chipsets and update comment forjhb2007-01-161-1/+3
| | | | E7210 to note it is the same devid as the 875 chipset.
* Correct driver_t brgphy_driver, which was forgotten from the last commit.jkim2007-01-161-1/+1
|
* Fix the subvendor ID for PCI-PCI bridges.jhb2007-01-162-5/+11
| | | | | | | | | | | - Retire the PCI_SUB*_1 constants and don't try to read a subvendor ID out of them. There isn't a standard subvendor ID field for PCI-PCI bridges. Instead, the dword at offset 0x34 is actually mostly reserved except for the LSB which is the capabilities pointer. - Add support for the PCI-PCI bridge subvendor ID capability (13) and use it to set the subvendor ID for PCI-PCI bridges. MFC after: 1 month
* Fix typo in a comment.joel2007-01-161-1/+1
|
* Move MII model and revision into softc.jkim2007-01-161-14/+24
|
* - Move Ethernet@WireSpeed and jumbo frame configurations to separatejkim2007-01-151-48/+60
| | | | | | | functions. The idea is taken from OpenBSD. - Set/clear jumbo frame configurations for bge(4). - Re-add BCM5750 PHY workaround for bce(4), which was mistakenly removed from the previous commit.
* - Fix BCM5754 support found in Dell PowerEdge SC440.jkim2007-01-154-41/+85
| | | | | | | | | | | - Move some PHY bug detections from brgphy.c to if_bge.c. - Do not penalize working PHYs. - Re-arrange bge_flags roughly by their categories. - Fix minor style(9) nits. PR: kern/107257 Obtained from: OpenBSD Tested by: Mike Hibler <mike at flux dot utah dot edu>
* Clean up some debug prints from last commit and move one under boot -v.njl2007-01-151-6/+5
| | | | Reminded by: bruno
OpenPOWER on IntegriCloud