aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/advansys
Commit message (Collapse)AuthorAgeFilesLines
* MFC r259825:Dimitry Andric2013-12-281-7/+0
| | | | | | | | | Remove unused static function adwccbstatus() from adw(4). Reviewed by: gibbs Notes: svn path=/stable/9/; revision=259977
* Merge r254263:Scott Long2013-08-131-9/+6
| | | | | | | | | | | | | | | | | | | | | | Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCI 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. Candidate for 9.2 Submitted by: jhb Reviewed by: jfv, marius, adrian, achim Notes: svn path=/stable/9/; revision=254306
* Big MFC of the physbio changes necessary for unmapped I/O. These changesScott Long2013-06-182-112/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | have been in production at Netflix for several months with significant success. MFC r246713: Reform the busdma API so that new types may be added without modifying 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. MFC r249538: Some compilers issue a warning when wider integer is casted to narrow pointer. Supposedly shut down the warning by casting through uintptr_t. MFC r251479: Simplify the checking of flags for cam_periph_mapmem(). This gets rid of a lot of code redundancy and grossness at very minor expense. MFC r251837: MFC r251842: Add infrastructure for doing compatibility shims, as has been sorely needed for the last 10 years. Far too much of the internal API is exposed, and every small adjustment causes applications to stop working. To kick this off, bump the API version to 0x17 as should have been done with r246713, but add shims to compensate. Thanks to the shims, there should be no visible change in application behavior. Submitted by: kib, jeffr Approved by: kib Obtained from: Netflix Notes: svn path=/stable/9/; revision=251874
* MFC 241492, 241588, 241589, 241590, 241592, 241593, 241603, 241605Scott Long2013-05-3012-317/+326
| | | | | | | | | | Modernize and lock the aha, ahb, adv, adw, bt, and dpt drivers. Submitted by: jhb Obtained from: Netflix Notes: svn path=/stable/9/; revision=251164
* MFC 232854,232874,232882,232883,232886 for bus_get_dma_tag()Scott Long2012-03-164-10/+5
| | | | Notes: svn path=/stable/9/; revision=233024
* Fix typos - remove duplicate "the".Rebecca Cran2011-02-211-1/+1
| | | | | | | | | PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days Notes: svn path=/head/; revision=218909
* Separate the parallel scsi knowledge out of the core of the XPT, andScott Long2009-07-102-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=195534
* Prepare for future integration between CAM and newbus. xpt_bus_registerScott Long2007-06-173-3/+3
| | | | | | | | | | now takes a device_t to be the parent of the bus that is being created. Most SIMs have been updated with a reasonable argument, but a few exceptions just pass NULL for now. This argument isn't used yet and the newbus integration likely won't be ready until after 7.0-RELEASE. Notes: svn path=/head/; revision=170872
* Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM willScott Long2007-04-152-2/+2
| | | | | | | | | | | | | | use to synchornize and protect all data objects that are used for that SIM. Drivers that are not yet MPSAFE register Giant and operate as usual. RIght now, no drivers are MPSAFE, though a few will be changed in the coming week as this work settles down. The driver API has changed, so all CAM drivers will need to be recompiled. The userland API has not changed, so tools like camcontrol do not need to be recompiled. Notes: svn path=/head/; revision=168752
* o break newbus api: add a new argument of type driver_filter_t toPaolo Pisati2007-02-234-5/+7
| | | | | | | | | | | | | | | | bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@ Notes: svn path=/head/; revision=166901
* Add MODULE_DEPENDS for cam, pci, mca, eisa and isa where needed.Matt Jacob2006-12-116-0/+9
| | | | | | | | PR: 106543 MFC after: 3 days Notes: svn path=/head/; revision=165102
* 2nd and final commit that moves us to CAM_NEW_TRAN_CODEMatt Jacob2006-11-023-298/+0
| | | | | | | | | as the default. Reviewed by multitudes. Notes: svn path=/head/; revision=163896
* The first of 3 major steps to move the CAM layer forward to usingMatt Jacob2006-10-313-6/+341
| | | | | | | | | | | | | | | | | | | | | | | | the CAM_NEW_TRAN_CODE that has been in the tree for some years now. This first step consists solely of adding to or correcting CAM_NEW_TRAN_CODE pieces in the kernel source tree such that a both a GENERIC (at least on i386) and a LINT build with CAM_NEW_TRAN_CODE as an option will compile correctly and run (at least with some the h/w I have). After a short settle time, the other pieces (making CAM_NEW_TRAN_CODE the default and updating libcam and camcontrol) will be brought in. This will be an incompatible change in that the size of structures related to XPT_PATH_INQ and XPT_{GET,SET}_TRAN_SETTINGS change in both size and content. However, basic system operation and basic system utilities work well enough with this change. Reviewed by: freebsd-scsi and specific stakeholders Notes: svn path=/head/; revision=163816
* Remove some header polution.Scott Long2006-04-301-1/+0
| | | | Notes: svn path=/head/; revision=158177
* Type of overrun_buf doesn't matter to this code, but does to gcc.Warner Losh2006-02-042-4/+4
| | | | | | | Make it a void *. Notes: svn path=/head/; revision=155319
* Fix -Wundef.Ruslan Ermilov2005-12-044-8/+8
| | | | Notes: svn path=/head/; revision=153072
* Don't try to probe ISA PnP devices for now until this driver can grow aJohn Baldwin2005-07-131-0/+6
| | | | | | | | | | list of known-valid PnP IDs. Discussed with: imp MFC after: 3 days Notes: svn path=/head/; revision=147970
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386Yoshihiro Takahashi2005-05-298-10/+0
| | | | | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr) Notes: svn path=/head/; revision=146734
* Use BUS_PROBE_DEFAULT for pci probe return valueWarner Losh2005-03-052-6/+6
| | | | Notes: svn path=/head/; revision=143164
* Check for BIOS version 3.0 as well as 3.1.Scott Long2005-02-211-1/+1
| | | | | | | Submitted by: Coverity Prevent analysis tool Notes: svn path=/head/; revision=142160
* Fix a missing /*-David E. O'Brien2005-02-141-1/+1
| | | | Notes: svn path=/head/; revision=141854
* Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh2005-01-0616-20/+20
| | | | Notes: svn path=/head/; revision=139749
* Properly release allocated resources if adw(4) device fails to fully attach,Scott Mitchell2004-12-061-0/+20
| | | | | | | | | | | | | eg. if the firmware load fails. Shortish MFC timeout so this can be merged before the 4.11 freeze. PR: kern/34306 Submitted by: gibbs Approved by: gibbs, imp (mentor) MFC after: 5 days Notes: svn path=/head/; revision=138502
* Add missing <sys/module.h> includesPoul-Henning Kamp2004-05-302-0/+2
| | | | Notes: svn path=/head/; revision=129879
* Convert callers to the new bus_alloc_resource_any(9) API.Nate Lawson2004-03-174-18/+17
| | | | | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde Notes: svn path=/head/; revision=127135
* Make the extern for adv_mcode match the reality: it's u_int8_t, butPoul-Henning Kamp2004-03-101-1/+1
| | | | | | | probably unendiansafely used as u_int16_t. Notes: svn path=/head/; revision=126822
* Use PCIR_BAR(x) instead of PCIR_MAPS.John Baldwin2003-09-022-4/+4
| | | | | | | | Glanced over by: imp, gibbs Tested by: i386 LINT Notes: svn path=/head/; revision=119690
* Use __FBSDID().David E. O'Brien2003-08-2410-20/+30
| | | | | | | Also some minor style cleanups. Notes: svn path=/head/; revision=119418
* Prefer new location of pci include files (which have only been in theWarner Losh2003-08-222-4/+4
| | | | | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD. Notes: svn path=/head/; revision=119277
* Mega busdma API commit.Scott Long2003-07-016-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg. Lockfunc allows a driver to provide a function for managing its locking semantics while using busdma. At the moment, this is used for the asynchronous busdma_swi and callback mechanism. Two lockfunc implementations are provided: busdma_lock_mutex() performs standard mutex operations on the mutex that is specified from lockfuncarg. dftl_lock() is a panic implementation and is defaulted to when NULL, NULL are passed to bus_dma_tag_create(). The only time that NULL, NULL should ever be used is when the driver ensures that bus_dmamap_load() will not be deferred. Drivers that do not provide their own locking can pass busdma_lock_mutex,&Giant args in order to preserve the former behaviour. sparc64 and powerpc do not provide real busdma_swi functions, so this is largely a noop on those platforms. The busdma_swi on is64 is not properly locked yet, so warnings will be emitted on this platform when busdma callback deferrals happen. If anyone gets panics or warnings from dflt_lock() being called, please let me know right away. Reviewed by: tmm, gibbs Notes: svn path=/head/; revision=117126
* Merge common XPT_CALC_GEOMETRY functions into a single convenience function.Nate Lawson2003-06-142-37/+2
| | | | | | | | | | | | | | | | Devices below may experience a change in geometry. * Due to a bug, aic(4) never used extended geometry. Changes all drives >1G to now use extended translation. * sbp(4) drives exactly 1 GB in size now no longer use extended geometry. * umass(4) drives exactly 1 GB in size now no longer use extended geometry. For all other controllers in this commit, this should be a no-op. Looked over by: scottl Notes: svn path=/head/; revision=116351
* Bring back bus_dmasync_op_t. It is now a typedef to an int, though theScott Long2003-05-272-4/+4
| | | | | | | | | | | BUS_DMASYNC_ definitions remain as before. The does not change the ABI, and reverts the API to be a bit more compatible and flexible. This has survived a full 'make universe'. Approved by: re (bmah) Notes: svn path=/head/; revision=115343
* I deserve a big pointy hat for having missed all those referencesMaxime Henrion2003-04-102-4/+4
| | | | | | | to bus_dmasync_op_t in my last commit. Notes: svn path=/head/; revision=113350
* Clean up argument comments for bus_dma_tag_create() calls.Matthew N. Dodd2003-03-296-133/+185
| | | | Notes: svn path=/head/; revision=112782
* Wrap the static endian functions to shutup GCC.David E. O'Brien2003-02-241-0/+2
| | | | Notes: svn path=/head/; revision=111409
* Add adv_adj_endian_qdone_info() & adv_adj_scsiq_endian()David E. O'Brien2003-02-231-0/+18
| | | | | | | so this at least compiles on big-endian machines. Notes: svn path=/head/; revision=111342
* Consolidate MIN/MAX macros into one place (param.h).Alfred Perlstein2003-02-022-4/+0
| | | | | | | Submitted by: Hiten Pandya <hiten@unixdaemons.com> Notes: svn path=/head/; revision=110232
* Change BUS_SPACE_UNRESTRICTED (~0ul) to plain ~0 when used in theMike Barcroft2003-01-191-1/+1
| | | | | | | | | | 'int nsegments' argument to bus_dma_tag_create(). ~0ul does not fit in an int on machines with 64 bit longs. Noticed by: alpha tinderbox Notes: svn path=/head/; revision=109536
* Change BUS_SPACE_UNRESTRICTED (~0ul) to plain ~0 when used in thePeter Wemm2002-10-093-4/+4
| | | | | | | | 'int nsegments' argument to bus_dma_tag_create(). ~0ul does not fit in an int. Notes: svn path=/head/; revision=104707
* Be consistent about "static" functions: if the function is markedPoul-Henning Kamp2002-09-281-1/+1
| | | | | | | | | static in its prototype, mark it static at the definition too. Inspired by: FlexeLint warning #512 Notes: svn path=/head/; revision=104094
* Restore I/O port resources to the condition before adv_isa_probe() isYoshihiro Takahashi2001-05-061-10/+17
| | | | | | | | | called. Submitted by: yokota Notes: svn path=/head/; revision=76309
* Use correct resource id for bus_release_resource().Yoshihiro Takahashi2001-05-061-10/+10
| | | | Notes: svn path=/head/; revision=76307
* Turn on interrupt-entropy harvesting for all/any mass storage devicesMark Murray2001-03-014-5/+6
| | | | | | | | | | I could find. I have no doubt missed a couple. Interrupt entropy harvesting is still conditional on the kern.random.sys.harvest_interrupt sysctl. Notes: svn path=/head/; revision=73280
* - Check if the ccb_infos in the softc is NULL before trying to free it inJohn Baldwin2001-02-082-2/+11
| | | | | | | | | | | adv_free() as the ISA probe routine doesn't malloc() ccb_infos but does call adv_free(). - Release the ISA-only overrun DMA tags, bufs, and maps if the probe fails. Tested by: rwatson Notes: svn path=/head/; revision=72147
* Remove unneeded <stddef.h> #includes.Poul-Henning Kamp2000-10-291-2/+0
| | | | Notes: svn path=/head/; revision=67899
* Add the use of M_ZERO to some malloc calls.David Malone2000-10-291-2/+1
| | | | | | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Approved by: gibbs Notes: svn path=/head/; revision=67888
* Convert all users of fldoff() to offsetof(). fldoff() is badPoul-Henning Kamp2000-10-271-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | because it only takes a struct tag which makes it impossible to use unions, typedefs etc. Define __offsetof() in <machine/ansi.h> Define offsetof() in terms of __offsetof() in <stddef.h> and <sys/types.h> Remove myriad of local offsetof() definitions. Remove includes of <stddef.h> in kernel code. NB: Kernelcode should *never* include from /usr/include ! Make <sys/queue.h> include <machine/ansi.h> to avoid polluting the API. Deprecate <struct.h> with a warning. The warning turns into an error on 01-12-2000 and the file gets removed entirely on 01-01-2001. Paritials reviews by: various. Significant brucifications by: bde Notes: svn path=/head/; revision=67708
* Remove unneeded #include <machine/clock.h>Poul-Henning Kamp2000-10-154-4/+0
| | | | Notes: svn path=/head/; revision=67164
* Fix typo (accessable --> accessible).Alexander Langer2000-06-141-1/+1
| | | | | | | | | PR: 18588 Submitted by: Anatoly Vorobey <mellon@pobox.com> Reviewed by: asmodai Notes: svn path=/head/; revision=61686
* Unused include: #include "adw.h"Peter Wemm2000-06-101-1/+0
| | | | Notes: svn path=/head/; revision=61484