aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
* For embedded UARTs compatible with the ns8250 family it is possibleMarcel Moolenaar2007-03-281-1/+3
| | | | | | | | | | | | that the driver clock is identical to the processor or bus clock. This is the case for the PowerQUICC processor. When the clock is high enough, overflows happen in the calculation of the time it takes to send 1/10 of a character, used in delay loops. Fix the overflows so as to fix bugs in the delay loops that can cause either insufficient delays or excessive delays. Notes: svn path=/head/; revision=168000
* When we match UARTs found during bus-enumeration with UARTs used forMarcel Moolenaar2007-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | system devices (i.e. console, debug port or keyboard), don't stop after the first match. Find them all and keep track of the last. The reason for this change is that the low-level console is always added to the list of system devices first, with other devices added later. Since new devices are added to the list at the head, we have the console always at the end. When a debug port is using the same UART as the console, we would previously mark the "newbus" UART as a debug port instead of as a console. This would later result in a panic because no "newbus" device was associated with the console. By matching all possible system devices we would mark the "newbus" UART as a console and not as a debug port. While it is arguably better to be able to mark a "newbus" UART as both console and debug port, this fix is lightweight and allows a single UART to be used as the console as well as a debug port with only the aesthetic bug of not telling the user about it also being a debug port. Now that we match all possible system devices, update the rclk of the system devices with the rclk that was obtained through the bus attachment. It is generally true that clock information is more reliable when obtained from the parent bus than by means of some hardcoded or assumed value used early in the boot. This by virtue of having more context information. MFC after: 1 month Notes: svn path=/head/; revision=167999
* Add support for the 82562GX chip within if_fxp.Remko Lodder2007-03-281-0/+1
| | | | | | | | | | PR: 110251 Submitted by: Vyacheslav Vovk Approved by: imp (mentor) MFC After: 3 days Notes: svn path=/head/; revision=167998
* Add support for the RTL8110SC driver.Remko Lodder2007-03-281-0/+2
| | | | | | | | | | | PR: 110804 Submitted by: Daan Vreeken Sponsored by: Vitsch Electronics (patch) Approved by: imp (mentor) MFC After: 3 days Notes: svn path=/head/; revision=167997
* Add method enabled() to the SCC interface. This method can be usedMarcel Moolenaar2007-03-283-0/+22
| | | | | | | | | | | by driver backends to mark individual channels as enabled or not. The default implementation of this method always mark channels as enabled. This method is currently not used, but is added with the PowerQUICC in mind where the 2nd SCC channel can be disabled. Notes: svn path=/head/; revision=167996
* Don't derference a pointer before setting it.Matt Jacob2007-03-281-2/+2
| | | | | | | | | Very Pointy Dunce Cap T o: me. Submitted by: Marcel MFC after: 3 days Notes: svn path=/head/; revision=167992
* Allow the range of a SCC class to be 0. This gives all childMarcel Moolenaar2007-03-281-5/+7
| | | | | | | | | devices the same (overlapping) I/O range. This is useful for embedded communications controllers like the CPM of various models of the PowerQUICC. Notes: svn path=/head/; revision=167973
* Revisit the watchdogs: Resetting the error to EINVAL after failing to set theNick Hibma2007-03-274-8/+6
| | | | | | | | | | | watchdog might hide the succesful arming of an earlier one. Accept that on failing to arm any watchdog (because of non-supported timeouts) EOPNOTSUPP is returned instead of the more appropriate EINVAL. MFC after: 3 days Notes: svn path=/head/; revision=167950
* Don't assume the run bit is still set after a suspend.Julian Elischer2007-03-271-0/+1
| | | | | | | | Submitted by: Andrea Bittau ( adotbittauatcsdotucldotacdotuk) MFC After: 1 week Notes: svn path=/head/; revision=167947
* Fix a bug which could lead to receive side lockup when WC is disabled.Andrew Gallatin2007-03-271-0/+1
| | | | | | | | | | When submitting rx buffers and not using WC fifo, always replace the invalid DMA address with the real one, otherwise allocation failures could lead to the invalid DMA address being given to the NIC, and that would cause the receive side to lockup. Notes: svn path=/head/; revision=167942
* - Use '*h' instead of 'struct acpi_spinlock' for sizeof[1].Jung-uk Kim2007-03-261-2/+2
| | | | | | | | | | - Add a missing 'else' for 'if'[2]. Requested by: njl[1] Submitted by: njl[2] Notes: svn path=/head/; revision=167918
* Correct ACPI semaphore function parameters.Jung-uk Kim2007-03-261-4/+4
| | | | Notes: svn path=/head/; revision=167915
* Free the handle, not the lock. Pointy hat to me.Jung-uk Kim2007-03-261-1/+1
| | | | Notes: svn path=/head/; revision=167911
* Correct ACPI spinlock function parameters and use known ACPI spinlock names.Jung-uk Kim2007-03-261-20/+25
| | | | Notes: svn path=/head/; revision=167910
* Change the VPD code to read the VPD data on-demand when a driver asks forJohn Baldwin2007-03-262-30/+14
| | | | | | | | | | | | | | | it via pci_get_vpd_*() rather than always reading it for each device during boot. I've left the tunable so that it can still be turned off if a device driver causes a lockup via a query to a broken device, but devices whose drivers do not use VPD (the vast majority) should no longer result in lockups during boot, and most folks should not need to tweak the tunable now. Tested on: bge(4) Silence from: jmg Notes: svn path=/head/; revision=167909
* Use a unique name for each mutex now that acpi-ca is creating more thanNate Lawson2007-03-261-2/+11
| | | | | | | | | | | one (hardware & global lock). This should address witness complaints that a duplicate mutex is being acquired. Be sure to free the mutex to fix a potential memory leak. MFC after: 3 days Notes: svn path=/head/; revision=167908
* Remove ancient preprocessor code. Fix module compilation.Roman Kurakin2007-03-251-9/+1
| | | | | | | Requested by: n_hibma Notes: svn path=/head/; revision=167882
* Drop the ipw softc lock before calling back into net80211, fixing aLukas Ertl2007-03-241-0/+2
| | | | | | | | | | | LOR/deadlock. Tested by: Denis Shaposhnikov <dsh_AT_vlink.ru>, le@ LOR id: 205 MFC in: 3 days Notes: svn path=/head/; revision=167868
* o A quirk for Sagem USB-Serial controller.Maxim Konovalov2007-03-242-0/+3
| | | | | | | | | PR: usb/109613 Submitted by: Mayr Gerald MFC after: 1 month Notes: svn path=/head/; revision=167865
* o Add several CDMA-2000 terminals.Maxim Konovalov2007-03-242-2/+24
| | | | | | | | | PR: usb/109838 Submitted by: R.Mahmatkhanov MFC after: 1 month Notes: svn path=/head/; revision=167864
* bus_size_t is a bad cross-architectural type with respect to printf, use ↵Kip Macy2007-03-242-2/+2
| | | | | | | uint32_t instead Notes: svn path=/head/; revision=167862
* New device: icee. Generic i2c eeprom driver.Warner Losh2007-03-231-0/+291
| | | | Notes: svn path=/head/; revision=167857
* MFp4: Make the iicbus fully hinted. We no longer automatically addWarner Losh2007-03-232-51/+123
| | | | | | | | | | | | | | some devices (and not others). To get instances onto the iicbus, one now needs hints or an identify routine. We also do not probe the bus for devices because many iic devices cannot be safely probed (and when they can, the probe order turns out to be somewhat difficult to get right). # I'm not 100% sure that the iicsmb removal is right. Please contact me if # this causes difficulty. Notes: svn path=/head/; revision=167856
* MFp4: Make iicbus_trasnfer_gen suitable for bridge drivers. Use it in theWarner Losh2007-03-232-5/+11
| | | | | | | bitbang bridge. Notes: svn path=/head/; revision=167855
* MFp4: Create an ivar for each iic device on the iicbus. This ivarWarner Losh2007-03-231-1/+24
| | | | | | | holds the device's address. Notes: svn path=/head/; revision=167854
* Switch to ANSI function declarations.Craig Rodrigues2007-03-231-54/+16
| | | | Notes: svn path=/head/; revision=167851
* - Increase coalesce_nsecsKip Macy2007-03-232-17/+31
| | | | | | | - commit fixes for the following coverity warnings: 1765, 1760, 1758, 1756 Notes: svn path=/head/; revision=167848
* commit missed changeKip Macy2007-03-231-0/+1
| | | | Notes: svn path=/head/; revision=167847
* Check PCI-e link width to avoid foot shooting with 4x linksKip Macy2007-03-231-1/+17
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=167840
* - Fix exca_(io|mem)_map() to return proper errno values.John Baldwin2007-03-231-20/+21
| | | | | | | | | | | | | - Change exca_activate_resource() to call BUS_ACTIVATE_RESOURCE() before calling exca_(io|mem)_map() since the latter use rman_get_bus(tag|handle) and the recent changes to nexus(4) mean that you need to activate a resource before reading the bus tag and handle. This was true before, but now the nexus(4) drivers on x86 and ia64 are more forceful about it. Reviewed by: imp Notes: svn path=/head/; revision=167832
* Pass the RID from the bus frontends to the core probe function.Marcel Moolenaar2007-03-225-7/+7
| | | | | | | | | Currently all RIDs are 0, but for PCI devices this typically isn't the case. This change is made with future PCI support in mind. Notes: svn path=/head/; revision=167822
* MFP4: a) Some constification from NetBSD (gcc 4.1.2)Matt Jacob2007-03-225-125/+142
| | | | | | | | | | b) Split default param fetching/setting into scsi and fibre functions and retry the fibre fetch more than once. MFC after: 1 week Notes: svn path=/head/; revision=167821
* Catch up with ACPI-CA 20070320 import.Jung-uk Kim2007-03-2223-242/+233
| | | | Notes: svn path=/head/; revision=167814
* Fix an off-by-one error in iwi_init_fw_dma(). It didn't reuse the existingJohn Baldwin2007-03-211-1/+1
| | | | | | | | | | | | | DMA memory for a firmware load if it was the exact size needed, thus in the common case the driver was constantly free'ing and reallocating the DMA buffer and it would eventually begin to fail. With this fix, iwi0 reuses the same buffer the entire time and no longer fails to load the firmware after the machine has been up for a while. MFC after: 1 week Notes: svn path=/head/; revision=167776
* Memory leak killing spree, mostly bus_dma(9) related.Ariff Abdullah2007-03-216-43/+65
| | | | Notes: svn path=/head/; revision=167773
* move call to t3_prep_adapter earlier in attach before msi-x setup occursKip Macy2007-03-211-5/+6
| | | | | | | | | | this works around the fact that pci_config_{save,restore} doesn't adequately restore state for msi-x MFC after: 3 days Notes: svn path=/head/; revision=167769
* Change acpi's handling of suballocating system resources to be a littleJohn Baldwin2007-03-211-55/+39
| | | | | | | | | | | | simpler. It now can just use rman_is_region_manager() during acpi_release_resource() to see if the the resource is suballocated from a system resource. Also, the driver no longer needs MD knowledge about how to setup bus space tags and handles when doing a suballocation, but can simply rely on bus_activate_resource() in the parent setting all that up. Notes: svn path=/head/; revision=167768
* allocate 9 messages in all casesKip Macy2007-03-211-1/+1
| | | | Notes: svn path=/head/; revision=167762
* make MSI-X the default and allocate up to mp_ncpus queues per portKip Macy2007-03-214-59/+86
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=167760
* Overhaul driver/subsystem api's:Sam Leffler2007-03-215-139/+275
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o make all crypto drivers have a device_t; pseudo drivers like the s/w crypto driver synthesize one o change the api between the crypto subsystem and drivers to use kobj; cryptodev_if.m defines this api o use the fact that all crypto drivers now have a device_t to add support for specifying which of several potential devices to use when doing crypto operations o add new ioctls that allow user apps to select a specific crypto device to use (previous ioctls maintained for compatibility) o overhaul crypto subsystem code to eliminate lots of cruft and hide implementation details from drivers o bring in numerous fixes from Michale Richardson/hifn; mostly for 795x parts o add an optional mechanism for mmap'ing the hifn 795x public key h/w to user space for use by openssl (not enabled by default) o update crypto test tools to use new ioctl's and add cmd line options to specify a device to use for tests These changes will also enable much future work on improving the core crypto subsystem; including proper load balancing and interposing code between the core and drivers to dispatch small operations to the s/w driver as appropriate. These changes were instigated by the work of Michael Richardson. Reviewed by: pjd Approved by: re Notes: svn path=/head/; revision=167755
* Don't call bus_deactivate_resource() explicitly before callingYoshihiro Takahashi2007-03-2113-68/+0
| | | | | | | | bus_release_resource(). This is needed for pc98 by upcoming nexus related change. Notes: svn path=/head/; revision=167753
* Synchronize with version 1.0.071 of Chelsio's common codeKip Macy2007-03-2010-57/+363
| | | | | | | | | | | | (with the notable exception of improvements for using multiple TX queues) This adds support for the T3B2 ASIC rev Obtained from: Chelsio MFC after: 3 days Notes: svn path=/head/; revision=167746
* Tweak the probe/attach order of devices on the x86 nexus devices.John Baldwin2007-03-201-1/+1
| | | | | | | | Various BIOS-related psuedo-devices are added at an order of 5. acpi0 is added at an order of 10, and legacy0 is added at an order of 11. Notes: svn path=/head/; revision=167742
* Put a temporary bandaid to set/reset uncacheable DMA region (affectedAriff Abdullah2007-03-202-17/+46
| | | | | | | | | | | on amd64 and i386) until we gain proper BUS_DMA_NOCACHE support. (in progress). Tested by: rafan, infofarmer, Nguyen Tam Chinh <unixvn@gmail.com> Tested on: amd64, i386 Notes: svn path=/head/; revision=167738
* cxgb_stop is only called from cxgb_ioctl so:Kip Macy2007-03-201-6/+7
| | | | | | | | | - don't acquire port lock, already held in ioctl - rename to cxgb_stop_locked - switch callout_drain to callout_stop to avoid a hang from having the port lock held Notes: svn path=/head/; revision=167734
* If we got an OBE/IBF event, we failed to re-enable the GPE. This wouldNate Lawson2007-03-201-5/+14
| | | | | | | | | | | | cause the EC to stop handling future events because the GPE stayed masked. Set a flag when queueing a GPE handler since it will ultimately re-enable the GPE. In all other cases, re-enable it ourselves. I reworked the patch from the submitter. Submitted by: Rong-en Fan <grafan@gmail.com> Notes: svn path=/head/; revision=167730
* Revert couple of changes from 1.51 and 1.52. Reading link status with BMSRJung-uk Kim2007-03-191-14/+12
| | | | | | | | | | is okay for most of the chipsets but BCM5701 PHY does not seem to like it. Set media to IFM_NONE if link is not up instead of the previous value. Reported by: Goran Lowkrantz (goran dot lowkrantz at ismobile dot com) Notes: svn path=/head/; revision=167728
* Destroy channel DMA tag during resource cleanup.Ariff Abdullah2007-03-191-1/+4
| | | | Notes: svn path=/head/; revision=167702
* Poll only while interrupt is disabled.Hidetoshi Shimokawa2007-03-191-4/+6
| | | | | | | MFC: 3 days after Notes: svn path=/head/; revision=167686
* Wait SCLK to be stable after LPS enabled.Hidetoshi Shimokawa2007-03-191-0/+2
| | | | | | | | | | This should fix NMI problem in fwphy_rddata(). PR: kern/94146 kern/100356 MFC: after 3 days Notes: svn path=/head/; revision=167685