summaryrefslogtreecommitdiff
path: root/sys/dev/ic/ciss.c
AgeCommit message (Collapse)Author
2011-11-10Death to inappropriate whitespace. First one pointed out by Brad.Kenneth R Westerback
2011-07-17Backout a bunch of my SCSI commits from c2k11. At least one of theseMatthew Dempsky
is causing problems when trying to boot sparc64 from an isp(4). Verified to fix the sparc64/isp(4) regression by krw@; ok deraadt@
2011-07-08First batch of converting SCSI HBAs from setting saa_targets andMatthew Dempsky
saa_luns instead of adapter_buswidth and luns in the prototype link. ok dlg@, miod@
2011-04-05- use nitems() no binary change on amd64Jasper Lievisse Adriaanse
"reads OK" claudio@
2010-09-20Use SSD_ERRCODE_CURRENT instead of magic 0x70.Kenneth R Westerback
ok dlg@ matthew@
2010-09-20bus_dmamap_sync was using xs->flags to determine which directionDavid Gwynne
to sync the map. unfortunately xs is not set for internal ciss commands, so this is a null deref. it wasnt until kettenis made bus_dmamap_sync a real function which needed its arguments evaluated that this became a real problem though. hit by mcbride@ and sakurai-san. fixed by krw@ over my shoulder when we figured out which specific chunk of code was faulting. tested by sakurai-san ok krw@ deraadt@
2010-07-07set each disks openings to the maximum number the controller can handle.David Gwynne
iopools make sure resources arent overallocated, while scheduling them evenly between devices. tested by and ok jsg@
2010-07-02Make the sensor setup loop less awkward by moving the call toMatthew Dempsky
sensor_attach() out of the for loop header. ok marco@
2010-07-01compile when SMALL_KERNEL is setTheo de Raadt
2010-07-01Change scsibus(4)'s scsi_link array to an SLIST to save memory onMatthew Dempsky
sparsely populated buses. ok dlg@, krw@
2010-06-28Remove all adapter-specific 'struct scsi_device's. They are never used. FirstKenneth R Westerback
step in elminating 'struct scsi_device' entirely. Spotted and initial diff from matthew@. ok matthew@ dlg@ deraadt@ marco@ miod@
2010-06-26If you put CISS_LOCK()/CISS_UNLOCK() around a switch statement, youKenneth R Westerback
must break out of the cases, not directly 'return' error codes. I think the error case is currently impossible, but why leave an armed bear trap lying about?
2010-06-15dont pass the dev_t from the scsi device drivers into the midlayer forDavid Gwynne
ioctl requests, and dont pass the proc pointers around for any ioctl requests in scsi land at all. neither were used, so trim the fat. ok krw@ marco@
2010-06-03get rid of the kthread. it is unused and just bloats the kernel.David Gwynne
pointed out by brad.
2010-06-03replace TAILQs with SLISTs for managing the ccb free list. theyre smaller.David Gwynne
2010-06-03useless abstraction is, by definition, useless.David Gwynne
dont typedef the tailq head struct.
2010-06-02convert ciss(4) over to using iopools. this is fairly easy after the recentDavid Gwynne
tweaks ive made. this provides better concurrent access to multiple volumes on the same hba, while improving the reliability of the ioctl and sensor codepaths. tested by okan@ halex@ ok krw@ okan@ halex@
2010-06-02its pretty obvious that ciss_cmd should be called with splbio being held,David Gwynne
especially if you're passing it SCSI_POLL too.
2010-06-02call scsi_done before put_ccb, rather than have put_ccb call scsi_doneDavid Gwynne
for us.
2010-06-02push the "locking" in ciss_scsi_cmd down. we dont need splbio to callDavid Gwynne
scsi_done or to get or put ccbs anymore.
2010-06-02protect the ccb free queue with its own mutexDavid Gwynne
2010-06-02get rid of useless ccb queues. when the ccb is on the chip, we mark itsDavid Gwynne
state as such, putting it on a queue is silly. one of the queues was initted by never used.
2010-06-02get rid of the code for the passthru bus support. it was never enabled andDavid Gwynne
confuses the code and bloats the kernel.
2010-06-02interrupt handlers are run at their IPL, so there's no need to go splbioDavid Gwynne
in a disk controllers handler, even if it has a useless bunch of macros around it.
2010-05-31do not immediately panic if we find a non-increasing heartbeat counter butAlexander Hall
keep count for at least 33 seconds. then panic. ok marco@, moral support johan@
2010-05-19BUS_DMA_ZERO instead of alloc, map, bzero.Owain Ainsworth
ok krw@
2010-03-23Change the scsi_cmd function member of scsi_adapter from int toKenneth R Westerback
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@
2010-01-09Zap all setting of ITSDONE in drivers that don't look at it. NobodyKenneth R Westerback
else cares so it's just noise. Drivers that actually look at ITSDONE are unchanged. ok marco@ (for his files) dlg@ beck@
2010-01-09Avoid mulitple calls to scsi_done() on the same xs by havingKenneth R Westerback
ciss_cmd() call scsi_done() in the one case where ciss_done() was not calling ciss_done() before erroring out, and not calling scsi_done() after ciss_cmd() errors out. Okan's box can now boot. And work fine afterwards. Tested by okan@. ok dlg@ beck@
2010-01-07dont use the xs in the scsi_cmd routines after calling ciss_cmd, it mightDavid Gwynne
have been completed. the xs was used to figure out if we should return COMPLETED or SUCCESFULLY_QUEUED. the return value doesnt mean anything anymore, so just return COMPLETE.
2010-01-07CISS_UNLOCK before returning from the scsi_cmd handler when we hit NO_CCB.David Gwynne
this should solve problems like this: WARNING: SPL NOT LOWERED ON SYSCALL 16384 8 EXIT dae4560 6 Stopped at Xsyscall+0x1eb: movl $0,%gs:0x3d4 ddb{3}>
2009-12-17Initialize ccb_xs to NULL when taking a ccb off the free list. ThisKenneth R Westerback
prevents calling xs->done() for internal commands that don't have an xs associated with them. In turn, this prevents crashes when calling ciss_sync(), e.g. when rebooting. Reported on misc@ by Peter Huncar. Prodded by kettenis@, halex@ and johan@. Fix tested by halex@.
2009-11-15Move ciss(4) to NO_CCB. Add some extra paranoia by always testingKenneth R Westerback
the results of attempting to get a ccb. Eliminates manual reservation of ccb's for bioctl and sensors. Tested by johan@ and okan@. Eyes from brad@, dlg@ and marco@. tech@ did its Thomas More thing.
2009-04-29Implement the 64bit FIFO modes (based on the OpenCISS SpecificationReyk Floeter
1.06). It is required to run ciss(4) with amd64 bigmem, even when using the iommu. Tested by many on 32bit and 64bit low- and bigmem systems With feedback from mk@ deraadt@
2009-02-16Extend the scsi_adapter minphys() callback to take a struct scsi_link *Miod Vallat
as additional argument. This will allow intermediate layers between scsi devices such as sd and scsi host adapters to take appropriate action if necessary.
2008-11-10remove unused variable 'error' from two functions; llvm/clang; ok dlgConstantine A. Murenin
2008-09-10Convert timeout_add() calls using multiples of hz to timeout_add_sec()Bret Lambert
Really just the low-hanging fruit of (hopefully) forthcoming timeout conversions. ok art@, krw@
2008-04-24some ciss(4) firmwares use different physical drive addressing, resultingJakob Schlyter
in bioctl(8) functions not available; pr#5682. code from mickey. tested by several people. ok dlg@ krw@
2007-10-20Call scsi_done() at SPLBIO. 'looks olright' says mickey.Kenneth R Westerback
2007-09-18Only the most obvious bzero() -> M_ZERO changes. No cast changes, noKenneth R Westerback
MALLOC/FREE, etc. Just adding M_ZERO to malloc() and deleting an immediately adjacent bzero().
2007-06-24rework sensor tasks to use the kernels generic workq rather than a specialDavid Gwynne
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@
2007-05-29sprinkle some SMALL_KERNEL to permit bio/softraid to run on boot mediaTodd T. Fries
ok marco@ then suggested deraadt@
2007-03-22split userland & kernel struct sensor/sensordev so that the additionTheo de Raadt
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
2007-01-18do not freak out if cannot map physdrives into volumes and handle it proper ↵Michael Shalayeff
everywhere
2006-12-23adapt to new two-level sensor api; Constantine A. MureninTheo de Raadt
2006-11-28give scsi controllers a real attach args to fill in when attaching scsibus.David Gwynne
ok miod@ marco@ deraadt@
2006-09-15Reserve some commands slot for bioctl/sensorsd so ciss doesn't crashKenneth R Westerback
under load when bioctl/sensorsd are active. Better fix post-4.0. Problem found, fix tested by Johan Mson Lindman. ok dlg@ marco@ mickey@ deraadt@
2006-08-31ciss can't do bio ioctl's when >1 logical device is defined. Bail outKenneth R Westerback
of ciss_ioctl if >1 logical device is present. Fixes dereferencing of uninitialized pointer. From mickey@ ok deraadt@
2006-08-28make a define for dealing w/ the big bit (0x80); no func changeMichael Shalayeff
2006-08-28properly detect failed drives and do not crash bioctl; krw@ testingMichael Shalayeff