aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/mlx
Commit message (Collapse)AuthorAgeFilesLines
* Centralize the devstat handling for all GEOM disk device driversPoul-Henning Kamp2003-03-085-12/+2
| | | | | | | | | | | in geom_disk.c. As a side effect this makes a lot of #include <sys/devicestat.h> lines not needed and some biofinish() calls can be reduced to biodone() again. Notes: svn path=/head/; revision=111979
* Gigacommit to improve device-driver source compatibility betweenPoul-Henning Kamp2003-03-031-13/+5
| | | | | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl) Notes: svn path=/head/; revision=111815
* Chase the musical variable names.John Baldwin2003-02-251-2/+2
| | | | | | | | Pointy hat to: jhb Reported by: des Notes: svn path=/head/; revision=111509
* Limit the maximum I/O size to 8 pages for version 2 controllers. ThisJohn Baldwin2003-02-251-4/+8
| | | | | | | | | fixes problems with some mlx(4) cards in Alpha machines. Reviewed by: msmith (ages ago) Notes: svn path=/head/; revision=111499
* Fix a small fat-finger: s/mlxd/mxld/.John Baldwin2003-02-251-1/+1
| | | | | | | Reported by: Bob Willcox <bob@immure.com> Notes: svn path=/head/; revision=111497
* NO_GEOM cleanup:Poul-Henning Kamp2003-02-253-43/+21
| | | | | | | | Move to "struct disk*" centric API. Retire major #131 (mlxd) Notes: svn path=/head/; revision=111469
* NO_GEOM cleanup:Poul-Henning Kamp2003-02-211-1/+1
| | | | | | | | | | | Change the argument to disk_destroy() to be the same struct disk * as disk_create() takes. This enables drivers to ignore the (now) bogus dev_t which disk_create() returns. Notes: svn path=/head/; revision=111216
* Back out M_* changes, per decision of the TRB.Warner Losh2003-02-191-1/+1
| | | | | | | Approved by: trb Notes: svn path=/head/; revision=111119
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein2003-01-211-1/+1
| | | | | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
* use __packed.Alfred Perlstein2002-09-231-16/+16
| | | | Notes: svn path=/head/; revision=103870
* (This commit touches about 15 disk device drivers in a very consistentPoul-Henning Kamp2002-09-201-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and predictable way, and I apologize if I have gotten it wrong anywhere, getting prior review on a patch like this is not feasible, considering the number of people involved and hardware availability etc.) If struct disklabel is the messenger: kill the messenger. Inside struct disk we had a struct disklabel which disk drivers used to communicate certain metrics to the disklayer above (GEOM or the disk mini-layer). This commit changes this communication to use four explicit fields instead. Amongst the benefits is that the fields do not get overwritten by wrong or bogus on-disk disklabels. Once that is clear, <sys/disk.h> which is included in the drivers no longer need to pull <sys/disklabel.h> and <sys/diskslice.h> in, the few places that needs them, have gotten explicit #includes for them. The disklabel inside struct disk is now only for internal use in the disk mini-layer, so instead of embedding it, we malloc it as we need it. This concludes (modulus any mistakes) the series of disklabel related commits. I belive it all amounts to a NOP for all the rest of you :-) Sponsored by: DARPA & NAI Labs. Notes: svn path=/head/; revision=103714
* Make FreeBSD "struct disklabel" agnostic, step 311 of 723:Poul-Henning Kamp2002-09-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename diskerr() to disk_err() for naming consistency. Drop the by now entirely useless struct disklabel argument. Add a flag argument for new-line termination. Fix a couple of printf-format-casts to %j instead of %l. Correctly print the name of all bio commands. Move the function from subr_disklabel.c to subr_disk.c, and from <sys/disklabel.h> to <sys/disk.h>. Use the new disk_err() throughout, #include <sys/disk.h> as needed. Bump __FreeBSD_version for the sake of the aac disk drivers #ifdefs. Remove unused disklabel members of softc for aac, amr and mlx, which seem to originally have been intended for diskerr() use, but which only rotted and got Copy&Pasted at least two times to many. Sponsored by: DARPA & NAI Labs. Notes: svn path=/head/; revision=103675
* Fixed printf format errors in previous commit. %llu is no more suitableBruce Evans2002-03-181-2/+4
| | | | | | | | | | | | | | | than %u for printing signed 64-bit types. It fails on different machines, and has the wrong signdness. Fixed old printf format error on the same line. %u is not suitable for printing 32-bit types on all machines. "Fixed" format printf error in previous commit. This file is not formatted in KNF. Partially restore bug for bug compatibility: indent the printf args too much, but don't format them for 160-column terminals. Notes: svn path=/head/; revision=92612
* Formats that print the block number need to be changed from %u toWarner Losh2002-03-181-2/+2
| | | | | | | %llu due to recent changes in bio_pblkno's type. Notes: svn path=/head/; revision=92608
* Update to C99, s/__FUNCTION__/__func__/,David E. O'Brien2001-12-102-3/+3
| | | | | | | also don't use ANSI string concatenation. Notes: svn path=/head/; revision=87599
* KSE Milestone 2Julian Elischer2001-09-123-10/+11
| | | | | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha Notes: svn path=/head/; revision=83366
* Fix some signed/unsigned integer confusion, and add bounds checking ofKris Kennaway2001-09-101-0/+2
| | | | | | | | | | | arguments to some functions. Obtained from: NetBSD Reviewed by: peter MFC after: 2 weeks Notes: svn path=/head/; revision=83291
* Driver modifications consistent with my other drivers to facilitateMike Smith2001-06-255-41/+115
| | | | | | | | | the use of a single set of sources across 4.x and 5.x branches. No significant code changes. Notes: svn path=/head/; revision=78752
* Fix warning: 193: warning: label `done' defined but not usedPeter Wemm2001-06-151-1/+0
| | | | Notes: svn path=/head/; revision=78234
* Make the disk mini-layer check for and handle zero-length transfersPoul-Henning Kamp2001-05-061-4/+0
| | | | | | | instead of the underlying drivers. Notes: svn path=/head/; revision=76324
* Actually biofinish(struct bio *, struct devstat *, int error) is more generalPoul-Henning Kamp2001-05-061-2/+1
| | | | | | | | | than the bioerror(). Most of this patch is generated by scripts. Notes: svn path=/head/; revision=76322
* Send the remains (such as I have located) of "block major numbers" toPoul-Henning Kamp2001-03-262-3/+0
| | | | | | | the bit-bucket. Notes: svn path=/head/; revision=74810
* Turn on interrupt-entropy harvesting for all/any mass storage devicesMark Murray2001-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. Notes: svn path=/head/; revision=73280
* Avoid hardcoding the 'rid' and 'type' of the MEM/IOPORT resource.Matthew N. Dodd2000-11-283-9/+13
| | | | | | | | | | | Store the 'rid' and 'type' in the softc and use them in mlx.c:mlx_free(). EISA and MCA front ends will require this. Approved by: msmith Notes: svn path=/head/; revision=69292
* Further use of M_ZERO.David Malone2000-11-181-2/+1
| | | | | | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Approved by: msmith Notes: svn path=/head/; revision=68877
* Return -10 from the PCI probe to allow room for an updated driver toMike Smith2000-10-281-1/+1
| | | | | | | override one built into the kernel. Notes: svn path=/head/; revision=67782
* Remove unneeded #include <machine/clock.h>Poul-Henning Kamp2000-10-151-1/+0
| | | | Notes: svn path=/head/; revision=67164
* Add support for 2.x/3.x firmware adapters which are too old to have aMike Smith2000-08-042-2/+9
| | | | | | | | memory-mapped register window. This closes the last known issue with 2.x vintage adapters. Notes: svn path=/head/; revision=64223
* Back out the previous change to the queue(3) interface.Jake Burkholder2000-05-261-3/+3
| | | | | | | | | It was not discussed and should probably not happen. Requested by: msmith and others Notes: svn path=/head/; revision=60938
* Change the way that the queue(3) structures are declared; don't assume thatJake Burkholder2000-05-231-3/+3
| | | | | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd Notes: svn path=/head/; revision=60833
* Change the way that scatter/gather list tables are allocated so that weMike Smith2000-05-064-39/+58
| | | | | | | | | | | | | | can use all of the s/g entries available on smaller cards. This is necessary if we want to be able to handle a non-page-aligned 64k transfer on 2.x and 3.x firmware. Fix a missing splx() that may have left us at splbio() for longer than desired. Reduce shadowing of controller-supplied parameters a little. Notes: svn path=/head/; revision=60074
* Separate the struct bio related stuff out of <sys/buf.h> intoPoul-Henning Kamp2000-05-053-3/+3
| | | | | | | | | | | | | | | | | | <sys/bio.h>. <sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall not be made a nested include according to bdes teachings on the subject of nested includes. Diskdrivers and similar stuff below specfs::strategy() should no longer need to include <sys/buf.> unless they need caching of data. Still a few bogus uses of struct buf to track down. Repocopy by: peter Notes: svn path=/head/; revision=60041
* One minor bugfix:Mike Smith2000-04-202-4/+19
| | | | | | | | | | | | | | | - Free resources in all the possible attachment failure cases. One critical bugfix: - Fix a race where it was possible to get out of synch with the log messages from the controller, if the controller hung up for any period of time (eg. while resetting a SCSI bus). This would result in an endless string of console errors, bringing the machine to a halt. Notes: svn path=/head/; revision=59447
* Remove ~25 unneeded #include <sys/conf.h>Poul-Henning Kamp2000-04-192-2/+0
| | | | | | | Remove ~60 unneeded #include <sys/malloc.h> Notes: svn path=/head/; revision=59391
* Complete the bio/buf divorce for all code below devfs::strategyPoul-Henning Kamp2000-04-153-37/+37
| | | | | | | | | | | | | Exceptions: Vinum untouched. This means that it cannot be compiled. Greg Lehey is on the case. CCD not converted yet, casts to struct buf (still safe) atapi-cd casts to struct buf to examine B_PHYS Notes: svn path=/head/; revision=59249
* Add features required for basic userland management utility:Mike Smith2000-04-115-135/+235
| | | | | | | | | | | | | | | | | - implement user-initiated background drive rebuild - implement user-initiated background consistency check - log controller-initiated background rebuild/check operations Try to fix the elusive "invalid log operation" bug, and panic if we do hit this one in the hopes of getting better information. Tidy up diagnostic messages. Try to use disk_create/disk_destroy correctly. This isn't working properly yet, but it's not clear whose fault that is. Notes: svn path=/head/; revision=59136
* Move B_ERROR flag to b_ioflags and call it BIO_ERROR.Poul-Henning Kamp2000-04-022-3/+3
| | | | | | | | | | | | | | | | (Much of this done by script) Move B_ORDERED flag to b_ioflags and call it BIO_ORDERED. Move b_pblkno and b_iodone_chain to struct bio while we transition, they will be obsoleted once bio structs chain/stack. Add bio_queue field for struct bio aware disksort. Address a lot of stylistic issues brought up by bde. Notes: svn path=/head/; revision=58934
* Remove B_READ, B_WRITE and B_FREEBUF and replace them with a newPoul-Henning Kamp2000-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | field in struct buf: b_iocmd. The b_iocmd is enforced to have exactly one bit set. B_WRITE was bogusly defined as zero giving rise to obvious coding mistakes. Also eliminate the redundant struct buf flag B_CALL, it can just as efficiently be done by comparing b_iodone to NULL. Should you get a panic or drop into the debugger, complaining about "b_iocmd", don't continue. It is likely to write on your disk where it should have been reading. This change is a step in the direction towards a stackable BIO capability. A lot of this patch were machine generated (Thanks to style(9) compliance!) Vinum users: Greg has not had time to test this yet, be careful. Notes: svn path=/head/; revision=58345
* Update to the latest development version of the Mylex driver. Changes inMike Smith2000-03-186-162/+704
| | | | | | | | | | | | | | | | | | | | | this version include: - Support for version 2.x firmware (2.42 or later recommended). This means we are the only open-source driver supporting these adapters. This code has only been tested on a Digital KZPCA adapter in an Alpha system, but is believed to be correct. NOTE: EISA adapters are not yet supported. - Support the BIOS/Firmware initialisation handshake protocol. This allows the driver to bring the card up to operational state even if the BIOS can't be run (eg. if it's an x86 BIOS in an Alpha system). - A working command pasthrough interface. This allows a user-space configuration tool (under development) to issue arbitrary commands to the controller or to devices in the system. Notes: svn path=/head/; revision=58188
* Fix the firmware build number output (again).Mike Smith1999-12-251-1/+1
| | | | Notes: svn path=/head/; revision=55093
* Cosmetic fix; get the firmware build code and customisation tag theMike Smith1999-12-241-1/+1
| | | | | | | | | right way around. Submitted by: "Chris D. Faulhaber" <jedgar@fxp.org> Notes: svn path=/head/; revision=55080
* Updates resulting from new documentation from Mylex and some cleaning:Mike Smith1999-12-224-75/+95
| | | | | | | | | | | | | | | | | | | | | - Don't keep private copies of some of the data fields from the ENQUIRY and ENQUIRY2 commands. Instead, standardise on the ENQUIRY2 command for initial adapter information, and keep a copy of the entire structure. Refer to it where appropriate. - Move all of the controller description functionality into a new function. Print lots more controller data if bootverbose is set. Add knowledge of the DAC960 PR, PT, PTL0 and PRL controllers, rename the 960PTL -> PTL0 and 1100P -> 1100PVX. - Correctly terminate an error message. The controller interface procedures have been reviewed against the Mylex-supplied documentation; no changes appear necessary at this time. Notes: svn path=/head/; revision=54979
* time_t is an int on the Alpha, not long.Peter Wemm1999-12-121-1/+1
| | | | Notes: svn path=/head/; revision=54515
* Major update to the Mylex DAC960 driver adding new hardware supportMike Smith1999-12-115-174/+305
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and fixing some major bugs. - Add support for the v5 firmware interface, used by the DAC1164P (tested) and AcceleRAID 352 (untested but should work). We now cover all of the Mylex family's protocols except for v2 (used by EISA and Alpha-compatible cards). - Fix an accounting bug which resulted in endless 'poll still busy' messages. In situations of high controller load the count of poll commands could be incremented without actually successfully launching a command. This totally removes the accounting for status poll commnads; it was its own worst enemy. - Add some simple reentry prevention locks to processing of the waiting and completed command queues to prevent races which could result in I/O being done or completed twice (both are fatal). This highlights a need for simple locking primitives in both the UP and SMP kernels. - Streamline the handling of command completion to reduce the amount of redundant work being done. Remove the code which tests for commands that have gone missing in action; nobody has ever seen one of these and it wouldn't have worked properly anyhow. - Handle disconnection of drives from the controller in the detach, not shutdown method. This avoids problems flushing the cache in a panic when a drive is mounted. - Don't call bus_generic_detach when disconnecting drives; it doesn't actually do anything useful. - Increment the log message index regardless of whether we actually retrieved one or not. If we run into a message that we can't fetch, we don't want to spin endlessly complaining about the fact. - Don't assume that interrupts will work when we're flushing the controller. We may think they are enabled, but in eg. a panic situation the controller may not be able to deliver an interrupt. Notes: svn path=/head/; revision=54419
* Revamp the devstat priority system. All disks now have the same priority.Kenneth D. Merry1999-12-081-2/+2
| | | | | | | | | | | | | | | | | | | | | The same goes for CD drivers and tape drivers. In systems with mixed IDE and SCSI, devices in the same priority class will be sorted in attach order. Also, the 'CCD' priority is now the 'ARRAY' priority, and a number of drivers have been modified to use that priority. This includes the necessary changes to all drivers, except the ATA drivers. Soren will modify those separately. This does not include and does not require any change in the devstat version number, since no known userland applications use the priority enumerations. Reviewed by: msmith, sos, phk, jlemon, mjacob, bde Notes: svn path=/head/; revision=54279
* Remove the 'ivars' arguement to device_add_child() andMatthew N. Dodd1999-12-031-1/+2
| | | | | | | | | | | | | | | | | | | device_add_child_ordered(). 'ivars' may now be set using the device_set_ivars() function. This makes it easier for us to change how arbitrary data structures are associated with a device_t. Eventually we won't be modifying device_t to add additional pointers for ivars, softc data etc. Despite my best efforts I've probably forgotten something so let me know if this breaks anything. I've been running with this change for months and its been quite involved actually isolating all the changes from the rest of the local changes in my tree. Reviewed by: peter, dfr Notes: svn path=/head/; revision=54073
* Correctly compute the block count. In reality, it seems that theMike Smith1999-11-022-2/+2
| | | | | | | | | | controller will never return the command if it's not exactly a multiple of a block in size. Cosmetic formatting for RAID level output. Notes: svn path=/head/; revision=52785
* Move some hardware-related items to the hardware-related header.Mike Smith1999-10-265-168/+185
| | | | | | | | | Shift to using the same queueing strategy that the amr driver uses. Some simple tests indicate that we use about 2% of the CPU at around 500tps with the controller completely saturated with I/O. Notes: svn path=/head/; revision=52544
* Use the physical block number, not the logical block number, for I/OMike Smith1999-10-221-5/+5
| | | | | | | | | | operations. The latter only works where the partion begins at the bottom of the disk. Whoops. Submitted by: Chris Csanady <cc@137.org> Notes: svn path=/head/; revision=52439
* Use a much larger buffer for message log retrieval until we are sure thatMike Smith1999-10-161-9/+10
| | | | | | | | | | | | | | 32 bytes is safe. Handle successful completion of message log retrieval commands. With these changes, the driver correctly handles the consequences of drive death and replacement in a reliable array. Note that the massive backlog of I/O during handling of such an event can kill the system if softupdates is enabled. Notes: svn path=/head/; revision=52276