mcd.c (47625) | mcd.c (47640) |
---|---|
1/* 2 * Copyright 1993 by Holger Veit (data part) 3 * Copyright 1993 by Brian Moore (audio part) 4 * Changes Copyright 1993 by Gary Clark II 5 * Changes Copyright (C) 1994-1995 by Andrey A. Chernov, Moscow, Russia 6 * 7 * Rewrote probe routine to work on newer Mitsumi drives. 8 * Additional changes (C) 1994 by Jordan K. Hubbard --- 26 unchanged lines hidden (view full) --- 35 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 36 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 37 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 38 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 39 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 40 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 41 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 42 * | 1/* 2 * Copyright 1993 by Holger Veit (data part) 3 * Copyright 1993 by Brian Moore (audio part) 4 * Changes Copyright 1993 by Gary Clark II 5 * Changes Copyright (C) 1994-1995 by Andrey A. Chernov, Moscow, Russia 6 * 7 * Rewrote probe routine to work on newer Mitsumi drives. 8 * Additional changes (C) 1994 by Jordan K. Hubbard --- 26 unchanged lines hidden (view full) --- 35 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 36 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 37 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 38 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 39 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 40 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 41 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 42 * |
43 * $Id: mcd.c,v 1.106 1999/05/08 07:02:30 phk Exp $ | 43 * $Id: mcd.c,v 1.107 1999/05/30 16:52:19 phk Exp $ |
44 */ 45static const char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; 46 47#include "mcd.h" 48#if NMCD > 0 49#include "opt_devfs.h" 50 51#include <sys/param.h> --- 699 unchanged lines hidden (view full) --- 751 752int 753mcd_probe(struct isa_device *dev) 754{ 755 int port = dev->id_iobase; 756 int unit = dev->id_unit; 757 int i, j; 758 unsigned char stbytes[3]; | 44 */ 45static const char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; 46 47#include "mcd.h" 48#if NMCD > 0 49#include "opt_devfs.h" 50 51#include <sys/param.h> --- 699 unchanged lines hidden (view full) --- 751 752int 753mcd_probe(struct isa_device *dev) 754{ 755 int port = dev->id_iobase; 756 int unit = dev->id_unit; 757 int i, j; 758 unsigned char stbytes[3]; |
759 static int once; |
|
759 | 760 |
761 if (!once++) 762 cdevsw_add(&mcd_cdevsw); 763 |
|
760 mcd_data[unit].flags = MCDPROBING; 761 762#ifdef NOTDEF 763 /* get irq/drq configuration word */ 764 mcd_data[unit].config = irqs[dev->id_irq]; /* | drqs[dev->id_drq];*/ 765#else 766 mcd_data[unit].config = 0; 767#endif --- 1083 unchanged lines hidden (view full) --- 1851{ 1852 struct mcd_data *cd = mcd_data + unit; 1853 1854 if (cd->audio_status != CD_AS_PLAY_PAUSED) 1855 return EINVAL; 1856 return mcd_play(unit, &cd->lastpb); 1857} 1858 | 764 mcd_data[unit].flags = MCDPROBING; 765 766#ifdef NOTDEF 767 /* get irq/drq configuration word */ 768 mcd_data[unit].config = irqs[dev->id_irq]; /* | drqs[dev->id_drq];*/ 769#else 770 mcd_data[unit].config = 0; 771#endif --- 1083 unchanged lines hidden (view full) --- 1855{ 1856 struct mcd_data *cd = mcd_data + unit; 1857 1858 if (cd->audio_status != CD_AS_PLAY_PAUSED) 1859 return EINVAL; 1860 return mcd_play(unit, &cd->lastpb); 1861} 1862 |
1859 1860static int mcd_devsw_installed; 1861 1862static void mcd_drvinit(void *unused) 1863{ 1864 1865 if( ! mcd_devsw_installed ) { 1866 cdevsw_add_generic(BDEV_MAJOR,CDEV_MAJOR, &mcd_cdevsw); 1867 mcd_devsw_installed = 1; 1868 } 1869} 1870 1871SYSINIT(mcddev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,mcd_drvinit,NULL) 1872 1873 | |
1874#endif /* NMCD > 0 */ | 1863#endif /* NMCD > 0 */ |