summaryrefslogtreecommitdiffstats
path: root/sys/dev/hptrr
Commit message (Collapse)AuthorAgeFilesLines
* Fix multiple small kernel memory disclosures. [EN-18:04.mem]gordon2018-04-041-2/+2
| | | | | | | Reported by: Ilja van Sprundel Approved by: so Security: CVE-2018-6919 Security: FreeBSD-EN-18:04.mem
* MFC r311305 (by asomers):mav2017-03-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name) The sim_vid, hba_vid, and dev_name fields of struct ccb_pathinq are fixed-length strings. AFAICT the only place they're read is in sbin/camcontrol/camcontrol.c, which assumes they'll be null-terminated. However, the kernel doesn't null-terminate them. A bunch of copy-pasted code uses strncpy to write them, and doesn't guarantee null-termination. For at least 4 drivers (mpr, mps, ciss, and hyperv), the hba_vid field actually overflows. You can see the result by doing "camcontrol negotiate da0 -v". This change null-terminates those fields everywhere they're set in the kernel. It also shortens a few strings to ensure they'll fit within the 16-character field. PR: 215474 Reported by: Coverity CID: 1009997 1010000 1010001 1010002 1010003 1010004 1010005 CID: 1331519 1010006 1215097 1010007 1288967 1010008 1306000 CID: 1211924 1010009 1010010 1010011 1010012 1010013 1010014 CID: 1147190 1010017 1010016 1010018 1216435 1010020 1010021 CID: 1010022 1009666 1018185 1010023 1010025 1010026 1010027 CID: 1010028 1010029 1010030 1010031 1010033 1018186 1018187 CID: 1010035 1010036 1010042 1010041 1010040 1010039
* MFC r313554:pfg2017-02-242-5/+1
| | | | | | | | | | | | Clean redundant MIN/MAX declarations in some HighPoint drivers. The hpt27xx(4), hptnr(4), and hptrr(4) drivers declare MIN() and MAX() internally which match the macros from sys/param.h. MIN() is not used, MAX is only used once and can be replaced with the max() version in libkern.h which operates on u_ints. MFC after: 2 weeks
* sys/dev: minor spelling fixes.pfg2016-05-031-4/+4
| | | | Most affect comments, very few have user-visible effects.
* Replace several bus_alloc_resource() calls with bus_alloc_resource_any()jhibbits2016-02-271-2/+2
| | | | | | | | Most of these are BARs, and we allocate them in their entirety. The one outlier in this is amdsbwd, which calls bus_set_resource() prior. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D5370 (partial)
* Replace several bus_alloc_resource() calls using default arguments with ↵jhibbits2016-02-191-2/+2
| | | | | | | | | bus_alloc_resource_any() Since these calls only use default arguments, bus_alloc_resource_any() is the right call. Differential Revision: https://reviews.freebsd.org/D5306
* Prevent overflow issues in timeout processingsmh2014-11-211-2/+2
| | | | | | | | | | | | | | | | | | | | | Previously, any timeout value for which (timeout * hz) will overflow the signed integer, will give weird results, since callout(9) routines will convert negative values of ticks to '1'. For unsigned integer overflow we will get sufficiently smaller timeout values than expected. Switch from callout_reset, which requires conversion to int based ticks to callout_reset_sbt to avoid this. Also correct isci to correctly resolve ccb timeout. This was based on the original work done by Eygene Ryabinkin <rea@freebsd.org> back in 5 Aug 2011 which used a macro to help avoid the overlow. Differential Revision: https://reviews.freebsd.org/D1157 Reviewed by: mav, davide MFC after: 1 month Sponsored by: Multiplay
* Various fixes to hptrr(4):jhb2014-08-053-176/+59
| | | | | | | | | | - Use the existing vbus locks instead of Giant for the CAM sim lock. - Use callout(9) instead of timeout(9). - Mark the interrupt handler MPSAFE. - Don't attempt to pass data in the softc from probe() to attach(). - Remove compat shims for FreeBSD versions older than 8.0. Reviewed by: Steve Chang <ychang@highpoint-tech.com>
* Apply vendor fixes to the High Point drivers:delphij2014-06-112-17/+12
| | | | | | | | | | | | | | | - Don't call xpt_free_path() in os_query_remove_device() and always return TRUE. - Update os_buildsgl() to support build logical SG table which will be used by lower RAID module. - Return CAM_SEL_TIMEOUTstatus for SCSIcommand failed as target missing. Many thanks to HighPoint for providing this driver update. Submitted by: Steve Chang Reviewed by: mav MFC after: 3 days
* Re-do r255853. Along with adding back the API/ABI changes from thescottl2013-09-252-2/+4
| | | | | | | | original, this hides the contents of cam_compat.h from ktrace/kdump/truss, avoiding problems there. There are no user-servicable parts in there, so no need for those tools to be groping around in there. Approved by: re
* Revert r255853 pending fixes to build errors in usr.bin/kdumpgjb2013-09-252-4/+2
| | | | Approved by: re (implicit)
* Update the CAM API for FreeBSD 10:scottl2013-09-242-2/+4
| | | | | | | | | | | | | | | | | | | | | | - Remove the timeout_ch field. It's been deprecated since FreeBSD 7.0; MPSAFE drivers should be managing their own timeout storage. The remaining non-MPSAFE drivers have been modified to also manage their own storage, and should be considered for updating to MPSAFE (or removal) during the FreeBSD 10.x lifecycle. - Add fields related to soft timeouts and quality of service, to be used in upcoming work. - Add room for more flags in the CCB header and path_inq structures. - Begin support for extended 64-bit LUNs. - Bump the CAM version number to 0x18, but add compat shims. Tested with camcontrol and smartctl. Reviewed by: nathanw, ken, kib Approved by: re Obtained from: Netflix
* Silence warning from clang:sbruno2013-04-281-1/+2
| | | | | | | | | | /home/sbruno/bsd/head/sys/dev/hptrr/hptrr_osm_bsd.c:178:66: warning: for loop has empty body [-Wempty-body] for (order=0, size=PAGE_SIZE; size<f->size; order++, size<<=1) ; ^ /home/sbruno/bsd/head/sys/dev/hptrr/hptrr_osm_bsd.c:178:66: note: put the semicolon on a separate line to silence this warning Obtained from: Yahoo! Inc. MFC after: 2 weeks
* MFprojects/camlock r248982:mav2013-04-141-1/+1
| | | | | | | | Stop abusing xpt_periph in random plases that really have no periph related to CCB, for example, bus scanning. NULL value is fine in such cases and it is correctly logged in debug messages as "noperiph". If at some point we need some real XPT periphs (alike to pmpX now), quite likely they will be per-bus, and not a single global instance as xpt_periph now.
* Reform the busdma API so that new types may be added without modifyingkib2013-02-121-74/+32
| | | | | | | | | | | | | | | | | | | | | every architecture's busdma_machdep.c. It is done by unifying the bus_dmamap_load_buffer() routines so that they may be called from MI code. The MD busdma is then given a chance to do any final processing in the complete() callback. The cam changes unify the bus_dmamap_load* handling in cam drivers. The arm and mips implementations are updated to track virtual addresses for sync(). Previously this was done in a type specific way. Now it is done in a generic way by recording the list of virtuals in the map. Submitted by: jeff (sponsored by EMC/Isilon) Reviewed by: kan (previous version), scottl, mjacob (isp(4), no objections for target mode changes) Discussed with: ian (arm changes) Tested by: marius (sparc64), mips (jmallet), isci(4) on x86 (jharris), amd64 (Fabian Keil <freebsd-listen@fabiankeil.de>)
* attach_generic causes missing devices in /dev when the drivereadler2012-06-171-1/+1
| | | | | | | | | | | | interacts with some non-highpoint controollers. Change attach_generic to be off by default. PR: kern/168910 Submitted by: Richard Yao <ryao@gentoo.org> Approved by: cperciva No objections by: -hackers Obtained from: Gentoo FreeBSD MFC after: 2 weeks
* - Just use cam_calc_geometry(9) on newer version of FreeBSD rather thanmarius2011-11-231-3/+9
| | | | | duplicating it. - In hptmv(4) and hptrr(4) use __FBSDID and DEVMETHOD_END.
* Pass a format string to make_dev().rpaulo2010-10-131-1/+1
|
* MFp4: Large set of CAM inprovements.mav2010-01-282-25/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Unify bus reset/probe sequence. Whenever bus attached at boot or later, CAM will automatically reset and scan it. It allows to remove duplicate code from many drivers. - Any bus, attached before CAM completed it's boot-time initialization, will equally join to the process, delaying boot if needed. - New kern.cam.boot_delay loader tunable should help controllers that are still unable to register their buses in time (such as slow USB/ PCCard/ CardBus devices), by adding one more event to wait on boot. - To allow synchronization between different CAM levels, concept of requests priorities was extended. Priorities now split between several "run levels". Device can be freezed at specified level, allowing higher priority requests to pass. For example, no payload requests allowed, until PMP driver enable port. ATA XPT negotiate transfer parameters, periph driver configure caching and so on. - Frozen requests are no more counted by request allocation scheduler. It fixes deadlocks, when frozen low priority payload requests occupying slots, required by higher levels to manage theit execution. - Two last changes were holding proper ATA reinitialization and error recovery implementation. Now it is done: SATA controllers and Port Multipliers now implement automatic hot-plug and should correctly recover from timeouts and bus resets. - Improve SCSI error recovery for devices on buses without automatic sense reporting, such as ATAPI or USB. For example, it allows CAM to wait, while CD drive loads disk, instead of immediately return error status. - Decapitalize diagnostic messages and make them more readable and sensible. - Teach PMP driver to limit maximum speed on fan-out ports. - Make boot wait for PMP scan completes, and make rescan more reliable. - Fix pass driver, to return CCB to user level in case of error. - Increase number of retries in cd driver, as device may return several UAs.
* Introduce hw.hptrr.attach_generic loader tunable to deny hptrr drivermav2009-11-081-0/+6
| | | | | | | | attach chips with generic Marvell (non-HighPoint) PCI identification. These chips are also supported by ata(4). Some vendors, like Supermicro, are using same chips without providing HPT RAID BIOS. PR: kern/120842, kern/136750
* Fix a boot hang for hptrr(4) caused by changes introduced in r195534.kensmith2009-08-211-0/+4
| | | | | | | | | | It is necessary to make sure cpi->transport is set for xpt_scan_bus() to work properly. Submitted by: Bernhard Schmidt (scb+freebsd-current <at> techwires <dot> net) Reviewed by: scottl Approved by: re (kib)
* Remove build timestamps from the following files:cperciva2009-07-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | /boot/kernel/hptrr.ko /etc/mail/*.cf /lib/libcrypto.so.5 /usr/bin/ntpq /usr/sbin/amd /usr/sbin/iasl /usr/sbin/ntpd /usr/sbin/ntpdate /usr/sbin/ntpdc There does not appear to be any purpose to having these timestamps, and they have the irritating consequence that the aforementioned files will be different every time they are rebuilt. After this commit, the only remaining build timestamps are in the kernel, the boot loaders, /usr/include/osreldate.h (the year in the copyright notice), and lib*.a (the timestamps on all of the included .o files). Reviewed by: scottl (hptrr), gshapiro (sendmail), simon (openssl), roberto (ntp), jkim (acpica) Approved by: re (kib)
* Fix a mistake made during the import of the driver. Previous versions ofscottl2008-03-084-7/+7
| | | | | | | HPT drivers would sometimes test the value of a preprocessor definition but not always make sure that the definition existed in the first place, leading to warnings on newer compilers. I blindly assumed the same with this driver, and it turned out to be wrong and to enable some code that doesn't work.
* Fix a symbol conflict between hptrr and hptmvscottl2008-02-062-3/+3
|
* Update the hptrr driver to version 1.2. This adds port multiplier supportscottl2008-02-0611-21365/+22313
| | | | | for several cards. See the Highpoint website for more information. Again, many thanks to Highpoint for their continued support of FreeBSD.
* Hide common prints under bootverbose.sobomax2008-01-151-2/+4
| | | | | Obtained from: src/sys/dev/rr232x/osm_bsd.c, rev.1.2-1.3 MFC after: 2 weeks
* Add the 'hptrr' driver for supporting the following Highpoint RocketRAIDscottl2007-12-1514-0/+27218
cards: o RocketRAID 172x series o RocketRAID 174x series o RocketRAID 2210 o RocketRAID 222x series o RocketRAID 2240 o RocketRAID 230x series o RocketRAID 231x series o RocketRAID 232x series o RocketRAID 2340 o RocketRAID 2522 Many thanks to Highpoint for their continued support of FreeBSD. Submitted by: Highpoint
OpenPOWER on IntegriCloud