summaryrefslogtreecommitdiffstats
path: root/sys/dev/asr/asr.c
Commit message (Collapse)AuthorAgeFilesLines
* - Set the CAM status to CAM_SCSI_STATUS_ERROR rather than CAM_REQ_CMPmarius2004-08-021-11/+8
| | | | | | | | | | | | | | in case of a CHECK CONDITION. - Make this driver return SCSI status information. - While here, factor out the clearing of the CAM status from every element of the switch statement to only once before the switch. This fixes burning CDs with recent cdrecord 2.01 alpha versions and burners attached to asr(4) controllers but there could have been other applications and da(4) etc. also affected. Reviewed by: gibbs, scottl MFC after: 2 weeks
* Do the dreaded s/dev_t/struct cdev */phk2004-06-161-7/+7
| | | | Bump __FreeBSD_version accordingly.
* Add missing <sys/module.h> includesphk2004-05-301-0/+1
|
* Update the version history in the driver to note everything that has happenedscottl2004-05-051-5/+10
| | | | over the last three weeks.
* Roto-till the ioctl code. Remove all the groping around in the x86 BIOSscottl2004-05-051-109/+10
| | | | | | | segment, remove the groping around in the Option ROM segments, remove the bogus tests for bcopy vs. copyout. There really is no reason for a management app to know these things other than to create l33t info tables for the user.
* Convert the asr driver to use the bus_space API. This does not representscottl2004-05-051-89/+151
| | | | | | a significant functional change, but it further cleans up the code and brings it closer to being portable. Thanks to Don Bowman for helping to test this.
* Fix a typo from rev 1.56 that somehow escaped my testing.scottl2004-05-041-10/+10
|
* Remove the static reservation of the asr major numberscottl2004-05-021-2/+0
|
* Remove the defAlignLong and getAlignLong macros. I guess that the originalscottl2004-05-021-103/+91
| | | | | | | intent was to make sure that message structs allocated off of the stack were 4-byte aligned. However, the macros as defined did absolutely nothing. And since I2O forces you to manually copy messages down to the hardware, there really is no point of enforced alignment anyways.
* Remove the bogus printing of the asr control device major number. Alsoscottl2004-05-021-2/+1
| | | | | | | rename the control device from rasr%d to asr%d. This starts us down the path of divorcing ourselves from a very bogus design in the management apps. Since the apps are open source now, they will likely be updated and fixed before 5.3.
* Correctly test *Reply_Ptr in ASR_resetIOP(). Thanks to dhartmei for pointingscottl2004-05-011-1/+1
| | | | this out.
* Re-indent some silly sub-blocks in asr_attach().scottl2004-05-011-147/+129
|
* Remove ASR_get_sc() and reference the softc in the dev_t. For some nefariousscottl2004-05-011-23/+8
| | | | | reason, the I2O protocol requires knowledge of all I2O devices in the system, so we can't get rid of the evil linked-list of softc's yet.
* Remove the DOMINO and MODE0 device attachments. They never did anything.scottl2004-05-011-128/+20
| | | | Remove a bunch of obfuscating macros.
* More whitespace style cleanups, also remove unneeded (void *) casts for bzero().scottl2004-05-011-33/+30
|
* Many more style cleanups. Switch complex macros to being inline functions.scottl2004-05-011-150/+139
| | | | | | Put @includes in a better spot. Fix many cases of 2 space indents and spaces between a function name and the parens. Use KASSERT instead of a home-rolled ASSERT. Remove some undeeded caddr casts.
* Get rid of a bunch of useless macros. STATIC becomes static, INLINE becomesscottl2004-05-011-367/+227
| | | | | __inline where appropriate and gets nuked elsewhere, IN/OUT/INOUT go away. Reformat code affected by this.
* Fix the build. opt_asr.h is gone.njl2004-04-221-1/+0
| | | | Beer or equivalent to? njl
* Remove more sead code.scottl2004-04-211-91/+2
|
* Don't indent preprocessor tokens.scottl2004-04-211-70/+70
|
* Remove ASR_MEASURE_PERFORMANCE. It hasn't been able to compile in severalscottl2004-04-211-354/+0
| | | | years.
* Use offsetof() instead of hand-rolling something equivalent.scottl2004-04-211-1/+1
|
* Remove all of the old __FreeBSD_version code that provided FreeBSD 2.2.x andscottl2004-04-211-236/+0
| | | | 3.x shims.
* Begin the slow, painful process of cleaning up asr. This eliminates many of thescottl2004-04-211-91/+68
| | | | bogus casts of NULL. It also distracts me while I procrastinate on useful work.
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-2/+2
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Device megapatch 4/6:phk2004-02-211-0/+2
| | | | | | | | Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
* Remove code previously under #ifdef ASR_VERY_BROKENphk2003-09-261-42/+0
| | | | Ok'ed by: scottl
* Use PCIR_BAR(x) instead of PCIR_MAPS.jhb2003-09-021-8/+6
| | | | | Glanced over by: imp, gibbs Tested by: i386 LINT
* Use __FBSDID().obrien2003-08-241-3/+4
| | | | Also some minor style cleanups.
* Prefer new location of pci include files (which have only been in theimp2003-08-221-2/+2
| | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
* Include <sys/ioccom.h> instead of <sys/disklabel.h>phk2003-04-161-1/+1
|
* Gigacommit to improve device-driver source compatibility betweenphk2003-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)
* More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).des2003-03-021-3/+3
|
* <machine/vmparam.h> is the right place to get KERNBASE, so don't specialobrien2003-02-241-1/+1
| | | | platform case it (or use alternate spellings).
* Back out M_* changes, per decision of the TRB.imp2003-02-191-19/+19
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-19/+19
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,schweikh2003-01-011-1/+1
| | | | especially in troff files.
* Use UID_ and GID_ constants instead of hard-coded numeric valuesrwatson2002-12-271-1/+2
| | | | | | | | | with make_dev(). Use OPERATOR instead of implicit WHEEL to match other storage devices. Use a mode of 0640 to be consistent with other storage devices. Submitted by: kris Reviewed by: scottl
* Use a bandaid to fix a warning. However, this driver is very, very farjhb2002-11-061-1/+1
| | | | | | | | | from being MI in any fashion. It currently "assumes" that it can get a kernel virtual address for a phyiscal address by adding KERNBASE to the physical address. It also tries to read values out of a the PC BIOS on all archs. It also uses "manual" inb() and outb()'s to talk to the mcclock device which just happens to be at that location on both i386 and alpha. This driver should likely be i386-only.
* Replace (ab)uses of "NULL" where "0" is really meant.archie2002-08-221-1/+1
|
* `unexpand -a' should be run _before_ sed 's/^#define /#define^I/g'.obrien2002-05-141-61/+61
|
* Tighten up the defined()'s.obrien2002-05-141-3/+3
|
* unexpand -a everythingobrien2002-05-141-3979/+3979
|
* First pass of style(9) for #define's.obrien2002-05-141-60/+60
|
* Change the suser() API to take advantage of td_ucred as well as do ajhb2002-04-011-1/+1
| | | | | | | | | | | | general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes a thread pointer as its only argument. The td_ucred member of this thread must be valid so the only valid thread pointers are curthread and a few kernel threads such as thread0. The suser_cred() function takes a pointer to a struct ucred as its first argument and an integer flag as its second argument. The flag is currently only used for the PRISON_ROOT flag. Discussed on: smp@
* Remove erronious destroy_dev. Not sure what the author's intent was herealfred2002-04-011-1/+0
| | | | | | but this makes the driver not panic my -current box. Approved by: scottl
* Remove __P.alfred2002-03-201-32/+32
|
* If we're going to ifdef out the only reference to asr_drvinit, thenimp2002-02-261-1/+1
| | | | go ahead and ifdef out the function too.
* Convert C++ style comments to proper C ones.obrien2001-12-131-11/+12
| | | | | Clean up C comments just a tad. Fix ID's.
* Put a Band-Aid over the asr driver so that it hopefully won't causescottl2001-10-301-0/+2
| | | | panics until the author comes up with a real fix.
OpenPOWER on IntegriCloud