#include <linux/module.h>#include <linux/malloc.h>#include <linux/errno.h>#include <linux/signal.h>#include <linux/sched.h>#include <linux/timer.h>#include <linux/fs.h>#include <linux/mm.h>#include <linux/kernel.h>#include <linux/cdrom.h>#include <linux/ioport.h>#include <linux/major.h>#include <linux/string.h>#include <linux/init.h>#include <asm/system.h>#include <asm/io.h>#include <asm/uaccess.h>#include <linux/blk.h>#include "gscd.h"Include dependency graph for gscd.c:

Go to the source code of this file.
Defines | |
| #define | GSCD_VERSION "0.4a Oliver Raupach <raupach@nwfs1.rz.fh-hannover.de>" |
| #define | NO_GSCD_DEBUG |
| #define | NO_IOCTL_DEBUG |
| #define | NO_MODULE_DEBUG |
| #define | NO_FUTURE_WORK |
| #define | MAJOR_NR GOLDSTAR_CDROM_MAJOR |
| #define | gscd_port gscd |
Functions | |
| MODULE_PARM (gscd,"h") | |
| static void | gscd_transfer (void) |
| static void | gscd_read_cmd (void) |
| static void | gscd_hsg2msf (long hsg, struct msf *msf) |
| static void | gscd_bin2bcd (unsigned char *p) |
| static void | do_gscd_request (void) |
| static int | gscd_ioctl (struct inode *, struct file *, unsigned int, unsigned long) |
| static int | gscd_open (struct inode *, struct file *) |
| static int | gscd_release (struct inode *, struct file *) |
| static int | check_gscd_med_chg (kdev_t) |
| static void | cc_Reset (void) |
| static int | wait_drv_ready (void) |
| static int | find_drives (void) |
| static void | cmd_out (int, char *, char *, int) |
| static void | cmd_status (void) |
| static void | cc_Ident (char *) |
| static void | cc_SetSpeed (void) |
| static void | init_cd_drive (int) |
| static int | get_status (void) |
| static void | clear_Audio (void) |
| static void | cc_invalidate (void) |
| static int | my_gscd_init (void) |
| static void | cmd_info_in (char *, int) |
| static void | cmd_end (void) |
| static void | cmd_read_b (char *, int, int) |
| static void | cmd_read_w (char *, int, int) |
| static int | cmd_unit_alive (void) |
| static void | cmd_write_cmd (char *) |
| __initfunc (void gscd_setup(char *str, int *ints)) | |
| __initfunc (int find_drives(void)) | |
| __initfunc (void init_cd_drive(int num)) | |
Variables | |
| static int | gscd_blocksizes [1] = {512} |
| static int | gscdPresent = 0 |
| static unsigned char | gscd_buf [2048] |
| static int | gscd_bn = -1 |
| static short | gscd_port = GSCD_BASE_ADDR |
| static int | curr_drv_state |
| static int | drv_states [] = {0,0,0,0,0,0,0,0} |
| static int | drv_mode |
| static int | disk_state |
| static int | speed |
| static int | ndrives |
| static unsigned char | drv_num_read |
| static unsigned char | f_dsk_valid |
| static unsigned char | current_drive |
| static unsigned char | f_drv_ok |
| static char | f_AudioPlay |
| static char | f_AudioPause |
| static int | AudioStart_m |
| static int | AudioStart_f |
| static int | AudioEnd_m |
| static int | AudioEnd_f |
| static struct file_operations | gscd_fops |
|
|
Definition at line 66 of file gscd.c. Referenced by __initfunc(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 905 of file gscd.c. References cc_Ident(), cc_SetSpeed(), i, and printk. Here is the call graph for this function: ![]() |
|
|
Definition at line 854 of file gscd.c. References cmd_status(), curr_drv_state, disk_state, drv_states, i, init_cd_drive(), ndrives, printk, speed, ST_INVALID, ST_x01, ST_x04, and ST_x08. Here is the call graph for this function: ![]() |
|
|
Definition at line 197 of file gscd.c. References gscd_port. |
|
|
Definition at line 481 of file gscd.c. References CMD_IDENT, cmd_out(), and TYPE_INFO. Referenced by __initfunc(). Here is the call graph for this function: ![]() |
|
|
Definition at line 435 of file gscd.c. References clear_Audio(), current_drive, drv_num_read, f_drv_ok, and f_dsk_valid. Referenced by get_status(). Here is the call graph for this function: ![]() |
|
|
Definition at line 502 of file gscd.c. References cmd_out(), CMD_RESET, dummy, and TYPE_INFO. Here is the call graph for this function: ![]() |
|
|
Definition at line 489 of file gscd.c. References cmd_out(), CMD_SETSPEED, dummy, speed, and TYPE_INFO. Referenced by __initfunc(), sbpcd_dev_ioctl(), sbpcd_select_speed(), and SetSpeed(). Here is the call graph for this function: ![]() |
|
|
|
|
|
Definition at line 446 of file gscd.c. References AudioEnd_f, AudioEnd_m, AudioStart_f, AudioStart_m, f_AudioPause, and f_AudioPlay. Referenced by cc_invalidate(). |
|
|
Definition at line 782 of file gscd.c. References disk_state, drv_mode, GSCDPORT, inb, printk, result, and wait_drv_ready(). Referenced by cmd_info_in(), cmd_read_b(), and cmd_read_w(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 706 of file gscd.c. References cmd_end(), GSCDPORT, inb, printk, read, result, and wait_drv_ready(). Referenced by cmd_out(). Here is the call graph for this function: ![]() |
|
||||||||||||||||||||
|
Definition at line 525 of file gscd.c. References CD_FRAMESIZE, cmd_info_in(), cmd_read_b(), cmd_read_w(), cmd_unit_alive(), cmd_write_cmd(), curr_drv_state, disk_state, drv_mode, dummy, GSCDPORT, i, inb, outb, printk, result, ST_INVALID, ST_x04, ST_x08, TYPE_DATA, wait_drv_ready(), x04, x06, x08, and x09. Referenced by __initfunc(), cc_CheckMultiSession(), cc_CloseTray(), cc_DriveReset(), cc_GetVolume(), cc_Ident(), cc_LockDoor(), cc_ModeSelect(), cc_ModeSense(), cc_Pause_Resume(), cc_PlayAudio(), cc_ReadCapacity(), cc_ReadError(), cc_ReadPacket(), cc_ReadSubQ(), cc_ReadTocDescr(), cc_ReadTocEntry(), cc_ReadUPC(), cc_Reset(), cc_Seek(), cc_SetSpeed(), cc_SetVolume(), cc_SpinDown(), cc_SpinUp(), cmd_status(), GetStatus(), gscd_ioctl(), gscd_read_cmd(), sbp_read_cmd(), sbpcd_dev_ioctl(), and sbpcd_get_mcn(). Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Definition at line 740 of file gscd.c. References cmd_end(), GSCDPORT, i, inb, printk, result, and wait_drv_ready(). Referenced by cmd_out(). Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Definition at line 817 of file gscd.c. References cmd_end(), GSCDPORT, i, inw, printk, result, and wait_drv_ready(). Referenced by cmd_out(). Here is the call graph for this function: ![]() |
|
|
Definition at line 512 of file gscd.c. References cmd_out(), CMD_STATUS, disk_state, dummy, printk, and TYPE_INFO. Referenced by __initfunc(), get_status(), gscd_ioctl(), and gscd_read_cmd(). Here is the call graph for this function: ![]() |
|
|
Definition at line 682 of file gscd.c. References curr_drv_state, GSCDPORT, outb, printk, result, wait_drv_ready(), and x08. Referenced by cmd_out(). Here is the call graph for this function: ![]() |
|
|
Definition at line 661 of file gscd.c. References GSCDPORT, i, j, outb, and printk. Referenced by cmd_out(). |
|
|
Definition at line 263 of file gscd.c. References CURRENT, dev, gscd_read_cmd(), gscd_transfer(), MINOR, NULL, printk, READ, and RQ_INACTIVE. Referenced by gscd_read_cmd(). Here is the call graph for this function: ![]() |
|
|
|
|
|
Definition at line 416 of file gscd.c. References cc_invalidate(), cmd_status(), disk_state, ST_INVALID, ST_x01, ST_x04, ST_x08, and status. Referenced by __initfunc(), ftape_get_status(), get_process_array(), gscd_open(), inquiry(), read_hw_addr(), receive_pcb(), receivepkt(), sendpkt(), start_dma(), stop(), testpkt(), and tp_sense(). Here is the call graph for this function: ![]() |
|
|
Definition at line 1090 of file gscd.c. Referenced by gscd_hsg2msf(). |
|
||||||||||||
|
Definition at line 1076 of file gscd.c. References CD_FRAMES, CD_MSF_OFFSET, CD_SECS, gscd_bin2bcd(), and min. Referenced by gscd_read_cmd(). Here is the call graph for this function: ![]() |
|
||||||||||||||||||||
|
Definition at line 206 of file gscd.c. References CDROMEJECT, CDROMRESUME, CDROMSTART, cmd_out(), cmd_status(), CMD_TRAY_CTL, dummy, EINVAL, and TYPE_INFO. Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 366 of file gscd.c. References disk_state, ENXIO, get_status(), gscdPresent, MOD_DEC_USE_COUNT, MOD_INC_USE_COUNT, printk, st, ST_DOOR_OPEN, and ST_NO_DISK. Here is the call graph for this function: ![]() |
|
|
Definition at line 317 of file gscd.c. References cmd_out(), CMD_READ, cmd_status(), CURRENT, disk_state, do_gscd_request(), msf::frame, gscd_bn, gscd_buf, gscd_hsg2msf(), gscd_transfer(), msf::min, printk, msf::sec, SET_TIMER, ST_DOOR_OPEN, ST_INVALID, ST_NO_DISK, gscd_Play_msf::start, and TYPE_DATA. Referenced by do_gscd_request(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 400 of file gscd.c. References gscd_bn, MOD_DEC_USE_COUNT, printk, and sync_dev(). Here is the call graph for this function: ![]() |
|
|
Definition at line 244 of file gscd.c. References CURRENT, gscd_bn, gscd_buf, and memcpy. Referenced by do_gscd_request(), and gscd_read_cmd(). |
|
|
Referenced by __initfunc(). |
|
||||||||||||
|
|
|
|
|
|
|
Definition at line 462 of file gscd.c. References found, GSCDPORT, inb, printk, and read. Referenced by cmd_end(), cmd_info_in(), cmd_out(), cmd_read_b(), cmd_read_w(), and cmd_unit_alive(). |
|
|
Definition at line 152 of file gscd.c. Referenced by clear_Audio(). |
|
|
Definition at line 151 of file gscd.c. Referenced by clear_Audio(). |
|
|
Definition at line 150 of file gscd.c. Referenced by clear_Audio(). |
|
|
Definition at line 149 of file gscd.c. Referenced by clear_Audio(). |
|
|
Definition at line 134 of file gscd.c. Referenced by __initfunc(), cmd_out(), and cmd_unit_alive(). |
|
|
|
|
|
Definition at line 137 of file gscd.c. Referenced by __initfunc(), cmd_end(), cmd_out(), cmd_status(), get_status(), gscd_open(), and gscd_read_cmd(). |
|
|
|
|
|
Definition at line 141 of file gscd.c. Referenced by cc_invalidate(). |
|
|
Definition at line 135 of file gscd.c. Referenced by __initfunc(). |
|
|
Definition at line 148 of file gscd.c. Referenced by clear_Audio(). |
|
|
Definition at line 147 of file gscd.c. Referenced by clear_Audio(). |
|
|
Definition at line 144 of file gscd.c. Referenced by cc_invalidate(). |
|
|
Definition at line 142 of file gscd.c. Referenced by cc_invalidate(). |
|
|
|
|
|
Definition at line 74 of file gscd.c. Referenced by gscd_read_cmd(), gscd_release(), and gscd_transfer(). |
|
|
Definition at line 73 of file gscd.c. Referenced by gscd_read_cmd(), and gscd_transfer(). |
|
|
Initial value: {
NULL,
block_read,
block_write,
NULL,
NULL,
gscd_ioctl,
NULL,
gscd_open,
NULL,
gscd_release,
NULL,
NULL,
check_gscd_med_chg,
NULL
}
|
|
|
|
|
|
Definition at line 71 of file gscd.c. Referenced by gscd_open(). |
|
|
Definition at line 139 of file gscd.c. Referenced by __initfunc(). |
|