summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/arc.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* sizes for free(); ok sthenderaadt2015-09-101-13/+14
|
* remove the second void * argument on tasks.dlg2015-01-271-4/+4
| | | | | | | | | | | | | | | | | | | | | when workqs were introduced, we provided a second argument so you could pass a thing and some context to work on it in. there were very few things that took advantage of the second argument, so when i introduced pools i suggested removing it. since tasks were meant to replace workqs, it was requested that we keep the second argument to make porting from workqs to tasks easier. now that workqs are gone, i had a look at the use of the second argument again and found only one good use of it (vdsp(4) on sparc64 if you're interested) and a tiny handful of questionable uses. the vast majority of tasks only used a single argument. i have since modified all tasks that used two args to only use one, so now we can remove the second argument. so this is a mechanical change. all tasks only passed NULL as their second argument, so we can just remove it. ok krw@
* stash the softc in the memory allocated for setting up a task fordlg2015-01-121-9/+14
| | | | creating sensors.
* replace scsi_task(), which is a wrapper around workqs, with a quickdlg2014-09-091-5/+13
| | | | | | conversion to tasks. tested by chris@
* Some reallocarray() use; review Jean-Philippe Ouellet, patrick keshishianderaadt2014-07-131-2/+2
| | | | ok tedu
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-16/+16
| | | | after discussions with beck deraadt kettenis.
* Be conservative about the resources the controller advertises forchris2014-02-081-2/+2
| | | | | | "type D" Marvel 9580. From Ching Huang, Areca. ok dlg@
* Stop disablng/enabling interrupts in the interrupt handler forchris2014-02-081-6/+2
| | | | | | | | "chip type D" which is Marvell 9580. None of the other types do this and OpenBSD doesn't interrupt during the interrupt routine anyways. From Ching Huang, Areca. ok dlg@
* DVA should be 64 bits, so make sure it is before getting the high bits.dlg2014-01-241-2/+2
| | | | | | | the DVA macro should cast, but i am wary of the effects on all uses of it, so fixing it in the one place that needs it. fixes compiles on i386
* Manufacturer driver update for ARC-1880, 1882, 1213, 1223, 1214chris2014-01-231-286/+1301
| | | | | | Tested on a variety of Intel-IOP cards ok dlg@ henning@ "i'll ok to get this unstuck"
* Add a DVACT_WAKEUP op to the *_activate() API. This is called after thederaadt2013-12-061-12/+6
| | | | | | | | kernel resumes normal (non-cold, able to run processes, etc) operation. Previously we were relying on specific DVACT_RESUME op's in drivers creating callback/threads themselves, but that has become too common, indicating the need for a built-in mechanism. ok dlg kettenis, tested by a sufficient amount of people
* Enforce ca_activate tree-walks over the entire heirarchy for all events,deraadt2013-05-301-23/+27
| | | | | | cleaning up some shutdown-hook related code on the way. (A few drivers related to sparc are still skipped at kettenis' request) ok kettenis mlarkin, tested by many others too
* Backout a bunch of my SCSI commits from c2k11. At least one of thesematthew2011-07-171-2/+2
| | | | | | is causing problems when trying to boot sparc64 from an isp(4). Verified to fix the sparc64/isp(4) regression by krw@; ok deraadt@
* First batch of converting SCSI HBAs from setting saa_targets andmatthew2011-07-081-2/+2
| | | | | | saa_luns instead of adapter_buswidth and luns in the prototype link. ok dlg@, miod@
* Interrupt handlers should only return 1 if they did some work. Theclaudio2011-04-201-4/+5
| | | | | | | | | intrstat on arc may have other status bits set which are masked as interrupt cause and not handled by our driver. So the intrstat == 0 check does not work reliably. It is better to do use a variable that is set to 1 when work is done and the cause is cleared. This makes arc(4) behave on systems where interrupts are shared. OK deraadt@ dlg@
* remove the powerhook code. All architectures now use the ca_activate treederaadt2010-09-071-2/+2
| | | | | traversal code to suspend/resume ok oga kettenis blambert
* No "\n" needed at the end of panic() strings.krw2010-08-071-2/+2
| | | | | | | Bogus chunks pointed out by matthew@ and miod@. No cookies for marco@ and jasper@. ok deraadt@ miod@ matthew@ jasper@ macro@
* Give each device on the bus full openings.mk2010-07-181-2/+2
| | | | | | | Tested by me on an ARC-1210 on both single and multi volume configurations. ok dlg
* Provide an iopool in arc(4).mk2010-07-021-10/+8
| | | | ok dlg matthew
* Protect the ccb free list with a mutex rather than splbio().mk2010-07-021-5/+8
| | | | | | Requested by dlg when reviewing a different diff. ok dlg
* Change scsibus(4)'s scsi_link array to an SLIST to save memory onmatthew2010-07-011-3/+3
| | | | | | sparsely populated buses. ok dlg@, krw@
* Use an SLIST instead of a TAILQ for the ccb free list. Order doesn'tmk2010-06-281-7/+7
| | | | | | | | | matter, an SLIST is smaller, and the first element is more likely to be in cache. Previously we took from the head and returned to the tail, which meant that we were using the ccb that was the least recently used one which also means it has the smallest chance of being in cache. ok deraadt
* Remove all adapter-specific 'struct scsi_device's. They are never used. Firstkrw2010-06-281-6/+1
| | | | | | | | step in elminating 'struct scsi_device' entirely. Spotted and initial diff from matthew@. ok matthew@ dlg@ deraadt@ marco@ miod@
* New scsi code seems to be stable. Pluck previously identifiedkrw2010-05-201-5/+1
| | | | | | | low-hanging splbio/splx pairs that are no longer needed and see if this reveals any hidden scsi flaws. ok dlg@
* BUS_DMA_ZERO instead of alloc, map, bzero.oga2010-05-191-4/+2
| | | | ok krw@
* these files don't need to include proc.h anymore. ok oga for agptedu2010-04-081-2/+1
|
* Change the scsi_cmd function member of scsi_adapter from int tokrw2010-03-231-10/+6
| | | | | | | | | | | | | void. Use XS_NO_CCB error in the scsi command (xs) to report the NO_CCB condition. Eliminates all SUCCESSFULLY_QUEUED and COMPLETE confusion and untangles the midlayer from the adapter a bit more. Eyes and some fixes by miod@ There may be some compile issues on little used (i.e. I don't have any) drivers but the change is mechanical and thus easy to remedy. ok dlg@
* Zap all setting of ITSDONE in drivers that don't look at it. Nobodykrw2010-01-091-8/+1
| | | | | | | else cares so it's just noise. Drivers that actually look at ITSDONE are unchanged. ok marco@ (for his files) dlg@ beck@
* set ITSDONE on the xs before calling scsi_done()dlg2009-08-131-1/+5
|
* Extend the scsi_adapter minphys() callback to take a struct scsi_link *miod2009-02-161-3/+3
| | | | | | as additional argument. This will allow intermediate layers between scsi devices such as sd and scsi host adapters to take appropriate action if necessary.
* Increase the size of the diskinfo struct, which has grownjsg2008-07-171-13/+32
| | | | | | | | | | | | | 4 bytes in the new firmware. To allow this to work on older firmwares add a "short read allowed" flag to arc_msgbuf(), which will allow short reads by getting the read length from the header of the response the firmware sends. Only set the flag on the arc_msgbuf() call that deals with the diskinfo struct for now. Discussed with and ok dlg@
* Hook up the blinkenleds.jsg2008-06-271-1/+45
| | | | | | | Lets cards like the 1261ML with SGPIO sideband on Mini SAS, control locator LEDs through bioctl. ok dlg@
* wait for the marvell firmware to become ok.dlg2007-11-051-1/+16
|
* start providing function pointers to differentiate between the intel anddlg2007-11-041-15/+20
| | | | marvell boards.
* very initial foundation for splitting things up to support both thedlg2007-11-041-23/+64
| | | | traditional intel iop and the new marvell one used on the ARC-1200 rev B.
* the 1200 and 1202 shoudl work fine too.dlg2007-11-041-1/+3
|
* shrink the intr establish code a bit. all that intrstr handling is cruft.dlg2007-10-301-7/+3
|
* the marvell based boards have difference registers to the current intel iopdlg2007-10-301-106/+108
| | | | | | based ones. this renames the register defines for the revision A boards (the intel ones) to ARC_RA instead of ARC_REG so we can differentiate them from the ARC_RB registers for revision B that are coming.
* if we cant query the firmware or allocate ccbs then clean up the pcidlg2007-10-301-3/+14
| | | | | mappings. without this a problem board can cause a panic when the interrupt handler touches unallocated memory.
* the arc fimware can be configured with a password that is used todlg2007-10-271-4/+9
| | | | | | | | | | | | | restrict changes to its configuration. in our case we want to be able to disable or enable the alarm. if a password is set though, the firmware will reject that request with a PASSWORD_REQUIRED response code. this change lets the kernel return EPERM instead of EIO in that case. if you dont have a password set on the firmware you can configure the alarm just fine. makes sense claudio@
* arc supports more than just SATA hbas, so dont say the ports are alwaysdlg2007-10-221-2/+2
| | | | | SATA ports. print "firmware" instead of "FW Version:" cos i think it looks better. tested on a 1680 which seems to just work so far.
* More easy bzero() -> M_ZERO. Use 'p = malloc(sizeof(*p) ...' wherekrw2007-10-011-7/+4
| | | | obvious.
* Use the full 64 bits available when reporting sizes; now bioctl showsotto2007-07-111-6/+13
| | | | | the correct size for my 4.TB volume. Original diff from dlg@ with some tweaks by me; ok dlg@
* rework sensor tasks to use the kernels generic workq rather than a specialdlg2007-06-241-2/+2
| | | | | | | | | kernel thread of its own. the api has changed (which will be fixed in the manpage shortly) so all the users of sensor tasks that i can find have been fixed too. noone tested, so its going in to force people to run with it. "put it in" deraadt@
* sprinkle some SMALL_KERNEL to permit bio/softraid to run on boot mediatodd2007-05-291-1/+7
| | | | ok marco@ then suggested deraadt@
* Add missing arguments to printf.ray2007-05-201-8/+9
| | | | OK tedu@, dlg@.
* more grammar fixups; from bret lambert and myselfjmc2007-03-271-4/+4
|
* grammar from bret lambert, and one more from me;jmc2007-03-271-2/+2
|
* split userland & kernel struct sensor/sensordev so that the additionderaadt2007-03-221-5/+5
| | | | | | 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
* No use checking malloc return when called with M_WAITOK.thib2007-02-201-39/+1
| | | | ok dlg@, tested by jolan@