Deleted Added
full compact
scd.c (47625) scd.c (47640)
1/*-
2 * Copyright (c) 1995 Mikael Hybsch
3 * All rights reserved.
4 *
5 * Portions of this file are copied from mcd.c
6 * which has the following copyrights:
7 *
8 * Copyright 1993 by Holger Veit (data part)

--- 27 unchanged lines hidden (view full) ---

36 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
37 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
39 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40 *
41 */
42
43
1/*-
2 * Copyright (c) 1995 Mikael Hybsch
3 * All rights reserved.
4 *
5 * Portions of this file are copied from mcd.c
6 * which has the following copyrights:
7 *
8 * Copyright 1993 by Holger Veit (data part)

--- 27 unchanged lines hidden (view full) ---

36 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
37 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
39 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40 *
41 */
42
43
44/* $Id: scd.c,v 1.45 1999/05/09 20:29:04 phk Exp $ */
44/* $Id: scd.c,v 1.46 1999/05/30 16:52:24 phk Exp $ */
45
46/* Please send any comments to micke@dynas.se */
47
48#define SCD_DEBUG 0
49
50#include "scd.h"
51#if NSCD > 0
52#include "opt_devfs.h"

--- 660 unchanged lines hidden (view full) ---

713scd_probe(struct isa_device *dev)
714{
715 struct sony_drive_configuration drive_config;
716 int unit = dev->id_unit;
717 int rc;
718 static char namebuf[8+16+8+3];
719 char *s = namebuf;
720 int loop_count = 0;
45
46/* Please send any comments to micke@dynas.se */
47
48#define SCD_DEBUG 0
49
50#include "scd.h"
51#if NSCD > 0
52#include "opt_devfs.h"

--- 660 unchanged lines hidden (view full) ---

713scd_probe(struct isa_device *dev)
714{
715 struct sony_drive_configuration drive_config;
716 int unit = dev->id_unit;
717 int rc;
718 static char namebuf[8+16+8+3];
719 char *s = namebuf;
720 int loop_count = 0;
721 static int once;
721
722
723 if (!once++)
724 cdevsw_add(&scd_cdevsw);
725
722 scd_data[unit].flags = SCDPROBING;
723 scd_data[unit].iobase = dev->id_iobase;
724
725 bzero(&drive_config, sizeof(drive_config));
726
727again:
728 /* Reset drive */
729 write_control(dev->id_iobase, CBIT_RESET_DRIVE);

--- 839 unchanged lines hidden (view full) ---

1569 }
1570
1571 /* copy the data back */
1572 bcopy(&toc_entry, &te->entry, sizeof(struct cd_toc_entry));
1573
1574 return 0;
1575}
1576
726 scd_data[unit].flags = SCDPROBING;
727 scd_data[unit].iobase = dev->id_iobase;
728
729 bzero(&drive_config, sizeof(drive_config));
730
731again:
732 /* Reset drive */
733 write_control(dev->id_iobase, CBIT_RESET_DRIVE);

--- 839 unchanged lines hidden (view full) ---

1573 }
1574
1575 /* copy the data back */
1576 bcopy(&toc_entry, &te->entry, sizeof(struct cd_toc_entry));
1577
1578 return 0;
1579}
1580
1577
1578static int scd_devsw_installed;
1579
1580static void scd_drvinit(void *unused)
1581{
1582
1583 if( ! scd_devsw_installed ) {
1584 cdevsw_add_generic(BDEV_MAJOR,CDEV_MAJOR, &scd_cdevsw);
1585 scd_devsw_installed = 1;
1586 }
1587}
1588
1589SYSINIT(scddev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,scd_drvinit,NULL)
1590
1591
1592#endif /* NSCD > 0 */
1581#endif /* NSCD > 0 */