summaryrefslogtreecommitdiffstats
path: root/sys/pci/ncr.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix typos from previous commit.scottl2005-01-071-0/+1
|
* /* -> /*- for license, minor formatting changesimp2005-01-071-1/+1
|
* Fix oversight reported by Norikatsu Shigemura for the "sym" driverse2004-09-101-0/+1
| | | | | | | | (which was derived from the "ncr" driver) and add a MODULE_DEPEND on "cam". MT5 candidate, IMHO. MFC after: 1 week
* Update for the KDB framework:marcel2004-07-101-1/+2
| | | | o Call kdb_enter() instead of Debugger().
* Add missing <sys/module.h> includesphk2004-05-301-0/+1
|
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-7/+7
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Replace calls to vm_page_alloc_contig() by calls to contigmalloc().alc2004-01-131-7/+6
| | | | | vm_page_alloc_contig() will be removed after the three remaining drivers that use it are also converted to contigmalloc().
* Revert previous change for ncrreg.h. The header really lives inmarcel2003-08-231-1/+1
| | | | sys/pci.
* Prefer new location of pci include files (which have only been in theimp2003-08-221-3/+3
| | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
* Changed the type of the variable `qidx' from u_int8_t to int,robert2003-07-271-2/+3
| | | | | | | | | | | | | | | | | | | mainly to quiet a warning emitted by GCC 3.3 about comparing a variable to a value which is larger than the former can hold. The value was checked to make sure the `np->squeue' array is not accessed behind its boundary. This worked due to possibly accidental truncation when (np->squeueput + 1) was larger than or equal to MAX_START (256) when it was assigned to `qidx'. `qidx' is used to hold the next position in the start queue for an insertion. The new type was chosen because some other code in the function ncr_freeze_devq() also uses plain integers to hold those indices. Wrapped the line after the closing parenthesis of an `if' condition.
* Merge common XPT_CALC_GEOMETRY functions into a single convenience function.njl2003-06-141-20/+1
| | | | | | | | | | | | | 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
* Use __FBSDID().obrien2003-06-111-1/+4
|
* Remove embededded ID string which was meant to provide informationse2003-06-091-6/+0
| | | | | | | about the driver version in case of an error report. It conflicts with some other variable of the same name that has been added to the kernel just recently and there haven't been any bug reports for quite some time now, anyway ...
* Remove unused variable.phk2003-05-311-2/+0
| | | | Found by: FlexeLint
* - Express hard dependencies on bus (pci, isa, pccard) andmdodd2003-04-151-1/+2
| | | | | | | | network layer (ether). - Don't abuse module names to facilitate ifconfig module loading; such abuse isn't really needed. (And if we do need type information associated with a module then we should make it explicit and not use hacks.)
* Back out M_* changes, per decision of the TRB.imp2003-02-191-2/+2
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-2/+2
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/schweikh2002-12-301-1/+1
| | | | Add FreeBSD Id tag where missing.
* Be consistent about functions being static.phk2002-10-161-8/+8
| | | | Spotted by: FlexeLint.
* Replace various spelling with FALLTHROUGH which is lint()ablecharnier2002-08-251-6/+6
|
* s/adress/address/kris2001-07-231-1/+1
| | | | | Inspired by: OpenBSD MFC After: 1 week
* Turn on interrupt-entropy harvesting for all/any mass storage devicesmarkm2001-03-011-1/+1
| | | | | | | I could find. I have no doubt missed a couple. Interrupt entropy harvesting is still conditional on the kern.random.sys.harvest_interrupt sysctl.
* Convert more malloc+bzero to malloc+M_ZERO.dwmalone2000-12-081-8/+3
| | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net>
* Convert all users of fldoff() to offsetof(). fldoff() is badphk2000-10-271-2/+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
* Remove unneeded #include <machine/clock.h>phk2000-10-151-1/+0
|
* ncr.c is no longer a COMPAT_OLDPCI device - remove the warning.peter2000-05-281-4/+0
|
* Update to use newbus and busspace.dfr2000-05-271-158/+121
|
* Remove unneeded <sys/buf.h> includes.phk2000-04-181-1/+0
| | | | | Due to some interesting cpp tricks in lockmgr, the LINT kernel shrinks by 924 bytes.
* Ahhrggg. Put the test for the compat shims AFTER the file that includesimp2000-03-271-4/+4
| | | | | | them. Pointed out by: bde
* Per conversations in -current, add #error to these drivers when you don'timp2000-03-271-0/+4
| | | | have the right compatibility shims enabled. ISA drivers to follow later.
* Add 53C895A and 53C1510D device description to the ncr chip table.groudier2000-01-231-0/+8
|
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-291-8/+8
| | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
* Remove calls to alpha_register_pci_scsi(). After Mike's recent bootgallatin1999-11-051-4/+0
| | | | | | changes, it no longer exists and is preventing alpha kernels from building. reviewed by: msmith
* Don't restrict our requests for contiguous memory to addresses >= 1MB.bde1999-08-291-2/+2
| | | | | | | | This fixes, at least, panics in ncr_attach() on i386's with about 5MB of memory. The restriction was a hack to leave some low memory for ISA DMA, but on i386's we now allocate pages from the top down, so all the restriction did was cause our allocations to fail when there is no free memory above 1MB.
* $Id$ -> $FreeBSD$peter1999-08-281-2/+2
|
* #include <machine/md_var.h> to get prototype for alpha_register_pci_scsi().peter1999-07-011-2/+3
|
* Kill option FAILSAFE.des1999-06-151-3/+2
| | | | | PR: i386/12187 Approved by: bde
* Allow chipset drivers to specify the direct-mapped DMA window's mask ingallatin1999-05-261-4/+3
| | | | | | | | | | preparation for tsunami support. Previous chipsets' direct-mapped DMA mask was always 1024*1024*1024. The Tsunami chipset needs it to be 2*1024*1024*1024 These changes should not affect the i386 port Reviewed by: Doug Rabson <dfr@nlsystems.com>
* Fix a memory leak and a double free that could happen in certain errorken1999-05-211-5/+4
| | | | | | cases. These were unlikely to happen in normal operation. Noticed by: "Christopher R. Bowman" <crb@ChrisBowman.com>
* Really support Ultra-2 chips. Symbios redefined a register thatse1999-05-091-33/+11
| | | | | | | | | | | | was available to the programmer to hold chip state information: Use the SDID register instead of CTEST3. This change actually simplifies the SCRIPTS code, but I'm not absolutely sure, that it is OK for all variants of NCR chips around and all device combinations. I have had this code running on several systems with 53c810, 875 and 895 controllers for several months. Suggested by: Gerard Roudier <groudier@club-internet.fr>
* Simplify the COMPAT_PCI_DRIVER/DATA_SET hack. We can add:peter1999-05-091-6/+2
| | | | | | | | #define COMPAT_PCI_DRIVER(name,data) DATA_SET(pcidevice_set,data) .. to 2.2.x and 3.x if people think it's worth it. Driver writers can do this if it's not defined. (The reason for this is that I'm trying to progressively eliminate use of linker_sets where it hurts modularity and runtime load capability, and these DATA_SET's keep getting in the way.)
* Add a number of interrelated CAM feature enhancements and bug fixes.ken1999-05-061-22/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NOTE: These changes will require recompilation of any userland applications, like cdrecord, xmcd, etc., that use the CAM passthrough interface. A make world is recommended. camcontrol.[c8]: - We now support two new commands, "tags" and "negotiate". - The tags commands allows users to view the number of tagged openings for a device as well as a number of other related parameters, and it allows users to set tagged openings for a device. - The negotiate command allows users to enable and disable disconnection and tagged queueing, set sync rates, offsets and bus width. Note that not all of those features are available for all controllers. Only the adv, ahc, and ncr drivers fully support all of the features at this point. Some cards do not allow the setting of sync rates, offsets and the like, and some of the drivers don't have any facilities to do so. Some drivers, like the adw driver, only support enabling or disabling sync negotiation, but do not support setting sync rates. - new description in the camcontrol man page of how to format a disk - cleanup of the camcontrol inquiry command - add support in the 'devlist' command for skipping unconfigured devices if -v was not specified on the command line. - make use of the new base_transfer_speed in the path inquiry CCB. - fix CCB bzero cases cam_xpt.c, cam_sim.[ch], cam_ccb.h: - new flags on many CCB function codes to designate whether they're non-immediate, use a user-supplied CCB, and can only be passed from userland programs via the xpt device. Use these flags in the transport layer and pass driver to categorize CCBs. - new flag in the transport layer device matching code for device nodes that indicates whether a device is unconfigured - bump the CAM version from 0x10 to 0x11 - Change the CAM ioctls to use the version as their group code, so we can force users to recompile code even when the CCB size doesn't change. - add + fill in a new value in the path inquiry CCB, base_transfer_speed. Remove a corresponding field from the cam_sim structure, and add code to every SIM to set this field to the proper value. - Fix the set transfer settings code in the transport layer. scsi_cd.c: - make some variables volatile instead of just casting them in various places - fix a race condition in the changer code - attach unless we get a "logical unit not supported" error. This should fix all of the cases where people have devices that return weird errors when they don't have media in the drive. scsi_da.c: - attach unless we get a "logical unit not supported" error scsi_pass.c: - for immediate CCBs, just malloc a CCB to send the user request in. This gets rid of the 'held' count problem in camcontrol tags. scsi_pass.h: - change the CAM ioctls to use the CAM version as their group code. adv driver: - Allow changing the sync rate and offset separately. adw driver - Allow changing the sync rate and offset separately. aha driver: - Don't return CAM_REQ_CMP for SET_TRAN_SETTINGS CCBs. ahc driver: - Allow setting offset and sync rate separately bt driver: - Don't return CAM_REQ_CMP for SET_TRAN_SETTINGS CCBs. NCR driver: - Fix the ultra/ultra 2 negotiation bug - allow setting both the sync rate and offset separately Other HBA drivers: - Put code in to set the base_transfer_speed field for XPT_GET_TRAN_SETTINGS CCBs. Reviewed by: gibbs, mjacob (isp), imp (aha)
* Use COMPAT_PCI_DRIVER() for registration if it exists. This shouldn'tpeter1999-04-241-2/+6
| | | | hurt the driver portability to 3.x too much for where drivers are shared.
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-271-3/+13
| | | | | | | kernel compile. This commit includes significant work to proper handle const arguments for the DDB symbol routines.
* Silence -Wtrigraph.hoek1998-12-301-3/+3
| | | | Submitted by: Bradley Dunn <bradley@dunn.org> (pr: kern/8817)
* pci_device pd_probe function changed from returning char * to returningdillon1998-12-141-4/+4
| | | | | | const char *. Originally I was going to add casts from const char * to char * in some of the pci device drivers, but the reality is that the pci device probes return constant quoted strings.
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticarchie1998-12-071-6/+5
| | | | and local variables, goto labels, and functions declared but not defined.
* Examine all occurrences of sprintf(), strcat(), and str[n]cpy()archie1998-12-041-3/+3
| | | | | | | | | | | | | | for possible buffer overflow problems. Replaced most sprintf()'s with snprintf(); for others cases, added terminating NUL bytes where appropriate, replaced constants like "16" with sizeof(), etc. These changes include several bug fixes, but most changes are for maintainability's sake. Any instance where it wasn't "immediately obvious" that a buffer overflow could not occur was made safer. Reviewed by: Bruce Evans <bde@zeta.org.au> Reviewed by: Matthew Dillon <dillon@apollo.backplane.com> Reviewed by: Mike Spengler <mks@networkcs.com>
* Honor CAM_TAG_ACTION_NONE.gibbs1998-10-151-2/+3
|
* FIxed printf format errors (an new one that is only detected on systemsbde1998-09-291-6/+6
| | | | | with pointers smaller than u_longs, and 2 possibly-truncating casts in the same printf).
OpenPOWER on IntegriCloud