summaryrefslogtreecommitdiff
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
* MFC r209541, r209548:Rui Paulo2010-06-281-1/+1
| | | | | | | | | Fix the AR_SREV_MERLIN_20_OR_LATER() check. Approved by: re (kensmith) Notes: svn path=/releng/8.1/; revision=209575
* MFC 209213:John Baldwin2010-06-231-1/+3
| | | | | | | | | | | | | When updating individual CPU's lowest Cx state to use, never set it to a state lower than the lowest one supported by the current CPU. This closes some races with changes to the hw.acpi.cpu_cx_lowest sysctl while Cx states for individual CPUs were changing (e.g. unplugging the AC adapter of a laptop) that could result in panics. Approved by: re (kib) Notes: svn path=/releng/8.1/; revision=209473
* MFC r209341:Alexander Motin2010-06-231-0/+4
| | | | | | | | | Report transport type in XPT_PATH_INQ. Approved by: re (kib) Notes: svn path=/releng/8.1/; revision=209458
* MFC r209340:Alexander Motin2010-06-231-0/+4
| | | | | | | | | | Report transport type in XPT_PATH_INQ. PR: i386/147929 Approved by: re (kib) Notes: svn path=/releng/8.1/; revision=209457
* MFC: r208776Marius Strobl2010-06-111-19/+27
| | | | | | | | | | | Avoid possible NULL-dereferences. Found with: Coverity Prevent(tm) CID: 3428 Approved by: re (kib) Notes: svn path=/stable/8/; revision=209075
* MFC 199549, 199997, 204158, 207673, and 208901.Kenneth D. Merry2010-06-113-370/+472
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring in a number of netfront changes: r199549 | jhb Remove commented out reference to if_watchdog and an assignment of zero to if_timer. Reviewed by: scottl r199997 | gibbs Add media ioctl support and link notifications so that devd will attempt to run dhclient on a netfront (xn) device that is setup for DHCP in /etc/rc.conf. PR: kern/136251 (fixed differently than the submitted patch) r204158 | kmacy - make printf conditional - fix witness warnings by making configuration lock a mutex r207673 | joel Switch to our preferred 2-clause BSD license. Approved by: kmacy r208901 | ken A number of netfront fixes and stability improvements: - Re-enable TSO. This was broken previously due to CSUM_TSO clearing the CSUM_TCP flag, so our checksum flags were incorrectly set going to the netback driver. That was fixed in r206844 in tcp_output.c, so we can turn TSO back on here. - Fix the way transmit slots are calculated, so that we can't overfill the ring. - Avoid sending packets with more fragments/segments than netback can handle. The Linux netback code can only handle packets of MAX_SKB_FRAGS, which turns out to be 18 on machines with 4K pages. We can easily generate packets with 32 or so fragments with TSO turned on. Right now the solution is just to drop the packets (since netback doesn't seem to handle it gracefully), but we should come up with a way to allow a driver to tell the TCP stack the maximum number of fragments it can handle in a single packet. - Fix the way the consumer is tracked in the receive path. It could get out of sync fairly easily. - Use standard Xen ring macros to make it clearer how netfront is using the rings. - Get rid of Linux-ish negative errno return values. - Added more documentation to the driver. - Refactored code to make it easier to read. - Some other minor fixes. Reviewed by: gibbs Sponsored by: Spectra Logic Approved by: re (bz) Notes: svn path=/stable/8/; revision=209061
* MFC r208162, 208836, 208837:Nathan Whitehorn2010-06-111-2/+2
| | | | | | | | | | | | | | | | | Program the K2 SATA controller's interrupt to be level-triggered low, and respect the edge/level settings in the device tree. OpenPIC on powerpc sets interrupts to be level high by default. On Apple interrupt controllers, all level interrupts are low regardless of programming except interrupt 0, used by K2 SATA on some Apple systems, with the result that the K2 SATA IRQ is misconfigured. Pending review of changes to this default, work around this by changing the programming of the K2 SATA interrupt to level low. Approved by: re (kib) Notes: svn path=/stable/8/; revision=209044
* MFC r208870:Nathan Whitehorn2010-06-113-1/+21
| | | | | | | | | | | | | | | | | Some revisions of the Serverworks K2 SATA controller have a data corruption bug where if an ATA command is issued before DMA is started, data will become available to the controller before it knows what to do with it. This results in either data corruption or a controller crash. This patch remedies the problem by adopting the workaround employed by Linux and Darwin: starting the DMA engine prior to sending the ATA command. Reviewed by: mav Approved by: re (kib) Notes: svn path=/stable/8/; revision=209042
* MFC r208642:Rui Paulo2010-06-101-6/+6
| | | | | | | | | | Don't shadow the global variable 'version'. Submitted by: Arnaud Lacombe <alc@NetBSD.org> Approved by: re (kensmith) Notes: svn path=/stable/8/; revision=209015
* MFC r204644:Rui Paulo2010-06-1037-37/+37
| | | | | | | | | | Replace Id keyword with FreeBSD keyword and set the svn props correctly. No functional change. Approved by: re (bz) Notes: svn path=/stable/8/; revision=209014
* MFC r208643:Rui Paulo2010-06-101-1/+2
| | | | | | | | | | | Due to the way HALDEBUG() is defined, we need to add curly brackets when using it as a sole if clause instruction. Submitted by: Arnaud Lacombe <alc@NetBSD.org> Approved by: re (kensmith) Notes: svn path=/stable/8/; revision=209012
* MFC r208644:Rui Paulo2010-06-101-2/+3
| | | | | | | | | | | | Due to the way HALDEBUG() is defined, we need to add curly brackets when using it as a sole if clause instruction. While there, fix 'const static' typo. Submitted by: Arnaud Lacombe <alc@FreeBSD.org> Approved by: re (kensmith) Notes: svn path=/stable/8/; revision=209011
* MFC r208712:Rui Paulo2010-06-101-88/+41
| | | | | | | | | | Rewrite ar9285SetBoardValues() to match what ath9k does and fix out of bounds reads. Approved by: re (kensmith) Notes: svn path=/stable/8/; revision=209010
* MFC r208711:Rui Paulo2010-06-108-24/+52
| | | | | | | | | | | Bring in a couple of fixes from the Linux ath9k related to chip hangs. While there, try to make the register write pattern look like what's done by ath9k. Approved by: re (kensmith) Notes: svn path=/stable/8/; revision=209009
* MFC r208703:Rui Paulo2010-06-101-1/+1
| | | | | | | | | | | Fix an off by one in ar9285SetPowerCalTable(). Found with: Coverity Prevent(tm) CID: 3979 Approved by: re (kensmit) Notes: svn path=/stable/8/; revision=209008
* MFC 208925:John Baldwin2010-06-101-1/+1
| | | | | | | | | | The lock associated with the /dev/apm knote is already held, so use KNOTE_LOCKED() instead of KNOTE_UNLOCKED(). Approved by: re (kib) Notes: svn path=/stable/8/; revision=209000
* MFC r208862:Pyun YongHyeon2010-06-102-16/+51
| | | | | | | | | | | | | | | | | | | | | | | | Fix a bug introduced in r199011. When bge(4) reuses loaded RX buffers it should also reinitialize RX descriptors otherwise some stale data could be passed to controller. This could end up with mbuf double free or unexpected NULL pointer dereference in upper stack. To fix the issue, save loaded buffer's length and reinitialize RX descriptors with the saved value whenever bge(4) reuses the loaded RX buffers. While I'm here, increase the number of RX buffers to 512 from 256. This simplifies RX buffer handling as well as giving more RX buffers. Controller supports just fixed number of RX buffers (i.e. 512) and bge(4) used to rely on hope that our CPU is fast enough to keep up with the controller. With this change, bge(4) will use 1MB for RX buffers but I don't think it would cause problems in these days. Reported by: marcel Tested by: marcel Approved by: re (bz) Notes: svn path=/stable/8/; revision=208993
* MFC r208806:Pyun YongHyeon2010-06-081-2/+3
| | | | | | | | | | | Don't blindly set IFF_DRV_OACTIVE when sge_encap() fails. If there is no queued frame, IFF_DRV_OACTIVE would never be cleared. Submitted by: Nikolay Denev < ndenev <> gmail at com > Approved by: re (bz) Notes: svn path=/stable/8/; revision=208923
* MFC r208796:Alexander Motin2010-06-081-16/+16
| | | | | | | | | Fix PCH chipset IDs. They are 0x3bxx, not 0x3axx. Approved by: re (kib) Notes: svn path=/stable/8/; revision=208908
* MFC of 198262Matt Jacob2010-06-074-21/+40
| | | | | | | | | | | Use callout_init_mtx on FreeBSD versions recent enough. This closes the race where interrupt thread can complete the request for which timeout has fired and while mpt_timeout has blocked on mpt_lock. Approved by: re (kib) Notes: svn path=/stable/8/; revision=208894
* MFC: r208650Jung-uk Kim2010-06-021-1/+3
| | | | | | | | | | Fix a regression from r203544 (MFC of r200554), which broke fdc(4) attachment to acpi(4). Approved by: re (kib) Notes: svn path=/stable/8/; revision=208757
* Merge 208554 from head:Gleb Smirnoff2010-06-022-0/+446
| | | | | | | | | | | | | | | | | | | | | | | Add uep(4), driver for USB onscreen touch panel from eGalax. The driver is stub. It just creates device entry and feeds reassembled packets from hardware into it. If in future we would port wsmouse(4) from NetBSD, or make sysmouse(4) to support absolute motion events, then the driver can be extended to act as system mouse. Meanwhile, it just presents a /dev/uep0, that can be utilized by X driver, that I am going to commit to ports tree soon. The name for the driver is chosen to be the same as in NetBSD, however, due to different USB stacks this driver isn't a port. The driver is supported by ports/x11-drivers/xf86-input-egalax. Approved by: re (kib) Notes: svn path=/stable/8/; revision=208754
* MFC r207329, r208716:Attilio Rao2010-06-012-9/+181
| | | | | | | | | | | | | | - Extract the IODEV_PIO interface from ia64 and make it MI. - On i386 and amd64 the old behaviour is kept but multithreaded processes must use the new interface in order to work well. - Support for the other architectures is greatly improved. Sponsored by: Sandvine Incorporated Approved by: re (kib, bz) Notes: svn path=/stable/8/; revision=208723
* MFC r208512:Pyun YongHyeon2010-05-311-1/+2
| | | | | | | | | | | | | sge_encap() can sometimes return an error with m_head set to NULL. Make sure not to requeue freed mbuf in sge_start_locked(). This should fix NULL pointer dereference panic. Reported by: Nikolay Denev <ndenev <> gmail dot com> Submitted by: jhb Approved by: re (bz) Notes: svn path=/stable/8/; revision=208677
* This is an MFC of 208119, 208129Matt Jacob2010-05-262-18/+15
| | | | | | | | | | | Hook up some wires that were forgotten a few months ago and restore the zombie device timeout code and the loop down time code and the fabric hysteresis code. Approved by: re (ken smith) Notes: svn path=/stable/8/; revision=208578
* MFC r200824Andrew Thompson2010-05-251-0/+1
| | | | | | | | | Set correct USB device description Submitted by: Paul B Mahol Notes: svn path=/stable/8/; revision=208528
* MFC r208120:Weongyo Jeong2010-05-241-3/+9
| | | | | | | | | | | | | | - fixes a bug that it didn't initialize the ratectl after association; so ni_txrate returned 0 which is a invalid result. - The fourth argument of ieee80211_ratectl_tx_complete() could be not NULL. Reported by: Gustau P?rez <gperez at entel.upc.edu> Tested by: Gustau P?rez <gperez at entel.upc.edu>, Ian FREISLICH <ianf at clue.co.za> Notes: svn path=/stable/8/; revision=208523
* MFC 208350:John Baldwin2010-05-241-0/+12
| | | | | | | Add support for the Perle Speed4 LE. Notes: svn path=/stable/8/; revision=208518
* MFC r207484:Ryan Stone2010-05-241-9/+9
| | | | | | | | | | | | | | | | When configuring a system-wide couting PMC, hwpmc was incorrectly logging process mappings for that PMC. Nothing ever reads pmc logs out of a counting PMC, so the log buffers were leaked when the PMC was deconfigured. The process mappings are only useful for sampling PMCs anyway, so only log the mappings if the PMC is a sampling PMC. This bug would cause allocating sample-mode PMCs to fail with ENOMEM after allocating several counting-mode PMCs. Approved by: emaste (mentor) Notes: svn path=/stable/8/; revision=208517
* MFC of driver version 2.2.0 for 8.1Jack F Vogel2010-05-242-195/+260
| | | | Notes: svn path=/stable/8/; revision=208516
* MFC 208379: Add interrupt descriptions for mxge's msi-x vectorsAndrew Gallatin2010-05-241-0/+2
| | | | Notes: svn path=/stable/8/; revision=208499
* MFC 208312: Correctly identify some twinax cables, which reportAndrew Gallatin2010-05-241-1/+2
| | | | | | | a media type of 1 Notes: svn path=/stable/8/; revision=208498
* MFC 208309: Update mxge firmware to latest available from Myricom.Andrew Gallatin2010-05-244-33887/+34014
| | | | Notes: svn path=/stable/8/; revision=208495
* MFC r208410:Alexander Motin2010-05-246-0/+59
| | | | | | | Report ATA/SATA channel number to NewBus at location string. Notes: svn path=/stable/8/; revision=208492
* MFC r208414:Alexander Motin2010-05-244-0/+8
| | | | | | | Fill rman range start/end values. It makes devinfo output more readable. Notes: svn path=/stable/8/; revision=208491
* MFC: r208279Jung-uk Kim2010-05-241-0/+1
| | | | | | | Restore the previous video mode after VESA BIOS POST, just in case. Notes: svn path=/stable/8/; revision=208478
* MFC: r208276Jung-uk Kim2010-05-241-4/+4
| | | | | | | | | Remove unnecessary pointer increment. A wrong pointer may be passed to free(9) and it can cause kernel panic when there are multiple graphics controllers in the system. Notes: svn path=/stable/8/; revision=208477
* MFC: r208349Marius Strobl2010-05-231-3/+3
| | | | | | | | | | | | | Change ad_firmware_geom_adjust() to operate on a struct disk * only and hook it up to ada(4) also. While at it, rename *ad_firmware_geom_adjust() to *ata_disk_firmware_geom_adjust() etc now that these are no longer limited to ad(4). This also allows to maintain a compatibility shim for pc98_ad_firmware_geom_adjust() for the tier-1 PC98 in stable/8. Reviewed by: mav (r208349) Notes: svn path=/stable/8/; revision=208451
* MFC r208375, r208393:Alexander Motin2010-05-234-51/+149
| | | | | | | | Improve suspend/resume support. Make sure controller is idle on suspend and reset it on resume. Notes: svn path=/stable/8/; revision=208448
* MFC r208356.Navdeep Parhar2010-05-231-1/+0
| | | | | | | Remove bad assertion. Notes: svn path=/stable/8/; revision=208439
* MFC r208149,208285:Nathan Whitehorn2010-05-231-3/+3
| | | | | | | | | | | | Add support for the U4 PCI-Express bridge chipset used in late-generation Powermac G5 systems. MSI and several other things are not presently supported. The U3/U4 internal device support portions of this change were contributed by Andreas Tobler. Notes: svn path=/stable/8/; revision=208425
* MFC r208012Andrew Thompson2010-05-202-5/+23
| | | | | | | | | Support getting signed and unsigned HID data. Submitted by: Alex Deiter Notes: svn path=/stable/8/; revision=208321
* MFC r208084:Pyun YongHyeon2010-05-191-2/+7
| | | | | | | | | | | | | | | | | | | | | | If controller received bad frames make sure to update newly added RFA. Also drop frames that have either CRC error or alignment error. Normally bad frames are not received at all. But controllers running in promiscuous mode will receive bad frames. 82557 will also receive bad frames to receive VLAN oversized frames. While I'm here mark RNR condition if driver happen to see RNR in RFA status and restart RU to receive frames again. Because driver checks all received frames in RX loop, RNR condition could be set in the middle of RX processing. Just relying on RNR interrupt was not enough. This change fixes "Memory modified after free" issue when fxp(4) is running as a member of if_bridge(4). Tested by: Larry Baird <lab <> gta dot com> Notes: svn path=/stable/8/; revision=208316
* MFC r208081,208083:Pyun YongHyeon2010-05-191-3/+3
| | | | | | | | | | | | | r208081: Controller updates RFA via DMA so driver needs synchronization. Add missing BUS_DMASYNC_POSTWRITE and BUS_DMASYNC_PREREAD. r208083: Dont' allow dma map load deferring. fxp(4) is not able to handle EINPROGRESS. Notes: svn path=/stable/8/; revision=208314
* MFC 207335:John Baldwin2010-05-191-1/+1
| | | | | | | | | Initialize the callout structure earlier in attach before calling any routines that can fail since ciss_free() always tries to stop and drain the callout. Notes: svn path=/stable/8/; revision=208308
* MFC r207536, r207696, r208183:Alexander Motin2010-05-195-0/+3801
| | | | | | | | | | Import mvs(4) - Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA controllers driver for CAM ATA subsystem. This driver supports same hardware as atamarvell, ataadaptec and atamvsata drivers from ata(4), but provides many additional features, such as NCQ, PMP, etc. Notes: svn path=/stable/8/; revision=208299
* MFC r207926:Bernhard Schmidt2010-05-181-3/+3
| | | | | | | | | | Enable 5.5 and 11Mbit TX rates. Reviewed by: sam Approved by: rpaulo (mentor) Notes: svn path=/stable/8/; revision=208272
* MFC: r208117Marius Strobl2010-05-181-3/+3
| | | | | | | | | | Fix a mismerge in r206001 (MFC'ed to stable/8 in r206211). PR: 146614 Approved by: jfv (implicit) Notes: svn path=/stable/8/; revision=208268
* MFC r208019Andrew Thompson2010-05-173-445/+789
| | | | | | | Sync run(4) driver from author's site. Notes: svn path=/stable/8/; revision=208231
* MFC r208018Andrew Thompson2010-05-171-24/+163
| | | | | | | | | | Reduce diffs to p4. Add test code for delaying or failing usb control requests, disabled by default under ifdef USB_REQ_DEBUG. Notes: svn path=/stable/8/; revision=208230