summaryrefslogtreecommitdiffstats
path: root/sys/dev/ic/amivar.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Nuke unused struct scsi_link members of adapter softc's where thekrw2020-07-221-3/+1
| | | | driver successfully compiles on one or more of amd64, i386, hppa.
* Cache a pointer to the scsibus_softc rather than hoping the copy inkrw2020-07-111-1/+2
| | | | | sc->sc_link is preserved by the nefarious forces outside of the adapter code.
* cut ami over to iopools.dlg2010-06-231-1/+3
| | | | | | makes the ioctl and sensor paths more reliably now that they cant fail due to a ccb allocation failure, and allows better sharing of resources between multiple logical volumes and physical devices.
* switch ami over to using mutexes instead of splbio to protect itself. thisdlg2010-06-231-4/+6
| | | | | | | | | | | protects the ccb runqueues and the mailbox with a single mutex. the biggest change as a consequence of this is a rewrite of the polled command code. it now forces the polled command onto the chip ahead of the pending runqueue, and simply runs the interrupt handler until the ccb completes. tested by sthen@
* protect the ccb free list with its own mutex.dlg2010-06-211-2/+4
|
* gc unused variabledlg2010-06-041-2/+1
|
* Major overhaul of bio.marco2008-10-281-3/+10
| | | | | | | | | | Fix set hotspare that didn't always work. Fix several very subtle bugs because of firmware lies Fix disk size that sometimes was incorrect Only poke drives if something changed so it makes bio way faster on subsequent calls Tested by several folks, thanks Ok dlg
* the success of a command is reported in the mbox, but not passed on to thedlg2008-04-101-1/+2
| | | | | | | | | completion routines to do anything useful with. this stashes the commands status in the ccb for the ccb_done handlers to use. the completion path for passthru commands now checks the mbox status to see if the command actually works. this prevents phantom devices from appearing on the passthru busses.
* split userland & kernel struct sensor/sensordev so that the additionderaadt2007-03-221-3/+3
| | | | | | of new fields in the future is less disruptive. This is done similar to how struct proc is handled for ps(1). ok jmc (man page changes) tested fkr simon, and more suggestions from millert
* convert to our locks to rwlocks.dlg2007-01-271-2/+2
|
* adapt to new two-level sensor api; Constantine A. Mureninderaadt2006-12-231-1/+4
|
* rewrite how the sensors are created. previously they would wait for io todlg2006-06-281-3/+2
| | | | | | | | be done on the logical disks so ami_scsi_cmd can stash the name of the device doing the io. we now walk the device tree after the logical disks are attached and use the names of ami's child devices. ok marco@
* the maximum possible number of ccbs that a megaraid can use (126 of them)dlg2006-05-211-2/+2
| | | | | | | | | is preallocated in the softc, even if the driver is only ever going to use one of them when running. this allocates them separately during attach as a first step toward having the driver only allocate as many ccbs as the firmware can support. ok krw@
* get rid of the ccb list typedef. while here switch to TAILQ_HEAD insteaddlg2006-04-201-3/+3
| | | | | of TAILQ_TAIL when pulling ccbs off the free list since it does less "interesting" things with pointers. changes prompted by lint bitching.
* this is the proper fix for krws bug. i feel kinda bad taking the commitdlg2006-04-201-3/+2
| | | | | | | | | | | | | | | | from him since he did most of the hard work on it. when marco added the sensor for logical disks he added some extra bits to the softc, but inside an #if NBIO > 0 block. NBIO is set by "bio.h" which was included in ami.c, but not in ami_pci.c which is what is actually responsible for getting the softc allocated. because of this the softc in the rest of the system was smaller than what ami.c needed, so technically it was using unallocated memory. in krws case that unallocated space was filled with garbage, hence his panic. the moral of this story is do NOT put #if inside structs that are passed between different source files. its too easy to have this kind of screwup happen.
* Display logical disk status in sysctl. Now one can use sensorsd tomarco2006-04-181-1/+6
| | | | | | | monitor disks on ami. Ex.: hw.sensors.0=sd2, logical disk, WARNING, drive, degraded Requested deraadt@ ok dlg@
* we never use what the ccb completion functions return, so make them alldlg2006-03-291-2/+2
| | | | return void instead.
* finer grained use of splbio in the ioctl paths. only use it when dealingdlg2006-03-201-2/+3
| | | | | | | | | | with the ccb queues rather than over the whole ioctl. also get rid of the CMD_WAIT flag which is used to restrict the ioctl to only one caller at a time. this is actually protecting from overuse of ccbs for management tasks (like bioctl) by making sure the scsi paths will always have their ccbs. replace the flag with a real lock so that callers can sleep till the mgmt ccb is free, rather than returning EBUSY
* shrink the ccb even more. instead of having a "wakeup" member to say whendlg2006-03-201-4/+2
| | | | | the ioctl paths can wake up, check the state of the ccb instead. when the ccb becomes READY again then the command has completed.
* remove the bits in the ccb for generalised handling of dmaable memory.dlg2006-03-201-9/+2
| | | | | | now that each code path that puts commands on the hardware has specific completion routines, we dont have to deal with the memory magic in a generic fashion.
* this is a really large reworking of how ami works in terms of submittingdlg2006-03-191-3/+5
| | | | | | | | | | | | | | | | | commands to the hardware and completing them. previously the driver was very engineered toward moving io from the logical disks scsi commands onto the hardware and off. as we built extra functionality into the driver, this path grew more and more hairy as bits were tacked on to cope. this strips it back to dealing with getting the command onto the hardware and off again. each path that submits commands now has to do all its work before submitting the ccb, and supply a function for completing the ccb. both the async and polled paths call the completion routines for commands now. async commands that fail to get onto the hardware first go are stuck on a queue and retried out of a timeout. previously this was only done for scsi commands, now all paths take advantage of it.
* split the completion path up. its now the responsibility of the the pathdlg2006-03-171-1/+3
| | | | | | | that sets the command up to say how its should be completed. this means we dont have to complicate a generic handler to cope with all the different setup paths. however, at the moment we're using the generic complicated one :)
* remove the last remnants of AMI_POLLINGdlg2006-03-171-2/+1
|
* use consistent naming for members of the softc structdlg2005-12-131-4/+4
|
* knfdlg2005-12-121-3/+3
|
* another go at cleaning up bus_dma usage.dlg2005-12-101-4/+14
| | | | | | | | | | | | | | | when you're using the bus dma api like we are, there are two bus_dma_segment_t's involved, one for the pa stuff and one for the dva stuff. we set this up ok in ami_allocmem, but then we forget half of it when we return from that function. even worse, we assume theyre the same thing in ami_freemem. this diff fixes that by wrapping all the dma bits into a struct (called struct ami_mem) and providing a few macros for accessing the useful parts of it. we just pass this struct around now instead of having to handle all the busdma bits in every function. ok marco@ jason@ krw@
* Move bus_dma from pa to dva. I wrote the initial diff with an ok from dlg@marco2005-11-261-3/+1
| | | | krw@ removed all seg references and cleaned up htole32 a bit.
* make this easier for me to read by changing the locking to use the baredlg2005-11-231-6/+1
| | | | | | spl calls rather than ami's macro wrappers for them. ok krw@ marco@
* replace the two separate dmamem allocations for the passthrough commandsdlg2005-10-021-15/+26
| | | | | | | | and the scatter gather lists with a single allocation containing both. more importantly, actually sync the appropriate parts of this allocation when giving the commands to or taking the response from the device. tested by and ok krw@
* spacingdlg2005-09-301-55/+58
|
* remove the dmamap used for iocmds since they were only copied into thedlg2005-09-301-9/+4
| | | | mbox, no dma was ever performed on them. store them in the ccb instead.
* allocate and map the mbox separately to the iocmds used by the ccbs.dlg2005-09-261-1/+4
|
* 1.82 again; dont use the scsi xfer to decide if we should dma_sync.dlg2005-09-251-1/+4
| | | | | | | | instead use generic variables in the ccb so commands not originating from the scsi layer can be handled by ami_done as well. this version does not freeze like 1.82. the secret seems to be to go ami_put_ccb before scsi_done.
* revert 1.82 and 1.83 of ami.c and 1.26 of amivar.h since it seems to bedlg2005-09-221-5/+2
| | | | causing random lockups on my machine. sigh.
* dont use the scsi xfer in ami_done to figure out if we have to sync adlg2005-09-211-2/+5
| | | | | | buffer or not. this will allow us to issue arbitrary passthrough commands without needing them to come in via ami_scsi_raw_cmd. useful for management functionality...
* remove the bits in the ccb that were needed to support scsi commands ondlg2005-09-211-7/+1
| | | | the passthrough bus when bounce buffers were used.
* allocate space in each ccb to store a passthrough commanddlg2005-09-211-1/+7
|
* replace the pointer mess used to handle wakeups on ccbs with a real flagdlg2005-09-191-2/+2
| | | | tested and ok krw@
* Don't fake MODE SENSE page 4 info inside raid drivers, just let sdkrw2005-09-151-3/+1
| | | | | | | fake a geometry. Page 4 info does not get used for size information. Eliminate now unused union scsi_disk_pages. ok marco@ mickey@ pre-lock.
* Fix some tsleep magic. Code done by krw@marco2005-08-311-4/+2
| | | | | feel free to commit, krw@ ok deraadt@
* Make ioctls stop polling for completion. This enhances the responsivenessmarco2005-08-311-1/+4
| | | | | | of the system. tested and ok krw@, dlg@, deraadt@
* unfortunately large fixes to memleaks caused by abuse of incompletedlg2005-08-301-3/+1
| | | | | | | | | | allocmem and freemem functions. freemem now unmaps dma memory from the kernel address space instead of leaking it. lots of tweaks and input from marco (who also found the bug in the first place). lots of testing by krw and marco. ok krw@ marco@ permitted by deraadt@
* Add global hot spare support.marco2005-08-151-1/+2
| | | | | | Add flag to determine controller type. ok deraadt@
* Add ses link. Tested and ok deraadt@marco2005-08-081-1/+4
|
* Add devices to structures.marco2005-08-081-1/+2
| | | | ok and help deraadt@
* Add support for SCSI pass-through commands for enclosure and processor devicesmarco2005-08-051-2/+9
| | | | | | | to expose ses(4) and safte(4) information. ok beck@, dlg@ put your ami pt diff in, deraadt@
* Redo bioctl because initial implementation was too complex.marco2005-07-291-1/+1
| | | | | tested and ok dlg@ beck@ get it in @deraadt
* revert marcos bio changes, mickey not okdlg2005-07-181-2/+1
|
* Rip out all previous bio code because it sucked. Replaced all ioctl code inmarco2005-07-181-1/+2
| | | | | | | | ami(4) and bio(4). Note that this will break trees where userland and kernel are not in sync. ok dlg@
* NBIO > 0 the bioctl code.marco2005-06-281-1/+2
| | | | | | Conditional jump to ami_ioctl() if NBIO > 0 is defined. ok deraadt@ mickey@