summaryrefslogtreecommitdiffstats
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
* Reduce USB memory usage during enumeration.hselasky2011-09-141-3/+4
| | | | | | | | | | We are allocating some kilobytes of extra memory during USB device enumeration. This does not change alot under FreeBSD, but makes sense for various embedded operating systems using the FreeBSD USB stack, which have less memory resources available. Approved by: re (kib) MFC after: 1 week
* Improve the sleep_delay sysctl description by specifying which unitbrueffer2011-09-131-1/+1
| | | | | | | | | the number is in. PR: 159975 Submitted by: gcooper Approved by: re (kib) MFC after: 1 week
* - Fix compiler warning in ADD_64() macro.davidch2011-09-131-1/+1
| | | | | | Approved by: re Obtained from: dimitry@andic.com MFC after: One week
* Partially revert 222753: If a CardBus card stores its CIS in a BAR, deletejhb2011-09-121-0/+1
| | | | | | | | | the BAR after parsing the CIS. This forces the resource range to be reallocated if the BAR is reused by the device. Submitted by: deischen Reviewed by: imp Approved by: re (kib)
* dsp_ioctl: fix type of variable used to store ioctl requestavg2011-09-121-1/+2
| | | | | | | | PR: kern/156433 Submitted by: Grigori Goronzy <greg@chown.ath.cx> Reviewed by: hselasky Approved by: re (kib) MFC after: 1 week
* Fix the order of parameters passed to the HT frame duration calculation.adrian2011-09-111-4/+5
| | | | Approved by: re (kib)
* Refactor auto-quirk solution so that we break as few externalhselasky2011-09-105-21/+19
| | | | | | | | | drivers as possible. PR: usb/160299 Approved by: re (kib) Suggested by: rwatson MFC after: 0 days
* Update the TSF and next-TBTT methods to work for the AR5416 and later NICs.adrian2011-09-0819-55/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is another commit in a series of TDMA support fixes for the 11n NICs. * Move ath_hal_getnexttbtt() into the HAL; write methods for it. This returns a timer value in TSF, rather than TU. * Move ath_hal_getcca() and ath_hal_setcca() into the HAL too, where they likely now belong. * Create a new HAL capability: HAL_CAP_LONG_RXDESC_TSF. The pre-11n NICs write 15 bit TSF snapshots into the RX descriptor; the AR5416 and later write 32 bit TSF snapshots into the RX descriptor. * Use the new capability to choose between 15 and 31 bit TSF adjustment functions in ath_extend_tsf(). * Write ar5416GetTsf64() and ar5416SetTsf64() methods. ar5416GetTsf64() tries to compensate for TSF changes at the 32 bit boundary. According to yin, this fixes the TDMA beaconing on 11n chipsets and TDMA stations can now associate/talk, but there are still issues with traffic stability which need to be investigated. The ath_hal_extendtsf() function is also used in RX packet timestamping; this may improve adhoc mode on the 11n chipsets. It also will affect the timestamps seen in radiotap frames. Submitted by: Kang Yin Su <cantona@cantona.net> Approved by: re (kib)
* vge(4) hardwares poll media status and generates an interruptyongari2011-09-072-7/+13
| | | | | | | | | | | | | | | | | | | whenever the link state is changed. Using software based polling for media status tracking is known to cause MII access failure under certain conditions once link is established so vge(4) used to rely on link status change interrupt. However DEVICE_POLLING completely disables generation of all kind of interrupts on vge(4) such that this resulted in not detecting link state change event. This means vge(4) does not correctly detect established/lost link with DEVICE_POLLING. Losing the interrupt made vge(4) not to send any packets to peer since vge(4) does not try to send any packets when there is no established link. Work around the issue by generating link state change interrupt with DEVICE_POLLING. PR: kern/160442 Approved by: re (kib)
* Add a definition for ASYNC_CAUSE_CLR. It's not used yet, but theadrian2011-09-071-0/+1
| | | | | | | | reference driver does clear the async interrupts after each service. I'll tinker with this in a future commit. Obtained from: Atheros Approved by: re (kib)
* Shorten a variable access some using a cached value rather thanbz2011-09-071-2/+1
| | | | | | | | casting the input argument again, making the code more readable. Reviewed by: jhb MFC after: 2 weeks Approved by: re (kib)
* Fix 5ghz calibration logic when using AR9280 w/ fast clock.adrian2011-09-061-8/+9
| | | | | | | | | | | | | | | | | | When the fast clock (44mhz) is enabled for 5ghz HT20, the dual ADCs aren't enabled. Trying to do the ADC calibrations here would result in calibration never completing; this resulted in IQ calibration never running and thus performance issues in 11a/11n HT20 mode. Leave it enabled for non-fastclock (40mhz) 11a mode and HT40 modes. This has been fixed in discussion with Felix Fietkau (nbd) and discussions with the Atheros baseband team. Linux ath9k now has a similar fix. Approved by: re (kib)
* Fix the addac serial load register write for AR5416.adrian2011-09-061-1/+1
| | | | | Obtained from: Linux, Atheros Approved by: re (kib)
* Fix precedence warning when compiling kernel with clang.hselasky2011-09-061-2/+2
| | | | | | Approved by: re (kib) Submitted by: dim MFC after: 1 week
* The maximum read size of incoming packets is done in 1024-byte increments.qingli2011-09-051-3/+6
| | | | | | | | | | | | | | | The current code was rounding down the maximum frame size instead of routing up, resulting in a read size of 1024 bytes, in the non-jumbo frame case, and splitting the packets across multiple mbufs. Consequently the above problem exposed another issue, which is when packets were splitted across multiple mbufs, and all of the mbufs in the chain have the M_PKTHDR flag set. Submitted by: original patch by Ray Ruvinskiy at BlueCoat dot com Reviewed by: jfv, kmacy, rwatson Approved by: re (rwatson) MFC after: 5 days
* Some USB mass storage devices requires that the sense informationhselasky2011-09-051-2/+33
| | | | | | | | | | | is retrieved after a failed SCSI command to continue normal operation. Else this sense information is retrived at the next SCSI command. Approved by: re (kib) Reported by: Alex Kozlov MFC after: 1 week PR: usb/160299
* - Fix NULL pointer dereference when a packet of uneven size is beingstas2011-09-021-1/+4
| | | | | | | transmitted. Approved by: re (kib) MFC after: 3 days
* This patch adds automatic detection of USB mass storage deviceshselasky2011-09-0210-33/+148
| | | | | | | | | | | | which does not support the no synchronize cache SCSI command. The __FreeBSD_version version macro has been bumped and external kernel modules needs to be recompiled after this patch. Approved by: re (kib) MFC after: 1 week PR: usb/160299
* Add support for alternative break-to-debugger support on the Xen console.rwatson2011-09-021-1/+9
| | | | | | | | This should help debug boot-time hangs experienced in 9.0-BETA. MFC after: 3 weeks Tested by: sbruno Approved by: re (kib)
* Fix a bug in ichwd(4) which prevents it from beig enabled if the newdelphij2011-09-021-4/+3
| | | | | | | | | timeout is the same timeout. Submitted by: Dmitrij Tejblum <tejblum yandex-team.ru> PR: kern/139604 MFC after: 2 weeks Approved by: re (kib)
* Expose more variables from coretemp(4) via sysctl:delphij2011-09-021-60/+157
| | | | | | | | | | | - tjmax - Tj(max) value from the CPU - delta - current delta reading - resolution - sensor resolution in Celsius - throttle_log - whether a #PROCHOT was asserted since last reset Submitted by: Mark Johnston <markjdb gmail.com> (mostly) MFC after: 1 month Approved by: re (kib)
* Add support for alternative break-to-debugger to syscons(4). While mostrwatson2011-08-272-0/+7
| | | | | | | | | | keyboards allow console break sequences (such as ctrl-alt-esc) to be entered, alternative break can prove useful under virtualisation and remote console systems where entering control sequences can be difficult or unreliable. MFC after: 3 weeks Approved by: re (bz)
* Follow up to r225203 refining break-to-debugger run-time configurationrwatson2011-08-275-9/+0
| | | | | | | | | | | | improvements: (1) Implement new model in previously missed at91 UART driver (2) Move BREAK_TO_DEBUGGER and ALT_BREAK_TO_DEBUGGER from opt_comconsole.h to opt_kdb.h (spotted by np) (3) Garbage collect now-unused opt_comconsole.h MFC after: 3 weeks Approved by: re (bz)
* Attempt to make break-to-debugger and alternative break-to-debugger morerwatson2011-08-266-112/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | accessible: (1) Always compile in support for breaking into the debugger if options KDB is present in the kernel. (2) Disable both by default, but allow them to be enabled via tunables and sysctls debug.kdb.break_to_debugger and debug.kdb.alt_break_to_debugger. (3) options BREAK_TO_DEBUGGER and options ALT_BREAK_TO_DEBUGGER continue to behave as before -- only now instead of compiling in break-to-debugger support, they change the default values of the above sysctls to enable those features by default. Current kernel configurations should, therefore, continue to behave as expected. (4) Migrate alternative break-to-debugger state machine logic out of individual device drivers into centralised KDB code. This has a number of upsides, but also one downside: it's now tricky to release sio spin locks when entering the debugger, so we don't. However, similar logic does not exist in other device drivers, including uart. (5) dcons requires some special handling; unlike other console types, it allows overriding KDB's own debugger selection, so we need a new interface to KDB to allow that to work. GENERIC kernels in -CURRENT will now support break-to-debugger as long as appropriate boot/run-time options are set, which should improve the debuggability of BETA kernels significantly. MFC after: 3 weeks Reviewed by: kib, nwhitehorn Approved by: re (bz)
* Fix a missing initialisation of bt_flags when setting up the TDMA beacon.adrian2011-08-241-0/+2
| | | | | | | | | | | | | | The AR5212 HAL didn't check this field; timers are enabled a different way. The AR5416 HAL however did, and since this field was uninitialised, it had whatever was on the stack at the time. This lead to "unpredictable" behaviour. This allows TDMA to work on the AR5416 and later chipsets. Thanks to: paradyse@gmail.com Approved by: re (kib, blanket)
* Add ID for ASMedia ASM1061 2-port PCIe 2.0 x1 6Gb/s SATA controller.mav2011-08-241-0/+1
| | | | | Approved by: re (blackend) MFC after: 1 week
* TIM/Timer fixes for AR5416 and later:adrian2011-08-242-5/+17
| | | | | | | | | | * Fix SLEEP1/SLEEP2 register definitions; the CAB/Beacon timeout fields have changed in AR5416 and later * The TIM_PERIOD and DTIM_PERIOD registers are now microsecond fields, not TU. Obtained from: Linux ath9k, Atheros reference Approved by: re (kib, blanket)
* These timer registers are all 1uS in resolution in AR5416adrian2011-08-231-3/+4
| | | | | | | | | | | | | | | or later. Previous hardware had some as TU, some as 1/8th TU. * Modify AR_NEXT_DBA and AR_NEXT_SWBA to use a new macro, ONE_EIGHTH_TU_TO_USEC(), which converts the 1/8th TU fields to USEC. This is just cosmetic and matches the Atheros reference driver. * Fix AR_NEXT_TBTT, which is USEC, not TU. Submitted by: paradyse@gmail.com Approved by: re (kib, blanket)
* Disable PHY hibernation until I get more detailed hibernationyongari2011-08-221-6/+20
| | | | | | | | | | | | | | | | | | | programming secret. The PHY would go into sleep state when it detects no established link and it will re-establish link when the cable is plugged in. Previously it failed to re-establish link when the cable is plugged in such that it required to manually down and up the interface again to make it work. This came from incorrectly programmed hibernation parameters. According to Atheros, each PHY chip requires different configuration for hibernation and different vendor has different settings for the same chip. Disabling hibernation may consume more power but establishing link looks more important than saving power. Special thanks to Atheros for giving me instructions that disable hibernation. MFC after: 1 week Approved by: re (kib)
* Add new USB ID to u3g driver.hselasky2011-08-202-0/+4
| | | | | | Approved by: re (kib) MFC after: 1 week PR: usb/159919
* Fix for recursive locking in usb_close() after change 224777.hselasky2011-08-201-6/+18
| | | | | | Approved by: re (kib) MFC after: 3 days Reported by: kwm @
* Add new USB ID.hselasky2011-08-202-0/+3
| | | | | | Approved by: re (kib) MFC after: 1 week PR: usb/159836
* Revert r224157, re-enabling r222135. The underlying problem keeping themarius2011-08-191-2/+0
| | | | | | | latter from working as expected was fixed in r225014. MFC after: 3 days Approved by: re (kib)
* r221812 reveals that at least some Broadcom PHYs default to being not onlymarius2011-08-192-5/+17
| | | | | | | | | | | | | | | | | | | isolated but also powered down after a reset and while they just work fine [sic] when both is the case they don't if they are only deisolate but still powered down. So in order to put PHYs in an overall normal operation mode for the common case, ensure in mii_phy_reset() that they are not powered down after a reset. Unfortunately, this only helps in case of BCM5421, while BCM5709S apparently only work when they remain isolated and powered down after a reset. So don't call mii_phy_reset() in brgphy_reset() and implement the reset locally leaving the problematic bits alone. Effectively this bypasses r221812 for brgphy(4). Thanks to Justin Hibbits for doing a binary search in order to identify the problematic commit. PR: 157405, 158156 Reviewed by: yongari (mii_phy_reset() part) Approved by: re (kib) MFC after: 3 days
* Bump the maximum coretemp limit (for CPU temperature) to 110. Severalattilio2011-08-191-2/+2
| | | | | | | | | cores with temp in the range 101-105 have been found in the past. Sponsored by: Sandvine Incorporated Reviewed by: delphij, emaste Approved by: re (kib) MFC after: 3 days
* Add sysctl to not reset the device on clear stall failures, tohselasky2011-08-191-1/+13
| | | | | | | temporarily mitigate problems with VMs. Approved by: re (kib) MFC after: 1 week
* Set the max_lun field in the path inquiry CCB for the mps(4) driver to 8.ken2011-08-181-1/+1
| | | | | | | This allows LUNs greater than 0 to be probed. The value can be increased later if need be. Approved by: re (kib)
* Fix headphones pin configuration on Lenovo B450 laptop.mav2011-08-181-0/+8
| | | | | Submitted by: "Sergey V. Dyatko" <sergey.dyatko@gmail.com> Approved by: re (kib)
* Always check current HPET counter value after comparator programming tomav2011-08-162-8/+8
| | | | | | | | | | | avoid lost timer interrupts. Previous optimization attempt doing it only for intervals less then 5000 ticks (~300us) reported to be unreliable by some people. Probably because of some heavy SMI code on their boards. Introduce additional safety interval of 128 counter ticks (~9us) between programmed comparator and counter values to cover different cases of delayed write found on some chipsets. Approved by: re (kib)
* Add the fo_chown and fo_chmod methods to struct fileops and use themkib2011-08-161-1/+3
| | | | | | | | | | to implement fchown(2) and fchmod(2) support for several file types that previously lacked it. Add MAC entries for chown/chmod done on posix shared memory and (old) in-kernel posix semaphores. Based on the submission by: glebius Reviewed by: rwatson Approved by: re (bz)
* Update arcmsr(4) to 1.20.00.22 to solve recursive acquisition of bufferdelphij2011-08-161-5/+14
| | | | | | | | | | | mutex, which would lead to a deadlock. Many thanks to Areca for their continued support of FreeBSD. Submitted by: Ching Huang <ching2048 areca com tw> Tested by: Willem Jan Withagen <wjw digiware nl> MFC after: 3 days Approved by: re (kib)
* Add device id for the Moxa CP-112UL dual-port serial adapters.jhb2011-08-151-0/+6
| | | | | | Submitted by: Jan Mikkelsen janm of transactionware com Approved by: re (kib) MFC after: 1 week
* Fix integer overflow on 32bit systems when calculating media size,mav2011-08-141-1/+1
| | | | | | reintroduced by r222475. Approved by: re (kib)
* Most of these changes to isp are to allow for isp.ko unloading.mjacob2011-08-135-59/+186
| | | | | | | | | | | We also revive loop down freezes. We also externaliz within isp isp_prt_endcmd so something outside the core module can print something about a command completing. Also some work in progress to assist in handling timed out commands better. Partially Sponsored by: Panasas Approved by: re (kib) MFC after: 1 month
* Fixes zombie device and loop down timers so that they work more thanmjacob2011-08-122-6/+39
| | | | | | | | | | | | once. Use taskqueues to do the actual work. Fix an offset line. Fix isp_prt so that prints from just one buffer, which makes it appear cleanly cleanly in logs on SMP systems. Approved by: re (kib) MFC after: 1 month
* Second-to-last commit implementing Capsicum capabilities in the FreeBSDrwatson2011-08-118-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | kernel for FreeBSD 9.0: Add a new capability mask argument to fget(9) and friends, allowing system call code to declare what capabilities are required when an integer file descriptor is converted into an in-kernel struct file *. With options CAPABILITIES compiled into the kernel, this enforces capability protection; without, this change is effectively a no-op. Some cases require special handling, such as mmap(2), which must preserve information about the maximum rights at the time of mapping in the memory map so that they can later be enforced in mprotect(2) -- this is done by narrowing the rights in the existing max_protection field used for similar purposes with file permissions. In namei(9), we assert that the code is not reached from within capability mode, as we're not yet ready to enforce namespace capabilities there. This will follow in a later commit. Update two capability names: CAP_EVENT and CAP_KEVENT become CAP_POST_KEVENT and CAP_POLL_KEVENT to more accurately indicate what they represent. Approved by: re (bz) Submitted by: jonathan Sponsored by: Google Inc
* Use synchronous device destruction instead of asynchronous, so that a newhselasky2011-08-114-62/+63
| | | | | | | | | device having the same name like a previous one is not created before the old one is gone. This fixes some panics due to asserts in the devfs code which were added recently. Approved by: re (kib) MFC after: 1 week
* o Improve 224494:marius2011-08-102-3/+34
| | | | | | | | | | | - Ignore some more internal SAS device status change events. - Correct inverted Bus and TargetID arguments in a warning. o Add a warning for MPI_EVENT_SAS_DISCOVERY_ERROR events, which can help identifying broken disks. Submitted by: Andrew Boyer Approved by: re (kib) Committed from: Chaos Communication Camp 2011
* Revert r224736 as the introduced value was already present.attilio2011-08-091-2/+0
| | | | | Reported by: tinderbox, pluknet Approved by: re (kib)
* Add the PCI ID for the PCH DH89xxCC on ichsmb as got from Linux counterpart.attilio2011-08-091-0/+2
| | | | | | | Sponsored by: Sandvine Incorporated Reviewed by: emaste, rstone Approved by: re (bz) MFC after: 3 days
OpenPOWER on IntegriCloud