summaryrefslogtreecommitdiffstats
path: root/sys/dev/aic7xxx
Commit message (Collapse)AuthorAgeFilesLines
* MFC r311305 (by asomers):mav2017-03-232-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 r314308: Fix LUN enabling on wildcard target, as done by CTL.mav2017-03-122-2/+4
|
* MFC r303891, r303892:pfg2016-09-081-1/+1
| | | | | | | | sys: replace comma with semicolon when pertinent. Uses of commas instead of a semicolons can easily go undetected. The comma can serve as a statement separator but this shouldn't be abused when statements are meant to be standalone.
* aic7xxx: minor spelling fixes.pfg2016-05-1014-63/+63
| | | | | | Affects mostly comments but also a visible text string, Differential Revision: https://reviews.freebsd.org/D6270
* Fix LDADD/DPADD that should be LIBADD.bdrewery2015-12-041-2/+1
| | | | Sponsored by: EMC / Isilon Storage Division
* aic7xxx: Do not support device IDs 0x8081, 0x8088 and 0x8089 to avoidachim2015-06-051-0/+14
| | | | conflicts with the new PMC Adaptec controller families supported by aacraid
* shared_scb_data set, but never used, remove it.imp2014-08-081-2/+0
|
* Fix a few more drivers that were explicitly destroying the bus_dmajhb2014-06-112-8/+0
| | | | map created by bus_dmamem_alloc().
* NO_MAN= has been deprecated in favor of MAN= for some time, go aheadimp2014-04-131-1/+1
| | | | | | and finish the job. ncurses is now the only Makefile in the tree that uses it since it wasn't a simple mechanical change, and will be addressed in a future commit.
* Remove instances of variables that were set, but never used. gcc 4.9imp2014-03-301-16/+9
| | | | warns about these by default.
* Don't complain about missing prototypes to ease bootstrap issues.imp2014-02-271-0/+1
|
* Remove aicasm as a build dependency. It made sense when the ahc and ahdscottl2014-01-076-0/+13478
| | | | | | | | | | | | drivers and their firmware were under active development, but those days have passed. The firmware now exists in pre-compiled form, no longer dependent on it's sources or on aicasm. If you wish to rebuild the firmware from source, the glue still exists under the 'make firmware' target in sys/modules/aic7xxx. This also fixes the problem introduced with r257777 et al with building kernels the old fashioned way in sys/$arch/compile/$CONFIG when the ahc/ahd drivers were included.
* Remove another unused static const variable num_chip_names, fromdim2013-12-241-1/+0
| | | | | | | aic7xxx.c this time. Noticed by: pluknet MFC after: 3 days
* Remove unused static const variable num_chip_names from aic79xx.c.dim2013-12-241-1/+0
| | | | | Reviewed by: gibbs MFC after: 3 days
* Rework the aicasm build machinery so that it gets built along with toolchainian2013-11-041-2/+6
| | | | | | | | | | components instead of with the kernel and/or modules. This ensures that it gets built with the host compiler, not the compiler in obj/... used to build the target components (which may be a cross-compiler outputting code for a different architecture and using header files with types and options set up for the wrong architecture). Reviewed by: imp
* Partial MFproject/camlock r256671:mav2013-10-212-4/+4
| | | | | Fix several target mode SIMs to not blindly clear ccb_h.flags field of ATIO CCBs. Not all CCB flags there belong to them.
* Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCIscottl2013-08-122-27/+4
| | | | | | | | | | | | | | | | | command register. The lazy BAR allocation code in FreeBSD sometimes disables this bit when it detects a range conflict, and will re-enable it on demand when a driver allocates the BAR. Thus, the bit is no longer a reliable indication of capability, and should not be checked. This results in the elimination of a lot of code from drivers, and also gives the opportunity to simplify a lot of drivers to use a helper API to set the busmaster enable bit. This changes fixes some recent reports of disk controllers and their associated drives/enclosures disappearing during boot. Submitted by: jhb Reviewed by: jfv, marius, achadd, achim MFC after: 1 day
* Match function definition to declaration and call-site.uqs2013-07-251-3/+3
| | | | | | | | | SVN r95378 refactored ahc_9005_subdevinfo_valid out into a separate function but swapped the vendor/subvendor and device/subdevice pairs of the parameters. Found by: Coverity Prevent, CID 744931 Reviewed by: gibbs
* Fxi a bunch of typos.eadler2013-05-101-1/+1
| | | | | PR: misc/174625 Submitted by: Jeremy Chadwick <jdc@koitsu.org>
* Correct misleading bootverbose output: ahc_isa_probe -> ahc_isa_identifyneel2013-04-171-1/+1
|
* Reform the busdma API so that new types may be added without modifyingkib2013-02-122-116/+29
| | | | | | | | | | | | | | | | | | | | | 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>)
* remove redundant yyparse declarationsbapt2012-12-051-1/+0
| | | | | PR: conf/174079 Submitted by: Garrett Cooper <yanegomi@gmail.com>
* Fix a bug in aicasm_gram.y, noted by a newer clang 3.2 snapshot: itdim2012-11-141-1/+1
| | | | | | | compared an enum scope_type against a yacc-generated define, so the condition would always be false. MFC after: 3 days
* In sys/dev/aic7xxx/aic79xx_osm.c, function ahd_attach(), initialize thedim2012-08-061-0/+1
| | | | | | | | 'path' variable to NULL, to avoid using it uninitialized in certain cases. Found by: clang MFC after: 1 week
* Remove variables which are initialized but never used thereaftereadler2012-08-051-3/+0
| | | | | | | | reported by gcc46 warning Reviewed by: scottl Approved by: cperciva MFC after: 1 week
* Fix an issue that caused the kernel to panic inside CTL when tryingken2012-06-264-18/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to attach to target capable HBAs that implement the old immediate notify (XPT_IMMED_NOTIFY) and notify acknowledge (XPT_NOTIFY_ACK) CCBs. The new API has been in place since SVN change 196008 in 2009. The solution is two-fold: fix CTL to handle the responses from the HBAs, and convert the HBA drivers in question to use the new API. These drivers have not been tested with CTL, so how well they will interoperate with CTL is unknown. scsi_target.c: Update the userland target example code to use the new immediate notify API. scsi_ctl.c: Detect when an immediate notify CCB is returned with CAM_REQ_INVALID or CAM_PROVIDE_FAIL status, and just free it. Fix a duplicate assignment. aic79xx.c, aic79xx_osm.c: Update the aic79xx driver to use the new API. Target mode is not enabled on for this driver, so the changes will have no practical effect. aic7xxx.c, aic7xxx_osm.c: Update the aic7xxx driver to use the new API. sbp_targ.c: Update the firewire target code to work with the new API. mpt_cam.c: Update the mpt(4) driver to work with the new API. Target mode is only enabled for Fibre Channel mpt(4) devices. MFC after: 3 days
* Fix build of aicasm when CC=clang. This was due to a side-effect of thedim2012-06-041-2/+1
| | | | | | | | | | EARLY_BUILD macro: the -Qunused-arguments flag isn't passed anymore when building this particular program. However, with clang 3.1 and -Werror, such unused argument warnings are flagged as errors, causing buildkernel to fail at this stage, due to the -nostdinc flag passed during linking. Since the -nostdinc flag isn't actually needed, just remove it. X-MFC-With: r236528
* Make aicasm compile without warnings if -Wpointer-sign is enabled.dim2012-06-041-1/+1
| | | | MFC after: 3 days
* Follow non-BSD case when GNU/Hurd is detected.rmh2012-03-251-1/+1
|
* Remove comments about creating DMA tags as children of the DMA tags of theirjmallett2012-03-124-4/+0
| | | | | | parent bus where the code has now been modified to do so. Reviewed by: scottl
* Add "%option noinput" to aicasm_scan.l and aicasm_macro_scan.l, so nodim2011-12-162-0/+4
| | | | | | | unneeded input functions will be emitted. Spotted by: arundel MFC after: 1 week
* Improve portability #defines for compiling aicasm on other systems.emaste2011-07-158-31/+5
| | | | | Submitted by: Robert Millan rmh debian.org Obtained from: Debian GNU/kFreeBSD
* Remove support for the Intel C Compiler from the build infrastructure.dim2011-04-191-5/+0
| | | | | | This support has not worked for several years, and is not likely to work again, unless Intel decides to release a native FreeBSD version of their compiler. ;)
* Do a sweep of the tree replacing calls to pci_find_extcap() with calls tojhb2011-03-231-1/+1
| | | | pci_find_cap() instead.
* Allocate the DMA memory shared between the host and the controller asmarius2011-03-122-6/+11
| | | | | | | coherent. Approved by: gibbs MFC after: 2 weeks
* Fix typos - remove duplicate "the".brucec2011-02-212-2/+2
| | | | | | PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days
* Revert r213765. This is required because our build infrastructure usesrpaulo2010-10-142-2/+0
| | | | | the host lex instead of the lex built during buildworld. I will MFC the lex changes soon and in a few weeks this I'll commit again r213765.
* Define YY_NO_INPUT. This makes aicasm buildable by clang with Werrorrpaulo2010-10-132-0/+2
| | | | turned on.
* For every instance of '.if ${CC} == "foo"' or '.if ${CC} != "foo"' inrpaulo2010-08-171-1/+1
| | | | | | | | | | | | | Makefiles or *.mk files, use ${CC:T:Mfoo} instead, so only the basename of the compiler command (excluding any arguments) is considered. This allows you to use, for example, CC="/nondefault/path/clang -xxx", and still have the various tests in bsd.*.mk identify your compiler as clang correctly. ICC if cases were also changed. Submitted by: Dimitry Andric <dimitry at andric.com>
* Correct logic bug in aicasm's undefined register bit access detection code.gibbs2010-07-143-5/+12
| | | | | | | | | | | | | | | | The code in question verifies that all register write operations only change bits that are defined (in the register definition file) for that effected register. The bug effectively disabled this checking. o Fix the check by testing the opcode against all supported read ("and" based) operands. o Add missing bit definitions to the aic7xxx and aic79xx register definition files so that the warning (treated as a fatal error) does not spuriously fire. Reported by: Pawel Worach <pawel.worach@gmail.com> MFC after: 1 week
* Document the usfs driver and the NO_SYSCTL_DESCR option, and update the ↵brucec2010-02-081-0/+4
| | | | | | | | comment for umass. Don't include the sysctl description variables in aic7xxx when NO_SYSCTL_DESCR is used. Approved by: rrs (mentor)
* Spell "Hz" correctly wherever it is user-visible.gavin2010-01-121-4/+4
| | | | | | | PR: bin/142566 Submitted by: N.J. Mann njm njm.me.uk Approved by: ed (mentor) MFC after: 2 weeks
* Disable K&R style function definitions for WARNS=6.ed2009-12-311-1/+1
| | | | | | | | | | | | | | Unfortunately there are two slight problems with that: - Yacc and lex might generate code that generates warnings because of this. Require yacc and lex to be rebuilt during bootstrap. I'm not incrementing __FreeBSD_version here, because I assume someone else will do this eventually. - When running `make buildkernel', it uses share/mk from the source treeo to build aicasm. Because aicasm also depends on lex, this would break. Lower WARNS to 5 for now. We should just increment it to 6 again somewhere in the very far future.
* Add missing `void' keywords.ed2009-12-304-10/+10
|
* Add sysctls in ahd(4) in order to keep track of different classes ofattilio2009-11-135-2/+197
| | | | | | | | | | errors. So far 3 different classes are present (correctable, uncorrectable and fatal) but more can be added easilly. Obtained from: Sandvine Incorporated Reviewed by: emase, gibbs Sponsored by: Sandvine Incorporated MFC: 2 weeks
* Add support for Adaptec 39320LPE adapters.brueffer2009-10-301-0/+7
| | | | | | | PR: 124202 Submitted by: Andre Albsmeier <Andre.Albsmeier@siemens.com> Reviewed by: gibbs MFC after: 1 week
* Add a missing free() call.brueffer2009-10-211-0/+2
| | | | | | | PR: 138379 Submitted by: Patroklos Argyroudis <argp@census-labs.com> Reviewed by: gibbs MFC after: 1 week
* Separate the parallel scsi knowledge out of the core of the XPT, andscottl2009-07-102-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modularize it so that new transports can be created. Add a transport for SATA Add a periph+protocol layer for ATA Add a driver for AHCI-compliant hardware. Add a maxio field to CAM so that drivers can advertise their max I/O capability. Modify various drivers so that they are insulated from the value of MAXPHYS. The new ATA/SATA code supports AHCI-compliant hardware, and will override the classic ATA driver if it is loaded as a module at boot time or compiled into the kernel. The stack now support NCQ (tagged queueing) for increased performance on modern SATA drives. It also supports port multipliers. ATA drives are accessed via 'ada' device nodes. ATAPI drives are accessed via 'cd' device nodes. They can all be enumerated and manipulated via camcontrol, just like SCSI drives. SCSI commands are not translated to their ATA equivalents; ATA native commands are used throughout the entire stack, including camcontrol. See the camcontrol manpage for further details. Testing this code may require that you update your fstab, and possibly modify your BIOS to enable AHCI functionality, if available. This code is very experimental at the moment. The userland ABI/API has changed, so applications will need to be recompiled. It may change further in the near future. The 'ada' device name may also change as more infrastructure is completed in this project. The goal is to eventually put all CAM busses and devices until newbus, allowing for interesting topology and management options. Few functional changes will be seen with existing SCSI/SAS/FC drivers, though the userland ABI has still changed. In the future, transports specific modules for SAS and FC may appear in order to better support the topologies and capabilities of these technologies. The modularization of CAM and the addition of the ATA/SATA modules is meant to break CAM out of the mold of being specific to SCSI, letting it grow to be a framework for arbitrary transports and protocols. It also allows drivers to be written to support discrete hardware without jeopardizing the stability of non-related hardware. While only an AHCI driver is provided now, a Silicon Image driver is also in the works. Drivers for ICH1-4, ICH5-6, PIIX, classic IDE, and any other hardware is possible and encouraged. Help with new transports is also encouraged. Submitted by: scottl, mav Approved by: re
* Re-enable WARNS=6 after my universe test.delphij2009-06-021-0/+1
|
* Initialize the match structure. This is unnecessary but gcc insists todelphij2009-06-011-2/+1
| | | | complain about it when we raise the WARNS level.
OpenPOWER on IntegriCloud