Some CDROM patches for 2.1.78

Erik Andersen (andersee@debian.org)
Sun, 4 Jan 1998 17:40:14 -0700


Linus,

These patches should fix up the cdu31a, sbpcd, and mcdx drivers, as well
as a minor bug fix for ide-cd, and some minor touch-ups to cdrom.h and
sbpcd.h. Credit goes to Heiko Eissfeldt <heiko@colossus.escape.de> for
the fixes to cdu31a and sbpcd. Anyway, could you could stick these into
2.1.78? Thanks,

-Erik

--
Erik B. Andersen   Web:    http://www.inconnect.com/~andersen/ 
                   email:  andersee@debian.org
--This message was written using 73% post-consumer electrons--

[-----------------patch follows---------------------]

diff -u --recursive --new-file linux-2.1.77.virgin/arch/i386/config.in linux/arch/i386/config.in --- linux-2.1.77.virgin/arch/i386/config.in Sat Jan 3 17:07:13 1998 +++ linux/arch/i386/config.in Sun Jan 4 00:22:43 1998 @@ -109,10 +109,10 @@ endmenu # Conditionally compile in the Uniform CD-ROM driver -if [ "$CONFIG_BLK_DEV_IDECD" = "y" -o "$CONFIG_BLK_DEV_SR" = "y" -o "$CONFIG_SBPCD" = "y" -o "$CONFIG_MCD" = "y" -o "$CONFIG_CM206" = "y" -o "$CONFIG_CDU31A" = "y" ]; then +if [ "$CONFIG_BLK_DEV_IDECD" = "y" -o "$CONFIG_BLK_DEV_SR" = "y" -o "$CONFIG_SBPCD" = "y" -o "$CONFIG_MCD" = "y" -o "$CONFIG_MCDX" = "y" -o "$CONFIG_CM206" = "y" -o "$CONFIG_CDU31A" = "y" ]; then define_bool CONFIG_CDROM y else - if [ "$CONFIG_BLK_DEV_IDECD" = "m" -o "$CONFIG_BLK_DEV_SR" = "m" -o "$CONFIG_SBPCD" = "m" -o "$CONFIG_MCD" = "m" -o "$CONFIG_CM206" = "m" -o "$CONFIG_CDU31A" = "m" ]; then + if [ "$CONFIG_BLK_DEV_IDECD" = "m" -o "$CONFIG_BLK_DEV_SR" = "m" -o "$CONFIG_SBPCD" = "m" -o "$CONFIG_MCD" = "m" -o "$CONFIG_MCDX" = "m" -o "$CONFIG_CM206" = "m" -o "$CONFIG_CDU31A" = "m" ]; then define_bool CONFIG_CDROM m else define_bool CONFIG_CDROM n diff -u --recursive --new-file linux-2.1.77.virgin/drivers/block/ide-cd.c linux/drivers/block/ide-cd.c --- linux-2.1.77.virgin/drivers/block/ide-cd.c Fri Dec 19 10:35:05 1997 +++ linux/drivers/block/ide-cd.c Sun Jan 4 01:12:44 1998 @@ -27,10 +27,8 @@ * unless you have a patch to fix it. I am working on it...) * -Implement ide_cdrom_select_speed using the generic cdrom interface * -Fix ide_cdrom_reset so that it works (it does nothing right now) - * - * MOSTLY DONE LIST: - * Query the drive to find what features are available - * before trying to use them. + * -Query the drive to find what features are available before trying to + * use them (like trying to close the tray in drives that can't). * * * ---------------------------------- @@ -182,10 +180,12 @@ * 4.07 Dec 17, 1997 -- fallback to set pc->stat on "tray open" * 4.08 Dec 18, 1997 -- spew less noise when tray is empty * -- fix speed display for ACER 24X, 18X + * 4.09 Jan 04, 1998 -- fix handling of the last block so we return + * an end of file instead of an I/O error (Gadi) * *************************************************************************/ -#define IDECD_VERSION "4.07" +#define IDECD_VERSION "4.09" #include <linux/config.h> #include <linux/module.h> @@ -1663,7 +1663,7 @@ if (stat) toc->capacity = 0x1fffff; HWIF(drive)->gd->sizes[drive->select.b.unit << PARTN_BITS] - = toc->capacity * SECTORS_PER_FRAME; + = (toc->capacity * SECTORS_PER_FRAME) >> (BLOCK_SIZE_BITS - 9); drive->part[0].nr_sects = toc->capacity * SECTORS_PER_FRAME; /* Remember that we've read this stuff. */ diff -u --recursive --new-file linux-2.1.77.virgin/drivers/cdrom/cdrom.c linux/drivers/cdrom/cdrom.c --- linux-2.1.77.virgin/drivers/cdrom/cdrom.c Sat Jan 3 17:07:57 1998 +++ linux/drivers/cdrom/cdrom.c Sun Jan 4 00:49:35 1998 @@ -1,6 +1,6 @@ /* linux/drivers/cdrom/cdrom.c. Copyright (c) 1996, 1997 David A. van Leeuwen. - Copyright (c) 1997 Erik Andersen (andersee@debian.org) + Copyright (c) 1997, 1998 Erik Andersen (andersee@debian.org) May be copied or modified under the terms of the GNU General Public License. See linux/COPYING for more information. @@ -68,14 +68,10 @@ #include <asm/uaccess.h> -#define VERSION "$Id: cdrom.c,v 2.1 1997/12/28 15:11:47 david Exp $" -#define REVISION "$Revision: 2.1 $" +#define VERSION "$Id: cdrom.c,v 2.11 1998/01/04 01:11:18 erik Exp $" +#define REVISION "Revision: 2.11" #define FM_WRITE 0x2 /* file mode write bit */ -/* When VERBOSE_STATUS_INFO is not defined, the debugging printks don't - get compiled in */ -#define VERBOSE_STATUS_INFO - /* I use an error-log mask to give fine grain control over the type of error messages dumped to the system logs. The available masks include: */ #define CD_WARNING 0x1 @@ -83,9 +79,14 @@ #define CD_DO_IOCTL 0x4 #define CD_OPEN 0x8 #define CD_CLOSE 0x10 +#define CD_COUNT_TRACKS 0x20 + +/* When VERBOSE_STATUS_INFO is not defined, the debugging printks don't + get compiled in at all */ +#define VERBOSE_STATUS_INFO #define ERRLOGMASK (CD_WARNING) -/* #define ERRLOGMASK (CD_WARNING|CD_OPEN|CD_CLOSE) */ +/* #define ERRLOGMASK (CD_WARNING|CD_OPEN|CD_COUNT_TRACKS|CD_CLOSE) */ /* #define ERRLOGMASK (CD_WARNING|CD_REG_UNREG|CD_DO_IOCTL|CD_OPEN|CD_CLOSE) */ #ifdef VERBOSE_STATUS_INFO @@ -480,7 +481,7 @@ tracks->cdi=0; tracks->xa=0; tracks->error=0; - cdinfo(CD_OPEN, "entering cdrom_count_tracks\n"); + cdinfo(CD_COUNT_TRACKS, "entering cdrom_count_tracks\n"); if (!(cdi->ops->capability & CDC_PLAY_AUDIO)) { tracks->error=CDS_NO_INFO; return; @@ -508,10 +509,10 @@ tracks->data++; } else tracks->audio++; - cdinfo(CD_OPEN, "track %d: format=%d, ctrl=%d\n", + cdinfo(CD_COUNT_TRACKS, "track %d: format=%d, ctrl=%d\n", i, entry.cdte_format, entry.cdte_ctrl); } - cdinfo(CD_OPEN, "disc has %d tracks: %d=audio %d=data %d=Cd-I %d=XA\n", + cdinfo(CD_COUNT_TRACKS, "disc has %d tracks: %d=audio %d=data %d=Cd-I %d=XA\n", header.cdth_trk1, tracks->audio, tracks->data, tracks->cdi, tracks->xa); } diff -u --recursive --new-file linux-2.1.77.virgin/drivers/cdrom/cdu31a.c linux/drivers/cdrom/cdu31a.c --- linux-2.1.77.virgin/drivers/cdrom/cdu31a.c Tue Dec 2 12:41:44 1997 +++ linux/drivers/cdrom/cdu31a.c Sun Jan 4 00:14:23 1998 @@ -416,7 +416,8 @@ return -EINVAL; } - return sony_spun_up ? CDS_DISC_OK : CDS_DRIVE_NOT_READY; + /*return sony_spun_up ? CDS_DISC_OK : CDS_DRIVE_NOT_READY;*/ + return sony_spun_up ? CDS_DISC_OK : CDS_TRAY_OPEN; } static inline void @@ -1085,7 +1086,7 @@ volatile int val; -#if DEBUG +#if 0*DEBUG printk("Entering handle_sony_cd_attention\n"); #endif if (is_attention()) @@ -1166,7 +1167,7 @@ } num_consecutive_attentions = 0; -#if DEBUG +#if 0*DEBUG printk("Leaving handle_sony_cd_attention at %d\n", __LINE__); #endif return(0); @@ -2835,8 +2836,11 @@ sony_audio_status = CDROM_AUDIO_INVALID; return do_sony_cd_cmd_chk("EJECT",SONY_EJECT_CMD, NULL, 0, res_reg, &res_size); - } else - return 0; + } else { + if (0 == scd_spinup()) + sony_spun_up = 1; + return 0; + } } /* @@ -3230,7 +3234,6 @@ printk("CDU31A: Unable to set XA params: 0x%2.2x\n", res_reg[1]); } sony_xa_mode = 1; -printk("sony_xa_mode is set\n"); } /* A non-XA disk. Set the parms back if necessary. */ else if (sony_xa_mode) @@ -3247,7 +3250,6 @@ printk("CDU31A: Unable to reset XA params: 0x%2.2x\n", res_reg[1]); } sony_xa_mode = 0; -printk("sony_xa_mode is reset\n"); } sony_spun_up = 1; @@ -3293,7 +3295,7 @@ scd_reset, /* hard reset */ scd_audio_ioctl, /* audio ioctl */ scd_dev_ioctl, /* device-specific ioctl */ - CDC_OPEN_TRAY | CDC_LOCK | CDC_SELECT_SPEED | CDC_MULTI_SESSION | + CDC_OPEN_TRAY | CDC_CLOSE_TRAY | CDC_LOCK | CDC_SELECT_SPEED | CDC_MULTI_SESSION | CDC_MULTI_SESSION | CDC_MCN | CDC_MEDIA_CHANGED | CDC_PLAY_AUDIO | CDC_RESET | CDC_IOCTLS | CDC_DRIVE_STATUS, /* capability */ 1, /* number of minor devices */ @@ -3571,6 +3573,7 @@ cdu31a_abort_timer.function = handle_abort_timeout; scd_info.mask = deficiency; + strncpy(scd_info.name, "cdu31a", sizeof(scd_info.name)); if (register_cdrom(&scd_info)) { diff -u --recursive --new-file linux-2.1.77.virgin/drivers/cdrom/mcdx.c linux/drivers/cdrom/mcdx.c --- linux-2.1.77.virgin/drivers/cdrom/mcdx.c Tue Dec 2 12:41:44 1997 +++ linux/drivers/cdrom/mcdx.c Sun Jan 4 00:22:53 1998 @@ -75,9 +75,6 @@ #define mcdx_drive_map mcdx #include "mcdx.h" -#define MCDX_QUIET 0 - - #ifndef HZ #error HZ not defined #endif @@ -288,7 +285,7 @@ NULL, /* hard reset */ mcdx_audio_ioctl, /* audio ioctl */ NULL, /* device-specific ioctl */ - CDC_OPEN_TRAY | CDC_MEDIA_CHANGED | CDC_PLAY_AUDIO + CDC_OPEN_TRAY | CDC_LOCK | CDC_MEDIA_CHANGED | CDC_PLAY_AUDIO | CDC_DRIVE_STATUS, /* capability */ 0, /* number of minor devices */ }; diff -u --recursive --new-file linux-2.1.77.virgin/drivers/cdrom/sbpcd.c linux/drivers/cdrom/sbpcd.c --- linux-2.1.77.virgin/drivers/cdrom/sbpcd.c Tue Dec 2 12:41:44 1997 +++ linux/drivers/cdrom/sbpcd.c Sun Jan 4 00:14:31 1998 @@ -550,7 +550,6 @@ static struct cdrom_subchnl SC; static struct cdrom_volctrl volctrl; static struct cdrom_read_audio read_audio; -static struct cdrom_multisession ms_info; static unsigned char msgnum=0; static char msgbuf[80]; @@ -2297,12 +2296,52 @@ } i=cmd_out(); msg(DBG_LCS,"p_door_closed bit %d after\n", st_door_closed); + + i=cc_ReadError(); + flags_cmd_out |= f_respo2; + cc_ReadStatus(); /* command: give 1-byte status */ + i=ResponseStatus(); + if (famT_drive&&(i<0)) + { + cc_DriveReset(); + i=ResponseStatus(); +#if 0 + sbp_sleep(HZ); +#endif 0 + i=ResponseStatus(); + } + if (i<0) + { + msg(DBG_INF,"sbpcd cc_CloseTray: ResponseStatus timed out (%d).\n",i); + } + if (!(famT_drive)) + { + if (!st_spinning) + { + cc_SpinUp(); + if (st_check) i=cc_ReadError(); + flags_cmd_out |= f_respo2; + cc_ReadStatus(); + i=ResponseStatus(); + } else { + } + } + i=DiskInfo(); return (i); } static int sbpcd_tray_move(struct cdrom_device_info *cdi, int position) { - return position ? cc_CloseTray() : 0; + int i; + i = MINOR(cdi->dev); + + switch_drive(i); + if (position == 1) { + cc_SpinDown(); + } else { + return cc_CloseTray(); + } + return 0; } /*==========================================================================*/ @@ -2768,11 +2807,13 @@ if (famLV_drive) D_S[d].CDsize_frm=D_S[d].size_blk+1; } D_S[d].diskstate_flags |= toc_bit; - msg(DBG_TOC,"TocDesc: %02X %02X %02X %08X\n", + msg(DBG_TOC,"TocDesc: xa %02X firstt %02X lastt %02X size %08X firstses %02X lastsess %02X\n", D_S[d].xa_byte, D_S[d].n_first_track, D_S[d].n_last_track, - D_S[d].size_msf); + D_S[d].size_msf, + D_S[d].first_session, + D_S[d].last_session); return (0); } /*==========================================================================*/ @@ -3886,6 +3927,7 @@ msg(DBG_000,"DiskInfo entered.\n"); for (j=1;j<LOOP_COUNT;j++) { +#if 0 i=SetSpeed(); if (i<0) { @@ -3898,10 +3940,14 @@ msg(DBG_INF,"DiskInfo: cc_ModeSense returns %d\n", i); continue; } +#endif i=cc_ReadCapacity(); if (i>=0) break; msg(DBG_INF,"DiskInfo: ReadCapacity #%d returns %d\n", j, i); +#if 0 i=cc_DriveReset(); +#endif + if (!fam0_drive && j == 2) break; } if (j==LOOP_COUNT) return (-33); /* give up */ @@ -3946,12 +3992,36 @@ static int sbpcd_drive_status(struct cdrom_device_info *cdi, int slot_nr) { - if (CDSL_CURRENT != slot_nr) { - /* we have no changer support */ - return -EINVAL; - } + int st; + + if (CDSL_CURRENT != slot_nr) { + /* we have no changer support */ + return -EINVAL; + } + + cc_ReadStatus(); + st=ResponseStatus(); + if (st<0) + { + msg(DBG_INF,"sbpcd_drive_status: timeout.\n"); + return (0); + } + msg(DBG_000,"Drive Status: door_locked =%d.\n", st_door_locked); + msg(DBG_000,"Drive Status: door_closed =%d.\n", st_door_closed); + msg(DBG_000,"Drive Status: caddy_in =%d.\n", st_caddy_in); + msg(DBG_000,"Drive Status: disk_ok =%d.\n", st_diskok); + msg(DBG_000,"Drive Status: spinning =%d.\n", st_spinning); + msg(DBG_000,"Drive Status: busy =%d.\n", st_busy); +#if 0 + if (!(D_S[MINOR(cdi->dev)].status_bits & p_door_closed)) return CDS_TRAY_OPEN; + if (D_S[MINOR(cdi->dev)].status_bits & p_disk_ok) return CDS_DISC_OK; + if (D_S[MINOR(cdi->dev)].status_bits & p_disk_in) return CDS_DRIVE_NOT_READY; - return D_S[d].status_bits & p1_disk_ok ? CDS_DISC_OK : CDS_DRIVE_NOT_READY; + return CDS_NO_DISC; +#else + if (D_S[MINOR(cdi->dev)].status_bits & p_spinning) return CDS_DISC_OK; + return CDS_TRAY_OPEN; +#endif } @@ -4082,13 +4152,13 @@ static int sbpcd_get_last_session(struct cdrom_device_info *cdi, struct cdrom_multisession *ms_infp) { ms_infp->addr_format = CDROM_LBA; - ms_infp->addr.lba = D_S[d].lba_multi; - if (D_S[d].f_multisession) + ms_infp->addr.lba = D_S[MINOR(cdi->dev)].lba_multi; + if (D_S[MINOR(cdi->dev)].f_multisession) ms_infp->xa_flag=1; /* valid redirection address */ else ms_infp->xa_flag=0; /* invalid redirection address */ - return 1; + return 0; } /*==========================================================================*/ @@ -4304,8 +4374,30 @@ error_flag=0; p = D_S[d].aud_buf; if (sbpro_type==1) OUT(CDo_sel_i_d,1); - if (do_16bit) insw(CDi_data, p, read_audio.nframes*(CD_FRAMESIZE_RAW>>1)); - else insb(CDi_data, p, read_audio.nframes*CD_FRAMESIZE_RAW); + if (do_16bit) + { + u_short *p2 = (u_short *) p; + + for (; (u_char *) p2 < D_S[d].aud_buf + read_audio.nframes*CD_FRAMESIZE_RAW;) + { + if ((inb_p(CDi_status)&s_not_data_ready)) continue; + + /* get one sample */ + *p2++ = inw_p(CDi_data); + *p2++ = inw_p(CDi_data); + } + } else { + for (; p < D_S[d].aud_buf + read_audio.nframes*CD_FRAMESIZE_RAW;) + { + if ((inb_p(CDi_status)&s_not_data_ready)) continue; + + /* get one sample */ + *p++ = inb_p(CDi_data); + *p++ = inb_p(CDi_data); + *p++ = inb_p(CDi_data); + *p++ = inb_p(CDi_data); + } + } if (sbpro_type==1) OUT(CDo_sel_i_d,0); data_retrying = 0; } @@ -4388,28 +4480,6 @@ if(arg > 0xff) RETURN_UP(-EINVAL); read_ahead[MAJOR(cdi->dev)] = arg; RETURN_UP(0); -#if 0 - case CDROMEJECT: - msg(DBG_IOC,"ioctl: CDROMEJECT entered.\n"); - if (fam0_drive) return (0); - if (D_S[d].open_count>1) RETURN_UP(-EBUSY); - i=UnLockDoor(); - D_S[d].open_count=-9; /* to get it locked next time again */ - i=cc_SpinDown(); - msg(DBG_IOX,"ioctl: cc_SpinDown returned %d.\n", i); - msg(DBG_TEA,"ioctl: cc_SpinDown returned %d.\n", i); - if (i<0) RETURN_UP(-EIO); - D_S[d].CD_changed=0xFF; - D_S[d].diskstate_flags=0; - D_S[d].audio_state=0; - RETURN_UP(0); - - case CDROMEJECT_SW: - msg(DBG_IOC,"ioctl: CDROMEJECT_SW entered.\n"); - if (fam0_drive) RETURN_UP(0); - D_S[d].f_eject=arg; - RETURN_UP(0); -#endif default: msg(DBG_IOC,"ioctl: unknown function request %04X\n", cmd); RETURN_UP(-EINVAL); @@ -5242,54 +5312,13 @@ static int sbpcd_open(struct cdrom_device_info *cdi, int purpose) { int i; - + i = MINOR(cdi->dev); - if ((i<0) || (i>=NR_SBPCD) || (D_S[i].drv_id==-1)) - { - msg(DBG_INF, "open: bad device: %04X\n", cdi->dev); - return (-ENXIO); /* no such drive */ - } - + MOD_INC_USE_COUNT; down(&ioctl_read_sem); switch_drive(i); - - i=cc_ReadError(); - flags_cmd_out |= f_respo2; - cc_ReadStatus(); /* command: give 1-byte status */ - i=ResponseStatus(); - if (famT_drive&&(i<0)) - { - cc_DriveReset(); - i=ResponseStatus(); -#if 0 - sbp_sleep(HZ); -#endif 0 - i=ResponseStatus(); - } - if (i<0) - { - msg(DBG_INF,"sbpcd_open: ResponseStatus timed out (%d).\n",i); - MOD_DEC_USE_COUNT; - RETURN_UP(-EIO); /* drive doesn't respond */ - } - if (famT_drive) msg(DBG_TEA,"sbpcd_open: ResponseStatus=%02X\n", i); - if (!(famT_drive)) - if (!st_spinning) - { - cc_SpinUp(); - flags_cmd_out |= f_respo2; - cc_ReadStatus(); - i=ResponseStatus(); - } - if (famT_drive) msg(DBG_TEA,"sbpcd_open: status %02X\n", D_S[d].status_bits); - if (!st_door_closed||!st_caddy_in) - { - msg(DBG_INF, "sbpcd_open: no disk in drive.\n"); - D_S[d].open_count=0; - MOD_DEC_USE_COUNT; - RETURN_UP(-ENXIO); - } + /* * try to keep an "open" counter here and lock the door if 0->1. */ @@ -5360,24 +5389,6 @@ /* * */ -#if 0 -static struct file_operations sbpcd_fops = -{ - NULL, /* lseek - default */ - block_read, /* read - general block-dev read */ - block_write, /* write - general block-dev write */ - NULL, /* readdir - bad */ - NULL, /* poll */ - sbpcd_ioctl, /* ioctl */ - NULL, /* mmap */ - sbpcd_open, /* open */ - sbpcd_release, /* release */ - NULL, /* fsync */ - NULL, /* fasync */ - sbpcd_chk_disk_change, /* media_change */ - NULL /* revalidate */ -}; -#endif static int sbpcd_media_changed( struct cdrom_device_info *cdi, int disc_nr); static struct cdrom_device_ops sbpcd_dops = { sbpcd_open, /* open */ @@ -5394,7 +5405,7 @@ sbpcd_audio_ioctl, /* audio ioctl */ sbpcd_dev_ioctl, /* device-specific ioctl */ CDC_CLOSE_TRAY | CDC_OPEN_TRAY | CDC_LOCK | CDC_MULTI_SESSION | - CDC_MEDIA_CHANGED | CDC_MCN | CDC_PLAY_AUDIO, /* capability */ + CDC_MEDIA_CHANGED | CDC_MCN | CDC_PLAY_AUDIO | CDC_IOCTLS, /* capability */ 1, /* number of minor devices */ }; @@ -5556,7 +5567,7 @@ int i=0, j=0; int addr[2]={1, CDROM_PORT}; int port_index; - + sti(); msg(DBG_INF,"sbpcd.c %s\n", VERSION); @@ -5630,14 +5641,6 @@ check_datarate(); msg(DBG_INI,"check_datarate done.\n"); -#if 0 - if (!famL_drive) - { - OUT(CDo_reset,0); - sbp_sleep(HZ); - } -#endif 0 - for (j=0;j<NR_SBPCD;j++) { if (D_S[j].drv_id==-1) continue; @@ -5830,11 +5833,6 @@ msg(DBG_CHK,"media_check (%d) called\n", MINOR(full_dev)); i=MINOR(full_dev); - if ( (i<0) || (i>=NR_SBPCD) || (D_S[i].drv_id==-1) ) - { - msg(DBG_INF, "media_check: invalid device %04X.\n", full_dev); - return (-1); - } if (D_S[i].CD_changed==0xFF) { diff -u --recursive --new-file linux-2.1.77.virgin/drivers/cdrom/sbpcd.h linux/drivers/cdrom/sbpcd.h --- linux-2.1.77.virgin/drivers/cdrom/sbpcd.h Tue Dec 2 12:41:45 1997 +++ linux/drivers/cdrom/sbpcd.h Sun Jan 4 00:15:28 1998 @@ -119,14 +119,14 @@ #define JUKEBOX 0 #else #define JUKEBOX 1 -#endif DISTRIBUTION +#endif /* DISTRIBUTION */ /* tray control: eject tray after last use */ #if DISTRIBUTION #define EJECT 0 #else #define EJECT 1 -#endif DISTRIBUTION +#endif /* DISTRIBUTION */ /* max. number of audio frames to read with one */ /* request (allocates n* 2352 bytes kernel memory!) */ @@ -570,7 +570,7 @@ resume (pr=80) audio playing Mode Select: - 84 00 nn-nn ??-?? 00 (0) nn-nn: 2048 or 2340 + 84 00 nn-nn ??.?? 00 (0) nn-nn: 2048 or 2340 possibly defines transfer size set_vol: 84 83 00 00 sw le 00. (0) sw(itch): lrxxxxxx (off=1) @@ -604,12 +604,12 @@ seek: 01 02 mm-ss-ff 00 00. (0) Read Data: -read: 02 xx-xx-xx nn-nn fl. (??) read nn-nn blocks of 2048 bytes, +read: 02 xx-xx-xx nn-nn fl. (?) read nn-nn blocks of 2048 bytes, starting at block xx-xx-xx fl=0: "lba"-, =2:"msf-bcd"-coded xx-xx-xx Read XA-Data: -read: 03 xx-xx-xx nn-nn fl. (??) read nn-nn blocks of 2340 bytes, +read: 03 xx-xx-xx nn-nn fl. (?) read nn-nn blocks of 2340 bytes, starting at block xx-xx-xx fl=0: "lba"-, =2:"msf-bcd"-coded xx-xx-xx @@ -838,7 +838,7 @@ /*==========================================================================*/ /*==========================================================================*/ -#endif _LINUX_SBPCD_H +#endif /* _LINUX_SBPCD_H */ /*==========================================================================*/ /* * Overrides for Emacs so that we follow Linus's tabbing style. diff -u --recursive --new-file linux-2.1.77.virgin/include/linux/cdrom.h linux/include/linux/cdrom.h --- linux-2.1.77.virgin/include/linux/cdrom.h Sat Jan 3 17:08:06 1998 +++ linux/include/linux/cdrom.h Sun Jan 4 00:19:46 1998 @@ -4,7 +4,7 @@ * Copyright (C) 1992 David Giller, rafetmad@oxy.edu * 1994, 1995 Eberhard Moenkeberg, emoenke@gwdg.de * 1996 David van Leeuwen, david@tm.tno.nl - * 1997 Erik Andersen, andersee@debian.org + * 1997, 1998 Erik Andersen, andersee@debian.org */ #ifndef _LINUX_CDROM_H @@ -417,4 +417,4 @@ extern int unregister_cdrom(struct cdrom_device_info *cdi); #endif /* End of kernel only stuff */ -#endif _LINUX_CDROM_H +#endif /* _LINUX_CDROM_H */