summaryrefslogtreecommitdiff
path: root/sys/dev/mcd
AgeCommit message (Collapse)Author
2016-08-15Remove the mcd(4) driver for Mitsumi CD-ROM players.John Baldwin
This is a driver for a pre-ATAPI ISA CD-ROM adapter. As noted in the manpage, this driver is only useful as a backend to cdcontrol to play audio CDs since it doesn't use DMA, so its data performance is "abysmal" (and that was true in the mid 90's). Notes: svn path=/head/; revision=304187
2016-04-26sys/dev: extend use of the howmany() macro when available.Pedro F. Giffuni
We have a howmany() macro in the <sys/param.h> header that is convenient to re-use as it makes things easier to read. Notes: svn path=/head/; revision=298646
2014-11-18Add locking to mcd(4) and mark MPSAFE.John Baldwin
- Actually use existing per-softc mutex. - Use mutex in cdev routines and remove D_NEEDGIANT. - Use callout(9) instead of timeout(9). - Don't check for impossible conditions (e.g. MCDINIT being clear). - Remove critical_enter/exit when sending a PIO command. - Use bus_*() instead of bus_space_*(). Tested by: no one Notes: svn path=/head/; revision=274676
2013-12-29In sys/dev/mcd/mcd.c, mark the static const COPYRIGHT string as __used,Dimitry Andric
so it ends up in the object file, and no warnings are emitted about it being actually unused. MFC after: 3 days Notes: svn path=/head/; revision=260040
2013-02-21The other giant locked storage drivers have removed splbio(), for theWarner Losh
most part, so remove it here too. Anybody locking this driver will need far more than locks where splbio() were, so remove these nops. Notes: svn path=/head/; revision=247069
2005-05-29Remove bus_{mem,p}io.h and related code for a micro-optimization on i386Yoshihiro Takahashi
and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr) Notes: svn path=/head/; revision=146734
2005-03-02netchild's mega-patch to isolate compiler dependencies into a centralJoerg Wunsch
place. This moves the dependency on GCC's and other compiler's features into the central sys/cdefs.h file, while the individual source files can then refer to #ifdef __COMPILER_FEATURE_FOO where they by now used to refer to #if __GNUC__ > 3.1415 && __BARC__ <= 42. By now, GCC and ICC (the Intel compiler) have been actively tested on IA32 platforms by netchild. Extension to other compilers is supposed to be possible, of course. Submitted by: netchild Reviewed by: various developers on arch@, some time ago Notes: svn path=/head/; revision=143063
2005-01-30o Fix a typo.Maxim Konovalov
Submitted by: Niclas Zeising Notes: svn path=/head/; revision=141061
2005-01-30Boot away another stackgap (one of the lest ones in linuxlator/i386) byMaxim Sobolev
providing special version of CDIOCREADSUBCHANNEL ioctl(), which assumes that result has to be placed into kernel space not user space. In the long run more generic solution has to be designed WRT emulating various ioctl()s that operate on userspace buffers, but right now there is only one such ioctl() is emulated, so that it makes little sense. MFC after: 2 weeks Notes: svn path=/head/; revision=141031
2005-01-06Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh
Notes: svn path=/head/; revision=139749
2004-10-29No point in setting si_bsize_phys anymore, nobody reads it.Poul-Henning Kamp
Use bioq_takefirst(). Notes: svn path=/head/; revision=137045
2004-06-16Do the dreaded s/dev_t/struct cdev */Poul-Henning Kamp
Bump __FreeBSD_version accordingly. Notes: svn path=/head/; revision=130585
2004-03-17Convert callers to the new bus_alloc_resource_any(9) API.Nate Lawson
Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde Notes: svn path=/head/; revision=127135
2004-03-12These are changes to allow to use the Intel C/C++ compiler (lang/icc)Tom Rhodes
to build the kernel. It doesn't affect the operation if gcc. Most of the changes are just adding __INTEL_COMPILER to #ifdef's, as icc v8 may define __GNUC__ some parts may look strange but are necessary. Additional changes: - in_cksum.[ch]: * use a generic C version instead of the assembly version in the !gcc case (ASM code breaks with the optimizations icc does) -> no bad checksums with an icc compiled kernel Help from: andre, grehan, das Stolen from: alpha version via ppc version The entire checksum code should IMHO be replaced with the DragonFly version (because it isn't guaranteed future revisions of gcc will include similar optimizations) as in: ---snip--- Revision Changes Path 1.12 +1 -0 src/sys/conf/files.i386 1.4 +142 -558 src/sys/i386/i386/in_cksum.c 1.5 +33 -69 src/sys/i386/include/in_cksum.h 1.5 +2 -0 src/sys/netinet/igmp.c 1.6 +0 -1 src/sys/netinet/in.h 1.6 +2 -0 src/sys/netinet/ip_icmp.c 1.4 +3 -4 src/contrib/ipfilter/ip_compat.h 1.3 +1 -2 src/sbin/natd/icmp.c 1.4 +0 -1 src/sbin/natd/natd.c 1.48 +1 -0 src/sys/conf/files 1.2 +0 -1 src/sys/conf/files.amd64 1.13 +0 -1 src/sys/conf/files.i386 1.5 +0 -1 src/sys/conf/files.pc98 1.7 +1 -1 src/sys/contrib/ipfilter/netinet/fil.c 1.10 +2 -3 src/sys/contrib/ipfilter/netinet/ip_compat.h 1.10 +1 -1 src/sys/contrib/ipfilter/netinet/ip_fil.c 1.7 +1 -1 src/sys/dev/netif/txp/if_txp.c 1.7 +1 -1 src/sys/net/ip_mroute/ip_mroute.c 1.7 +1 -2 src/sys/net/ipfw/ip_fw2.c 1.6 +1 -2 src/sys/netinet/igmp.c 1.4 +158 -116 src/sys/netinet/in_cksum.c 1.6 +1 -1 src/sys/netinet/ip_gre.c 1.7 +1 -2 src/sys/netinet/ip_icmp.c 1.10 +1 -1 src/sys/netinet/ip_input.c 1.10 +1 -2 src/sys/netinet/ip_output.c 1.13 +1 -2 src/sys/netinet/tcp_input.c 1.9 +1 -2 src/sys/netinet/tcp_output.c 1.10 +1 -1 src/sys/netinet/tcp_subr.c 1.10 +1 -1 src/sys/netinet/tcp_syncache.c 1.9 +1 -2 src/sys/netinet/udp_usrreq.c 1.5 +1 -2 src/sys/netinet6/ipsec.c 1.5 +1 -2 src/sys/netproto/ipsec/ipsec.c 1.5 +1 -1 src/sys/netproto/ipsec/ipsec_input.c 1.4 +1 -2 src/sys/netproto/ipsec/ipsec_output.c and finally remove sys/i386/i386 in_cksum.c sys/i386/include in_cksum.h ---snip--- - endian.h: * DTRT in C++ mode - quad.h: * we don't use gcc v1 anymore, remove support for it Suggested by: bde (long ago) - assym.h: * avoid zero-length arrays (remove dependency on a gcc specific feature) This change changes the contents of the object file, but as it's only used to generate some values for a header, and the generator knows how to handle this, there's no impact in the gcc case. Explained by: bde Submitted by: Marius Strobl <marius@alchemy.franken.de> - aicasm.c: * minor change to teach it about the way icc spells "-nostdinc" Not approved by: gibbs (no reply to my mail) - bump __FreeBSD_version (lang/icc needs to know about the changes) Incarnations of this patch survive gcc compiles since a loooong time, I use it on my desktop. An icc compiled kernel works since Nov. 2003 (exceptions: snd_* if used as modules), it survives a build of the entire ports collection with icc. Parts of this commit contains suggestions or submissions from Marius Strobl <marius@alchemy.franken.de>. Reviewed by: -arch Submitted by: netchild Notes: svn path=/head/; revision=126891
2004-02-21Device megapatch 4/6:Poul-Henning Kamp
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. Notes: svn path=/head/; revision=126080
2004-02-21Device megapatch 1/6:Poul-Henning Kamp
Free approx 86 major numbers with a mostly automatically generated patch. A number of strategic drivers have been left behind by caution, and a few because they still (ab)use their major number. Notes: svn path=/head/; revision=126076
2003-10-18Discontinue bio_blkno, use bio_offset instead.Poul-Henning Kamp
Notes: svn path=/head/; revision=121212
2003-08-24Use __FBSDID().David E. O'Brien
Also some minor style cleanups. Notes: svn path=/head/; revision=119418
2003-05-31Fix \ alignment in macro.Poul-Henning Kamp
Remove breaks after return. Remove unused variable. Found by: FlexeLint Notes: svn path=/head/; revision=115477
2003-04-16Don't include <sys/disklabel.h>Poul-Henning Kamp
Notes: svn path=/head/; revision=113581
2003-04-01Use bioq_flush() to drain a bio queue with a specific error code.Poul-Henning Kamp
Retain the mistake of not updating the devstat API for now. Spell bioq_disksort() consistently with the remaining bioq_*(). #include <geom/geom_disk.h> where this is more appropriate. Notes: svn path=/head/; revision=112946
2003-03-03Gigacommit to improve device-driver source compatibility betweenPoul-Henning Kamp
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
2003-03-02NO_GEOM cleanup:Poul-Henning Kamp
mcdsize() is not a cdevsw->d_psize function (any more ?) so rename it, give it a better prototype to avoid misusing d_psize_t. Notes: svn path=/head/; revision=111731
2002-11-10Replace {disable,enable}_intr() with critical_{enter,exit}().Matthew N. Dodd
Notes: svn path=/head/; revision=106719
2002-11-06Whitespace, style fixes.Matthew N. Dodd
Notes: svn path=/head/; revision=106490
2002-10-16Be consistent about functions being static.Poul-Henning Kamp
Spotted by: FlexeLint. Notes: svn path=/head/; revision=105215
2002-10-06INclude <sys/mutex.h>'s prerequisite <sys/lock.h> instead of depending onBruce Evans
namespace pollution 2 layers deep in <sys/eventhandler.h>. Notes: svn path=/head/; revision=104547
2002-10-06Make this work under GEOM.Matthew N. Dodd
Notes: svn path=/head/; revision=104545
2002-10-05NB: This commit does *NOT* make GEOM the default in FreeBSDPoul-Henning Kamp
NB: But it will enable it in all kernels not having options "NO_GEOM" Put the GEOM related options into the intended order. Add "options NO_GEOM" to all kernel configs apart from NOTES. In some order of controlled fashion, the NO_GEOM options will be removed, architecture by architecture in the coming days. There are currently three known issues which may force people to need the NO_GEOM option: boot0cfg/fdisk: Tries to update the MBR while it is being used to control slices. GEOM does not allow this as a direct operation. SCSI floppy drives: Appearantly the scsi-da driver return "EBUSY" if no media is inserted. This is wrong, it should return ENXIO. PC98: It is unclear if GEOM correctly recognizes all variants of PC98 disklabels. (Help Wanted! I have neither docs nor HW) These issues are all being worked. Sponsored by: DARPA & NAI Labs. Notes: svn path=/head/; revision=104519
2002-10-04newbus & bus_space the mcd(4) driver.Matthew N. Dodd
Notes: svn path=/head/; revision=104445
2002-10-04Minor style(9) changes.Matthew N. Dodd
Notes: svn path=/head/; revision=104441
2002-10-04Remove duplicate calls to make_dev().Matthew N. Dodd
Notes: svn path=/head/; revision=104440
2002-09-30If GEOM is in the kernel, take these three out. I have no way ofPoul-Henning Kamp
testing any modifications to them, they shouldn't even bother with disklabels in the first place and they are just plain obsolete old hardware which should be axed entirely before 5.0-R IMO. Sponsored by: DARPA & NAI Labs. Notes: svn path=/head/; revision=104210
2002-04-02Retire the bogus ioctl DIOCGPART in toto.Poul-Henning Kamp
Once again we can notice that badly thought out hacks ferment and infect far more code than initially expected. Sponsored by: DARPA and NAI Labs. Notes: svn path=/head/; revision=93657
2001-11-04Don't call cdevsw_add().Poul-Henning Kamp
Notes: svn path=/head/; revision=86011
2001-09-12KSE Milestone 2Julian Elischer
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
2001-03-26Send the remains (such as I have located) of "block major numbers" toPoul-Henning Kamp
the bit-bucket. Notes: svn path=/head/; revision=74810
2000-10-15Remove unneeded #include <machine/clock.h>Poul-Henning Kamp
Notes: svn path=/head/; revision=67164
2000-05-28Mass update of isa drivers using compatability shims to usePeter Wemm
COMPAT_ISA_DRIVER() so that we can get rid of the evil isa_compat.h table. Notes: svn path=/head/; revision=61011
2000-05-05Separate the struct bio related stuff out of <sys/buf.h> intoPoul-Henning Kamp
<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
2000-04-15Complete the bio/buf divorce for all code below devfs::strategyPoul-Henning Kamp
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
2000-04-02Move B_ERROR flag to b_ioflags and call it BIO_ERROR.Poul-Henning Kamp
(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
2000-03-20Remove B_READ, B_WRITE and B_FREEBUF and replace them with a newPoul-Henning Kamp
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
2000-01-29Remove a bunch of unused (NO-OP) #if NFOO > 0 type includes and somePeter Wemm
#include "foo.h" headers. Notes: svn path=/head/; revision=56845
1999-09-25Remove five now unused fields from struct cdevsw. They should neverPoul-Henning Kamp
have been there in the first place. A GENERIC kernel shrinks almost 1k. Add a slightly different safetybelt under nostop for tty drivers. Add some missing FreeBSD tags Notes: svn path=/head/; revision=51658
1999-09-20Trying to set BAD144 handling on a CD is sufficiently "Dont Do ThatPoul-Henning Kamp
then" that we don't need to give the ioctl special treatment. Notes: svn path=/head/; revision=51468
1999-09-09Changes to centralise the default blocksize behaviour.Julian Elischer
More likely to follow. Submitted by: phk@freebsd.org Notes: svn path=/head/; revision=51111
1999-09-01Set si_bsize_phys and si_bsize_max in all legacy CD drivers.Poul-Henning Kamp
Notes: svn path=/head/; revision=50748
1999-08-28$Id$ -> $FreeBSD$Peter Wemm
Notes: svn path=/head/; revision=50477
1999-08-23Convert DEVFS hooks in (most) drivers to make_dev().Poul-Henning Kamp
Diskslice/label code not yet handled. Vinum, i4b, alpha, pc98 not dealt with (left to respective Maintainers) Add the correct hook for devfs to kern_conf.c The net result of this excercise is that a lot less files depends on DEVFS, and devtoname() gets more sensible output in many cases. A few drivers had minor additional cleanups performed relating to cdevsw registration. A few drivers don't register a cdevsw{} anymore, but only use make_dev(). Notes: svn path=/head/; revision=50254