summaryrefslogtreecommitdiffstats
path: root/sys/pci/ncr.c
Commit message (Collapse)AuthorAgeFilesLines
* 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).
* Add hooks so that the alpha can detect which disk has the root partition.dfr1998-09-261-2/+6
|
* Don't set script to vaddr2 on the alpha - it can't access scripts in devicedfr1998-09-261-2/+6
| | | | memory using simple pointers.
* A fix from Justin for the NCR bug that caused panics on 875 (and possiblyken1998-09-221-3/+3
| | | | | | | | other) chips. The script pointer was getting set to NULL instead of the right value. Submitted by: gibbs
* Bring back the cleanups from revs 1.121 and rev.1.122 of ncr.c.gibbs1998-09-221-23/+25
| | | | Noticed by: bde
* Alpha patches for the NCR driver from Doug Rabson. I've tested these on anken1998-09-201-54/+136
| | | | | | | NCR 810a, and they seem to work fine on the i386 as well. Reviewed by: gibbs Submitted by: dfr
* Set QUIRK_NOMSG for all devices as was the case in the non-CAM versiongibbs1998-09-181-3/+3
| | | | | of the driver. Why this is necessary (and how identify message handling is performed when this is set) I don't comprehend...
* Really correct ncr_freeze_devq now. We scan backwards from the currentgibbs1998-09-171-11/+26
| | | | | | | | | | insertion point into the start queue looking for entries to remove and mark them with the 'skip' address, recording the entry furthest from the insertion point that needs to be removed. We then go through a second loop starting at the furthest entry to be removed and compress the start queue. The old algorithm started at (old insert point + 1) and wrapped through the whole queue which would end up moving the start position in the queue out from under the nose of the scrip processor.
OpenPOWER on IntegriCloud