You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'trivial-2.6.23' of git://git.kernel.dk/data/git/linux-2.6-block
* 'trivial-2.6.23' of git://git.kernel.dk/data/git/linux-2.6-block:
Documentation/block/barrier.txt is not in sync with the actual code: - blk_queue_ordered() no longer has a gfp_mask parameter - blk_queue_ordered_locked() no longer exists - sd_prepare_flush() looks slightly different
Use list_for_each_entry() instead of list_for_each() in the block device
Make a "menuconfig" out of the Kconfig objects "menu, ..., endmenu",
block/Kconfig already has its own "menuconfig" so remove these
Use menuconfigs instead of menus, so the whole menu can be disabled at once
cfq-iosched: fix async queue behaviour
unexport bio_{,un}map_user
Remove legacy CDROM drivers
[PATCH] fix request->cmd == INT cases
cciss: add new controller support for P700m
[PATCH] Remove acsi.c
[BLOCK] drop unnecessary bvec rewinding from flush_dry_bio_endio
[PATCH] cdrom_sysctl_info fix
blk_hw_contig_segment(): bad segment size checks
[TRIVIAL PATCH] Kill blk_congestion_wait() stub for !CONFIG_BLOCK
This commit is contained in:
@@ -82,23 +82,12 @@ including draining and flushing.
|
||||
typedef void (prepare_flush_fn)(request_queue_t *q, struct request *rq);
|
||||
|
||||
int blk_queue_ordered(request_queue_t *q, unsigned ordered,
|
||||
prepare_flush_fn *prepare_flush_fn,
|
||||
unsigned gfp_mask);
|
||||
|
||||
int blk_queue_ordered_locked(request_queue_t *q, unsigned ordered,
|
||||
prepare_flush_fn *prepare_flush_fn,
|
||||
unsigned gfp_mask);
|
||||
|
||||
The only difference between the two functions is whether or not the
|
||||
caller is holding q->queue_lock on entry. The latter expects the
|
||||
caller is holding the lock.
|
||||
prepare_flush_fn *prepare_flush_fn);
|
||||
|
||||
@q : the queue in question
|
||||
@ordered : the ordered mode the driver/device supports
|
||||
@prepare_flush_fn : this function should prepare @rq such that it
|
||||
flushes cache to physical medium when executed
|
||||
@gfp_mask : gfp_mask used when allocating data structures
|
||||
for ordered processing
|
||||
|
||||
For example, SCSI disk driver's prepare_flush_fn looks like the
|
||||
following.
|
||||
@@ -106,9 +95,10 @@ following.
|
||||
static void sd_prepare_flush(request_queue_t *q, struct request *rq)
|
||||
{
|
||||
memset(rq->cmd, 0, sizeof(rq->cmd));
|
||||
rq->flags |= REQ_BLOCK_PC;
|
||||
rq->cmd_type = REQ_TYPE_BLOCK_PC;
|
||||
rq->timeout = SD_TIMEOUT;
|
||||
rq->cmd[0] = SYNCHRONIZE_CACHE;
|
||||
rq->cmd_len = 10;
|
||||
}
|
||||
|
||||
The following seven ordered modes are supported. The following table
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# Block layer core configuration
|
||||
#
|
||||
config BLOCK
|
||||
menuconfig BLOCK
|
||||
bool "Enable the block layer" if EMBEDDED
|
||||
default y
|
||||
help
|
||||
@@ -49,6 +49,6 @@ config LSF
|
||||
|
||||
If unsure, say Y.
|
||||
|
||||
endif
|
||||
endif # BLOCK
|
||||
|
||||
source block/Kconfig.iosched
|
||||
|
||||
+36
-3
@@ -92,6 +92,8 @@ struct cfq_data {
|
||||
struct cfq_queue *active_queue;
|
||||
struct cfq_io_context *active_cic;
|
||||
|
||||
struct cfq_queue *async_cfqq[IOPRIO_BE_NR];
|
||||
|
||||
struct timer_list idle_class_timer;
|
||||
|
||||
sector_t last_position;
|
||||
@@ -1351,8 +1353,8 @@ static void cfq_ioc_set_ioprio(struct io_context *ioc)
|
||||
}
|
||||
|
||||
static struct cfq_queue *
|
||||
cfq_get_queue(struct cfq_data *cfqd, int is_sync, struct task_struct *tsk,
|
||||
gfp_t gfp_mask)
|
||||
cfq_find_alloc_queue(struct cfq_data *cfqd, int is_sync,
|
||||
struct task_struct *tsk, gfp_t gfp_mask)
|
||||
{
|
||||
struct cfq_queue *cfqq, *new_cfqq = NULL;
|
||||
struct cfq_io_context *cic;
|
||||
@@ -1405,12 +1407,35 @@ retry:
|
||||
if (new_cfqq)
|
||||
kmem_cache_free(cfq_pool, new_cfqq);
|
||||
|
||||
atomic_inc(&cfqq->ref);
|
||||
out:
|
||||
WARN_ON((gfp_mask & __GFP_WAIT) && !cfqq);
|
||||
return cfqq;
|
||||
}
|
||||
|
||||
static struct cfq_queue *
|
||||
cfq_get_queue(struct cfq_data *cfqd, int is_sync, struct task_struct *tsk,
|
||||
gfp_t gfp_mask)
|
||||
{
|
||||
const int ioprio = task_ioprio(tsk);
|
||||
struct cfq_queue *cfqq = NULL;
|
||||
|
||||
if (!is_sync)
|
||||
cfqq = cfqd->async_cfqq[ioprio];
|
||||
if (!cfqq)
|
||||
cfqq = cfq_find_alloc_queue(cfqd, is_sync, tsk, gfp_mask);
|
||||
|
||||
/*
|
||||
* pin the queue now that it's allocated, scheduler exit will prune it
|
||||
*/
|
||||
if (!is_sync && !cfqd->async_cfqq[ioprio]) {
|
||||
atomic_inc(&cfqq->ref);
|
||||
cfqd->async_cfqq[ioprio] = cfqq;
|
||||
}
|
||||
|
||||
atomic_inc(&cfqq->ref);
|
||||
return cfqq;
|
||||
}
|
||||
|
||||
/*
|
||||
* We drop cfq io contexts lazily, so we may find a dead one.
|
||||
*/
|
||||
@@ -2019,6 +2044,7 @@ static void cfq_exit_queue(elevator_t *e)
|
||||
{
|
||||
struct cfq_data *cfqd = e->elevator_data;
|
||||
request_queue_t *q = cfqd->queue;
|
||||
int i;
|
||||
|
||||
cfq_shutdown_timer_wq(cfqd);
|
||||
|
||||
@@ -2035,6 +2061,13 @@ static void cfq_exit_queue(elevator_t *e)
|
||||
__cfq_exit_single_io_context(cfqd, cic);
|
||||
}
|
||||
|
||||
/*
|
||||
* Put the async queues
|
||||
*/
|
||||
for (i = 0; i < IOPRIO_BE_NR; i++)
|
||||
if (cfqd->async_cfqq[i])
|
||||
cfq_put_queue(cfqd->async_cfqq[i]);
|
||||
|
||||
spin_unlock_irq(q->queue_lock);
|
||||
|
||||
cfq_shutdown_timer_wq(cfqd);
|
||||
|
||||
+3
-10
@@ -112,12 +112,8 @@ static inline int elv_try_merge(struct request *__rq, struct bio *bio)
|
||||
static struct elevator_type *elevator_find(const char *name)
|
||||
{
|
||||
struct elevator_type *e;
|
||||
struct list_head *entry;
|
||||
|
||||
list_for_each(entry, &elv_list) {
|
||||
|
||||
e = list_entry(entry, struct elevator_type, list);
|
||||
|
||||
list_for_each_entry(e, &elv_list, list) {
|
||||
if (!strcmp(e->elevator_name, name))
|
||||
return e;
|
||||
}
|
||||
@@ -1116,14 +1112,11 @@ ssize_t elv_iosched_show(request_queue_t *q, char *name)
|
||||
{
|
||||
elevator_t *e = q->elevator;
|
||||
struct elevator_type *elv = e->elevator_type;
|
||||
struct list_head *entry;
|
||||
struct elevator_type *__e;
|
||||
int len = 0;
|
||||
|
||||
spin_lock(&elv_list_lock);
|
||||
list_for_each(entry, &elv_list) {
|
||||
struct elevator_type *__e;
|
||||
|
||||
__e = list_entry(entry, struct elevator_type, list);
|
||||
list_for_each_entry(__e, &elv_list, list) {
|
||||
if (!strcmp(elv->elevator_name, __e->elevator_name))
|
||||
len += sprintf(name+len, "[%s] ", elv->elevator_name);
|
||||
else
|
||||
|
||||
+2
-11
@@ -527,8 +527,6 @@ int blk_do_ordered(request_queue_t *q, struct request **rqp)
|
||||
static int flush_dry_bio_endio(struct bio *bio, unsigned int bytes, int error)
|
||||
{
|
||||
request_queue_t *q = bio->bi_private;
|
||||
struct bio_vec *bvec;
|
||||
int i;
|
||||
|
||||
/*
|
||||
* This is dry run, restore bio_sector and size. We'll finish
|
||||
@@ -540,13 +538,6 @@ static int flush_dry_bio_endio(struct bio *bio, unsigned int bytes, int error)
|
||||
if (bio->bi_size)
|
||||
return 1;
|
||||
|
||||
/* Rewind bvec's */
|
||||
bio->bi_idx = 0;
|
||||
bio_for_each_segment(bvec, bio, i) {
|
||||
bvec->bv_len += bvec->bv_offset;
|
||||
bvec->bv_offset = 0;
|
||||
}
|
||||
|
||||
/* Reset bio */
|
||||
set_bit(BIO_UPTODATE, &bio->bi_flags);
|
||||
bio->bi_size = q->bi_size;
|
||||
@@ -1304,9 +1295,9 @@ static int blk_hw_contig_segment(request_queue_t *q, struct bio *bio,
|
||||
if (unlikely(!bio_flagged(nxt, BIO_SEG_VALID)))
|
||||
blk_recount_segments(q, nxt);
|
||||
if (!BIOVEC_VIRT_MERGEABLE(__BVEC_END(bio), __BVEC_START(nxt)) ||
|
||||
BIOVEC_VIRT_OVERSIZE(bio->bi_hw_front_size + bio->bi_hw_back_size))
|
||||
BIOVEC_VIRT_OVERSIZE(bio->bi_hw_back_size + nxt->bi_hw_front_size))
|
||||
return 0;
|
||||
if (bio->bi_size + nxt->bi_size > q->max_segment_size)
|
||||
if (bio->bi_hw_back_size + nxt->bi_hw_front_size > q->max_segment_size)
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
|
||||
@@ -24,8 +24,6 @@ source "drivers/scsi/Kconfig"
|
||||
|
||||
source "drivers/ata/Kconfig"
|
||||
|
||||
source "drivers/cdrom/Kconfig"
|
||||
|
||||
source "drivers/md/Kconfig"
|
||||
|
||||
source "drivers/message/fusion/Kconfig"
|
||||
|
||||
@@ -1246,7 +1246,7 @@ repeat:
|
||||
del_timer(&motor_off_timer);
|
||||
|
||||
ReqCnt = 0;
|
||||
ReqCmd = CURRENT->cmd;
|
||||
ReqCmd = rq_data_dir(CURRENT);
|
||||
ReqBlock = CURRENT->sector;
|
||||
ReqBuffer = CURRENT->buffer;
|
||||
setup_req_params(drive);
|
||||
|
||||
@@ -439,7 +439,7 @@ static void mfm_rw_intr(void)
|
||||
a choice of command end or some data which is ready to be collected */
|
||||
/* I think we have to transfer data while the interrupt line is on and its
|
||||
not any other type of interrupt */
|
||||
if (CURRENT->cmd == WRITE) {
|
||||
if (rq_data_dir(CURRENT) == WRITE) {
|
||||
extern void hdc63463_writedma(void);
|
||||
if ((hdc63463_dataleft <= 0) && (!(mfm_status & STAT_CED))) {
|
||||
printk("mfm_rw_intr: Apparent DMA write request when no more to DMA\n");
|
||||
@@ -799,7 +799,7 @@ static void issue_request(unsigned int block, unsigned int nsect,
|
||||
raw_cmd.head = start_head;
|
||||
raw_cmd.cylinder = track / p->heads;
|
||||
raw_cmd.cmdtype = CURRENT->cmd;
|
||||
raw_cmd.cmdcode = CURRENT->cmd == WRITE ? CMD_WD : CMD_RD;
|
||||
raw_cmd.cmdcode = rq_data_dir(CURRENT) == WRITE ? CMD_WD : CMD_RD;
|
||||
raw_cmd.cmddata[0] = dev + 1; /* DAG: +1 to get US */
|
||||
raw_cmd.cmddata[1] = raw_cmd.head;
|
||||
raw_cmd.cmddata[2] = raw_cmd.cylinder >> 8;
|
||||
@@ -830,7 +830,7 @@ static void issue_request(unsigned int block, unsigned int nsect,
|
||||
hdc63463_dataleft = nsect * 256; /* Better way? */
|
||||
|
||||
DBG("mfm%c: %sing: CHS=%d/%d/%d, sectors=%d, buffer=0x%08lx (%p)\n",
|
||||
raw_cmd.dev + 'a', (CURRENT->cmd == READ) ? "read" : "writ",
|
||||
raw_cmd.dev + 'a', rq_data_dir(CURRENT) == READ ? "read" : "writ",
|
||||
raw_cmd.cylinder,
|
||||
raw_cmd.head,
|
||||
raw_cmd.sector, nsect, (unsigned long) Copy_buffer, CURRENT);
|
||||
@@ -917,13 +917,6 @@ static void mfm_request(void)
|
||||
|
||||
DBG("mfm_request: block after offset=%d\n", block);
|
||||
|
||||
if (CURRENT->cmd != READ && CURRENT->cmd != WRITE) {
|
||||
printk("unknown mfm-command %d\n", CURRENT->cmd);
|
||||
end_request(CURRENT, 0);
|
||||
Busy = 0;
|
||||
printk("mfm: continue 4\n");
|
||||
continue;
|
||||
}
|
||||
issue_request(block, nsect, CURRENT);
|
||||
|
||||
break;
|
||||
|
||||
+7
-37
@@ -2,9 +2,12 @@
|
||||
# Block device driver configuration
|
||||
#
|
||||
|
||||
if BLOCK
|
||||
menuconfig BLK_DEV
|
||||
bool "Block devices"
|
||||
depends on BLOCK
|
||||
default y
|
||||
|
||||
menu "Block devices"
|
||||
if BLK_DEV
|
||||
|
||||
config BLK_DEV_FD
|
||||
tristate "Normal floppy disk support"
|
||||
@@ -56,40 +59,9 @@ config AMIGA_Z2RAM
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called z2ram.
|
||||
|
||||
config ATARI_ACSI
|
||||
tristate "Atari ACSI support"
|
||||
depends on ATARI && BROKEN
|
||||
---help---
|
||||
This enables support for the Atari ACSI interface. The driver
|
||||
supports hard disks and CD-ROMs, which have 512-byte sectors, or can
|
||||
be switched to that mode. Due to the ACSI command format, only disks
|
||||
up to 1 GB are supported. Special support for certain ACSI to SCSI
|
||||
adapters, which could relax that, isn't included yet. The ACSI
|
||||
driver is also the basis for certain other drivers for devices
|
||||
attached to the ACSI bus: Atari SLM laser printer, BioNet-100
|
||||
Ethernet, and PAMsNet Ethernet. If you want to use one of these
|
||||
devices, you need ACSI support, too.
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called acsi.
|
||||
|
||||
comment "Some devices (e.g. CD jukebox) support multiple LUNs"
|
||||
depends on ATARI && ATARI_ACSI
|
||||
|
||||
config ACSI_MULTI_LUN
|
||||
bool "Probe all LUNs on each ACSI device"
|
||||
depends on ATARI_ACSI
|
||||
help
|
||||
If you have a ACSI device that supports more than one LUN (Logical
|
||||
Unit Number), e.g. a CD jukebox, you should say Y here so that all
|
||||
will be found by the ACSI driver. An ACSI device with multiple LUNs
|
||||
acts logically like multiple ACSI devices. The vast majority of ACSI
|
||||
devices have only one LUN, and so most people can say N here and
|
||||
should in fact do so, because it is safer.
|
||||
|
||||
config ATARI_SLM
|
||||
tristate "Atari SLM laser printer support"
|
||||
depends on ATARI && ATARI_ACSI!=n
|
||||
depends on ATARI
|
||||
help
|
||||
If you have an Atari SLM laser printer, say Y to include support for
|
||||
it in the kernel. Otherwise, say N. This driver is also available as
|
||||
@@ -453,6 +425,4 @@ config ATA_OVER_ETH
|
||||
|
||||
source "drivers/s390/block/Kconfig"
|
||||
|
||||
endmenu
|
||||
|
||||
endif
|
||||
endif # BLK_DEV
|
||||
|
||||
@@ -9,7 +9,6 @@ obj-$(CONFIG_MAC_FLOPPY) += swim3.o
|
||||
obj-$(CONFIG_BLK_DEV_FD) += floppy.o
|
||||
obj-$(CONFIG_AMIGA_FLOPPY) += amiflop.o
|
||||
obj-$(CONFIG_ATARI_FLOPPY) += ataflop.o
|
||||
obj-$(CONFIG_ATARI_ACSI) += acsi.o
|
||||
obj-$(CONFIG_ATARI_SLM) += acsi_slm.o
|
||||
obj-$(CONFIG_AMIGA_Z2RAM) += z2ram.o
|
||||
obj-$(CONFIG_BLK_DEV_RAM) += rd.o
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1363,7 +1363,7 @@ static void redo_fd_request(void)
|
||||
#ifdef DEBUG
|
||||
printk("fd: sector %ld + %d requested for %s\n",
|
||||
CURRENT->sector,cnt,
|
||||
(CURRENT->cmd==READ)?"read":"write");
|
||||
(rq_data_dir(CURRENT) == READ) ? "read" : "write");
|
||||
#endif
|
||||
block = CURRENT->sector + cnt;
|
||||
if ((int)block > floppy->blocks) {
|
||||
|
||||
@@ -87,6 +87,7 @@ static const struct pci_device_id cciss_pci_device_id[] = {
|
||||
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, 0x103C, 0x3214},
|
||||
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, 0x103C, 0x3215},
|
||||
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC, 0x103C, 0x3237},
|
||||
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC, 0x103C, 0x323D},
|
||||
{PCI_VENDOR_ID_HP, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
|
||||
PCI_CLASS_STORAGE_RAID << 8, 0xffff << 8, 0},
|
||||
{0,}
|
||||
@@ -119,6 +120,7 @@ static struct board_type products[] = {
|
||||
{0x3214103C, "Smart Array E200i", &SA5_access, 120},
|
||||
{0x3215103C, "Smart Array E200i", &SA5_access, 120},
|
||||
{0x3237103C, "Smart Array E500", &SA5_access, 512},
|
||||
{0x323D103C, "Smart Array P700m", &SA5_access, 512},
|
||||
{0xFFFF103C, "Unknown Smart Array", &SA5_access, 120},
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -416,7 +416,7 @@ static void nbd_clear_que(struct nbd_device *lo)
|
||||
/*
|
||||
* We always wait for result of write, for now. It would be nice to make it optional
|
||||
* in future
|
||||
* if ((req->cmd == WRITE) && (lo->flags & NBD_WRITE_NOCHK))
|
||||
* if ((rq_data_dir(req) == WRITE) && (lo->flags & NBD_WRITE_NOCHK))
|
||||
* { printk( "Warning: Ignoring result!\n"); nbd_end_request( req ); }
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,213 +0,0 @@
|
||||
#
|
||||
# CDROM driver configuration
|
||||
#
|
||||
|
||||
menu "Old CD-ROM drivers (not SCSI, not IDE)"
|
||||
depends on ISA && BLOCK
|
||||
|
||||
config CD_NO_IDESCSI
|
||||
bool "Support non-SCSI/IDE/ATAPI CDROM drives"
|
||||
---help---
|
||||
If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y
|
||||
here, otherwise N. Read the CD-ROM-HOWTO, available from
|
||||
<http://www.tldp.org/docs.html#howto>.
|
||||
|
||||
Note that the answer to this question doesn't directly affect the
|
||||
kernel: saying N will just cause the configurator to skip all
|
||||
the questions about these CD-ROM drives. If you are unsure what you
|
||||
have, say Y and find out whether you have one of the following
|
||||
drives.
|
||||
|
||||
For each of these drivers, a <file:Documentation/cdrom/{driver_name}>
|
||||
exists. Especially in cases where you do not know exactly which kind
|
||||
of drive you have you should read there. Most of these drivers use a
|
||||
file drivers/cdrom/{driver_name}.h where you can define your
|
||||
interface parameters and switch some internal goodies.
|
||||
|
||||
To compile these CD-ROM drivers as a module, choose M instead of Y.
|
||||
|
||||
If you want to use any of these CD-ROM drivers, you also have to
|
||||
answer Y or M to "ISO 9660 CD-ROM file system support" below (this
|
||||
answer will get "defaulted" for you if you enable any of the Linux
|
||||
CD-ROM drivers).
|
||||
|
||||
config AZTCD
|
||||
tristate "Aztech/Orchid/Okano/Wearnes/TXC/CyDROM CDROM support"
|
||||
depends on CD_NO_IDESCSI
|
||||
---help---
|
||||
This is your driver if you have an Aztech CDA268-01A, Orchid
|
||||
CD-3110, Okano or Wearnes CDD110, Conrad TXC, or CyCD-ROM CR520 or
|
||||
CR540 CD-ROM drive. This driver -- just like all these CD-ROM
|
||||
drivers -- is NOT for CD-ROM drives with IDE/ATAPI interfaces, such
|
||||
as Aztech CDA269-031SE. Please read the file
|
||||
<file:Documentation/cdrom/aztcd>.
|
||||
|
||||
If you say Y here, you should also say Y or M to "ISO 9660 CD-ROM
|
||||
file system support" below, because that's the file system used on
|
||||
CD-ROMs.
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called aztcd.
|
||||
|
||||
config GSCD
|
||||
tristate "Goldstar R420 CDROM support"
|
||||
depends on CD_NO_IDESCSI
|
||||
---help---
|
||||
If this is your CD-ROM drive, say Y here. As described in the file
|
||||
<file:Documentation/cdrom/gscd>, you might have to change a setting
|
||||
in the file <file:drivers/cdrom/gscd.h> before compiling the
|
||||
kernel. Please read the file <file:Documentation/cdrom/gscd>.
|
||||
|
||||
If you say Y here, you should also say Y or M to "ISO 9660 CD-ROM
|
||||
file system support" below, because that's the file system used on
|
||||
CD-ROMs.
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called gscd.
|
||||
|
||||
config SBPCD
|
||||
tristate "Matsushita/Panasonic/Creative, Longshine, TEAC CDROM support"
|
||||
depends on CD_NO_IDESCSI && BROKEN_ON_SMP
|
||||
---help---
|
||||
This driver supports most of the drives which use the Panasonic or
|
||||
Sound Blaster interface. Please read the file
|
||||
<file:Documentation/cdrom/sbpcd>.
|
||||
|
||||
The Matsushita CR-521, CR-522, CR-523, CR-562, CR-563 drives
|
||||
(sometimes labeled "Creative"), the Creative Labs CD200, the
|
||||
Longshine LCS-7260, the "IBM External ISA CD-ROM" (in fact a CR-56x
|
||||
model), the TEAC CD-55A fall under this category. Some other
|
||||
"electrically compatible" drives (Vertos, Genoa, some Funai models)
|
||||
are currently not supported; for the Sanyo H94A drive currently a
|
||||
separate driver (asked later) is responsible. Most drives have a
|
||||
uniquely shaped faceplate, with a caddyless motorized drawer, but
|
||||
without external brand markings. The older CR-52x drives have a
|
||||
caddy and manual loading/eject, but still no external markings. The
|
||||
driver is able to do an extended auto-probing for interface
|
||||
addresses and drive types; this can help to find facts in cases you
|
||||
are not sure, but can consume some time during the boot process if
|
||||
none of the supported drives gets found. Once your drive got found,
|
||||
you should enter the reported parameters into
|
||||
<file:drivers/cdrom/sbpcd.h> and set "DISTRIBUTION 0" there.
|
||||
|
||||
This driver can support up to four CD-ROM controller cards, and each
|
||||
card can support up to four CD-ROM drives; if you say Y here, you
|
||||
will be asked how many controller cards you have. If compiled as a
|
||||
module, only one controller card (but with up to four drives) is
|
||||
usable.
|
||||
|
||||
If you say Y here, you should also say Y or M to "ISO 9660 CD-ROM
|
||||
file system support" below, because that's the file system used on
|
||||
CD-ROMs.
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called sbpcd.
|
||||
|
||||
config MCDX
|
||||
tristate "Mitsumi CDROM support"
|
||||
depends on CD_NO_IDESCSI
|
||||
---help---
|
||||
Use this driver if you want to be able to use your Mitsumi LU-005,
|
||||
FX-001 or FX-001D CD-ROM drive.
|
||||
|
||||
Please read the file <file:Documentation/cdrom/mcdx>.
|
||||
|
||||
If you say Y here, you should also say Y or M to "ISO 9660 CD-ROM
|
||||
file system support" below, because that's the file system used on
|
||||
CD-ROMs.
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called mcdx.
|
||||
|
||||
config OPTCD
|
||||
tristate "Optics Storage DOLPHIN 8000AT CDROM support"
|
||||
depends on CD_NO_IDESCSI
|
||||
---help---
|
||||
This is the driver for the 'DOLPHIN' drive with a 34-pin Sony
|
||||
compatible interface. It also works with the Lasermate CR328A. If
|
||||
you have one of those, say Y. This driver does not work for the
|
||||
Optics Storage 8001 drive; use the IDE-ATAPI CD-ROM driver for that
|
||||
one. Please read the file <file:Documentation/cdrom/optcd>.
|
||||
|
||||
If you say Y here, you should also say Y or M to "ISO 9660 CD-ROM
|
||||
file system support" below, because that's the file system used on
|
||||
CD-ROMs.
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called optcd.
|
||||
|
||||
config CM206
|
||||
tristate "Philips/LMS CM206 CDROM support"
|
||||
depends on CD_NO_IDESCSI && BROKEN_ON_SMP
|
||||
---help---
|
||||
If you have a Philips/LMS CD-ROM drive cm206 in combination with a
|
||||
cm260 host adapter card, say Y here. Please also read the file
|
||||
<file:Documentation/cdrom/cm206>.
|
||||
|
||||
If you say Y here, you should also say Y or M to "ISO 9660 CD-ROM
|
||||
file system support" below, because that's the file system used on
|
||||
CD-ROMs.
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called cm206.
|
||||
|
||||
config SJCD
|
||||
tristate "Sanyo CDR-H94A CDROM support"
|
||||
depends on CD_NO_IDESCSI
|
||||
help
|
||||
If this is your CD-ROM drive, say Y here and read the file
|
||||
<file:Documentation/cdrom/sjcd>. You should then also say Y or M to
|
||||
"ISO 9660 CD-ROM file system support" below, because that's the
|
||||
file system used on CD-ROMs.
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called sjcd.
|
||||
|
||||
config ISP16_CDI
|
||||
tristate "ISP16/MAD16/Mozart soft configurable cdrom interface support"
|
||||
depends on CD_NO_IDESCSI
|
||||
---help---
|
||||
These are sound cards with built-in cdrom interfaces using the OPTi
|
||||
82C928 or 82C929 chips. Say Y here to have them detected and
|
||||
possibly configured at boot time. In addition, You'll have to say Y
|
||||
to a driver for the particular cdrom drive you have attached to the
|
||||
card. Read <file:Documentation/cdrom/isp16> for details.
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called isp16.
|
||||
|
||||
config CDU31A
|
||||
tristate "Sony CDU31A/CDU33A CDROM support"
|
||||
depends on CD_NO_IDESCSI && BROKEN_ON_SMP
|
||||
---help---
|
||||
These CD-ROM drives have a spring-pop-out caddyless drawer, and a
|
||||
rectangular green LED centered beneath it. NOTE: these CD-ROM
|
||||
drives will not be auto detected by the kernel at boot time; you
|
||||
have to provide the interface address as an option to the kernel at
|
||||
boot time as described in <file:Documentation/cdrom/cdu31a> or fill
|
||||
in your parameters into <file:drivers/cdrom/cdu31a.c>. Try "man
|
||||
bootparam" or see the documentation of your boot loader (lilo or
|
||||
loadlin) about how to pass options to the kernel.
|
||||
|
||||
If you say Y here, you should also say Y or M to "ISO 9660 CD-ROM
|
||||
file system support" below, because that's the file system used on
|
||||
CD-ROMs.
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called cdu31a.
|
||||
|
||||
config CDU535
|
||||
tristate "Sony CDU535 CDROM support"
|
||||
depends on CD_NO_IDESCSI
|
||||
---help---
|
||||
This is the driver for the older Sony CDU-535 and CDU-531 CD-ROM
|
||||
drives. Please read the file <file:Documentation/cdrom/sonycd535>.
|
||||
|
||||
If you say Y here, you should also say Y or M to "ISO 9660 CD-ROM
|
||||
file system support" below, because that's the file system used on
|
||||
CD-ROMs.
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called sonycd535.
|
||||
|
||||
endmenu
|
||||
@@ -10,14 +10,4 @@ obj-$(CONFIG_BLK_DEV_SR) += cdrom.o
|
||||
obj-$(CONFIG_PARIDE_PCD) += cdrom.o
|
||||
obj-$(CONFIG_CDROM_PKTCDVD) += cdrom.o
|
||||
|
||||
obj-$(CONFIG_AZTCD) += aztcd.o
|
||||
obj-$(CONFIG_CDU31A) += cdu31a.o cdrom.o
|
||||
obj-$(CONFIG_CM206) += cm206.o cdrom.o
|
||||
obj-$(CONFIG_GSCD) += gscd.o
|
||||
obj-$(CONFIG_ISP16_CDI) += isp16.o
|
||||
obj-$(CONFIG_MCDX) += mcdx.o cdrom.o
|
||||
obj-$(CONFIG_OPTCD) += optcd.o
|
||||
obj-$(CONFIG_SBPCD) += sbpcd.o cdrom.o
|
||||
obj-$(CONFIG_SJCD) += sjcd.o
|
||||
obj-$(CONFIG_CDU535) += sonycd535.o
|
||||
obj-$(CONFIG_VIOCD) += viocd.o cdrom.o
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,162 +0,0 @@
|
||||
/* $Id: aztcd.h,v 2.60 1997/11/29 09:51:22 root Exp root $
|
||||
*
|
||||
* Definitions for a AztechCD268 CD-ROM interface
|
||||
* Copyright (C) 1994-98 Werner Zimmermann
|
||||
*
|
||||
* based on Mitsumi CDROM driver by Martin Harriss
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* History: W.Zimmermann adaption to Aztech CD268-01A Version 1.3
|
||||
* October 1994 Email: Werner.Zimmermann@fht-esslingen.de
|
||||
*/
|
||||
|
||||
/* *** change this to set the I/O port address of your CD-ROM drive,
|
||||
set to '-1', if you want autoprobing */
|
||||
#define AZT_BASE_ADDR -1
|
||||
|
||||
/* list of autoprobing addresses (not more than 15), last value must be 0x000
|
||||
Note: Autoprobing is only enabled, if AZT_BASE_ADDR is set to '-1' ! */
|
||||
#define AZT_BASE_AUTO { 0x320, 0x300, 0x310, 0x330, 0x000 }
|
||||
|
||||
/* Uncomment this, if your CDROM is connected to a Soundwave32-soundcard
|
||||
and configure AZT_BASE_ADDR and AZT_SW32_BASE_ADDR */
|
||||
/*#define AZT_SW32 1
|
||||
*/
|
||||
|
||||
#ifdef AZT_SW32
|
||||
#define AZT_SW32_BASE_ADDR 0x220 /*I/O port base address of your soundcard*/
|
||||
#endif
|
||||
|
||||
/* Set this to 1, if you want your tray to be locked, set to 0 to prevent tray
|
||||
from locking */
|
||||
#define AZT_ALLOW_TRAY_LOCK 1
|
||||
|
||||
/*Set this to 1 to allow auto-eject when unmounting a disk, set to 0, if you
|
||||
don't want the auto-eject feature*/
|
||||
#define AZT_AUTO_EJECT 0
|
||||
|
||||
/*Set this to 1, if you want to use incompatible ioctls for reading in raw and
|
||||
cooked mode */
|
||||
#define AZT_PRIVATE_IOCTLS 1
|
||||
|
||||
/*Set this to 1, if you want multisession support by the ISO fs. Even if you set
|
||||
this value to '0' you can use multisession CDs. In that case the drive's firm-
|
||||
ware will do the appropriate redirection automatically. The CD will then look
|
||||
like a single session CD (but nevertheless all data may be read). Please read
|
||||
chapter '5.1 Multisession support' in README.aztcd for details. Normally it's
|
||||
uncritical to leave this setting untouched */
|
||||
#define AZT_MULTISESSION 1
|
||||
|
||||
/*Uncomment this, if you are using a linux kernel version prior to 2.1.0 */
|
||||
/*#define AZT_KERNEL_PRIOR_2_1 */
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/*-----nothing to be configured for normal applications below this line------*/
|
||||
|
||||
|
||||
/* Increase this if you get lots of timeouts; if you get kernel panic, replace
|
||||
STEN_LOW_WAIT by STEN_LOW in the source code */
|
||||
#define AZT_STATUS_DELAY 400 /*for timer wait, STEN_LOW_WAIT*/
|
||||
#define AZT_TIMEOUT 8000000 /*for busy wait STEN_LOW, DTEN_LOW*/
|
||||
#define AZT_FAST_TIMEOUT 10000 /*for reading the version string*/
|
||||
|
||||
/* number of times to retry a command before giving up */
|
||||
#define AZT_RETRY_ATTEMPTS 3
|
||||
|
||||
/* port access macros */
|
||||
#define CMD_PORT azt_port
|
||||
#define DATA_PORT azt_port
|
||||
#define STATUS_PORT azt_port+1
|
||||
#define MODE_PORT azt_port+2
|
||||
#ifdef AZT_SW32
|
||||
#define AZT_SW32_INIT (unsigned int) (0xFF00 & (AZT_BASE_ADDR*16))
|
||||
#define AZT_SW32_CONFIG_REG AZT_SW32_BASE_ADDR+0x16 /*Soundwave32 Config. Register*/
|
||||
#define AZT_SW32_ID_REG AZT_SW32_BASE_ADDR+0x04 /*Soundwave32 ID Version Register*/
|
||||
#endif
|
||||
|
||||
/* status bits */
|
||||
#define AST_CMD_CHECK 0x80 /* 1 = command error */
|
||||
#define AST_DOOR_OPEN 0x40 /* 1 = door is open */
|
||||
#define AST_NOT_READY 0x20 /* 1 = no disk in the drive */
|
||||
#define AST_DSK_CHG 0x02 /* 1 = disk removed or changed */
|
||||
#define AST_MODE 0x01 /* 0=MODE1, 1=MODE2 */
|
||||
#define AST_MODE_BITS 0x1C /* Mode Bits */
|
||||
#define AST_INITIAL 0x0C /* initial, only valid ... */
|
||||
#define AST_BUSY 0x04 /* now playing, only valid
|
||||
in combination with mode
|
||||
bits */
|
||||
/* flag bits */
|
||||
#define AFL_DATA 0x02 /* data available if low */
|
||||
#define AFL_STATUS 0x04 /* status available if low */
|
||||
#define AFL_OP_OK 0x01 /* OP_OK command correct*/
|
||||
#define AFL_PA_OK 0x02 /* PA_OK parameter correct*/
|
||||
#define AFL_OP_ERR 0x05 /* error in command*/
|
||||
#define AFL_PA_ERR 0x06 /* error in parameters*/
|
||||
#define POLLED 0x04 /* polled mode */
|
||||
|
||||
/* commands */
|
||||
#define ACMD_SOFT_RESET 0x10 /* reset drive */
|
||||
#define ACMD_PLAY_READ 0x20 /* read data track in cooked mode */
|
||||
#define ACMD_PLAY_READ_RAW 0x21 /* reading in raw mode*/
|
||||
#define ACMD_SEEK 0x30 /* seek msf address*/
|
||||
#define ACMD_SEEK_TO_LEADIN 0x31 /* seek to leadin track*/
|
||||
#define ACMD_GET_ERROR 0x40 /* get error code */
|
||||
#define ACMD_GET_STATUS 0x41 /* get status */
|
||||
#define ACMD_GET_Q_CHANNEL 0x50 /* read info from q channel */
|
||||
#define ACMD_EJECT 0x60 /* eject/open tray */
|
||||
#define ACMD_CLOSE 0x61 /* close tray */
|
||||
#define ACMD_LOCK 0x71 /* lock tray closed */
|
||||
#define ACMD_UNLOCK 0x72 /* unlock tray */
|
||||
#define ACMD_PAUSE 0x80 /* pause */
|
||||
#define ACMD_STOP 0x81 /* stop play */
|
||||
#define ACMD_PLAY_AUDIO 0x90 /* play audio track */
|
||||
#define ACMD_SET_VOLUME 0x93 /* set audio level */
|
||||
#define ACMD_GET_VERSION 0xA0 /* get firmware version */
|
||||
#define ACMD_SET_DISK_TYPE 0xA1 /* set disk data mode */
|
||||
|
||||
#define MAX_TRACKS 104
|
||||
|
||||
struct msf {
|
||||
unsigned char min;
|
||||
unsigned char sec;
|
||||
unsigned char frame;
|
||||
};
|
||||
|
||||
struct azt_Play_msf {
|
||||
struct msf start;
|
||||
struct msf end;
|
||||
};
|
||||
|
||||
struct azt_DiskInfo {
|
||||
unsigned char first;
|
||||
unsigned char next;
|
||||
unsigned char last;
|
||||
struct msf diskLength;
|
||||
struct msf firstTrack;
|
||||
unsigned char multi;
|
||||
struct msf nextSession;
|
||||
struct msf lastSession;
|
||||
unsigned char xa;
|
||||
unsigned char audio;
|
||||
};
|
||||
|
||||
struct azt_Toc {
|
||||
unsigned char ctrl_addr;
|
||||
unsigned char track;
|
||||
unsigned char pointIndex;
|
||||
struct msf trackTime;
|
||||
struct msf diskTime;
|
||||
};
|
||||
+125
-91
@@ -302,7 +302,7 @@ module_param(lockdoor, bool, 0);
|
||||
module_param(check_media_type, bool, 0);
|
||||
module_param(mrw_format_restart, bool, 0);
|
||||
|
||||
static DEFINE_SPINLOCK(cdrom_lock);
|
||||
static DEFINE_MUTEX(cdrom_mutex);
|
||||
|
||||
static const char *mrw_format_status[] = {
|
||||
"not mrw",
|
||||
@@ -438,10 +438,10 @@ int register_cdrom(struct cdrom_device_info *cdi)
|
||||
cdo->generic_packet = cdrom_dummy_generic_packet;
|
||||
|
||||
cdinfo(CD_REG_UNREG, "drive \"/dev/%s\" registered\n", cdi->name);
|
||||
spin_lock(&cdrom_lock);
|
||||
mutex_lock(&cdrom_mutex);
|
||||
cdi->next = topCdromPtr;
|
||||
topCdromPtr = cdi;
|
||||
spin_unlock(&cdrom_lock);
|
||||
mutex_unlock(&cdrom_mutex);
|
||||
return 0;
|
||||
}
|
||||
#undef ENSURE
|
||||
@@ -452,7 +452,7 @@ int unregister_cdrom(struct cdrom_device_info *unreg)
|
||||
cdinfo(CD_OPEN, "entering unregister_cdrom\n");
|
||||
|
||||
prev = NULL;
|
||||
spin_lock(&cdrom_lock);
|
||||
mutex_lock(&cdrom_mutex);
|
||||
cdi = topCdromPtr;
|
||||
while (cdi && cdi != unreg) {
|
||||
prev = cdi;
|
||||
@@ -460,7 +460,7 @@ int unregister_cdrom(struct cdrom_device_info *unreg)
|
||||
}
|
||||
|
||||
if (cdi == NULL) {
|
||||
spin_unlock(&cdrom_lock);
|
||||
mutex_unlock(&cdrom_mutex);
|
||||
return -2;
|
||||
}
|
||||
if (prev)
|
||||
@@ -468,7 +468,7 @@ int unregister_cdrom(struct cdrom_device_info *unreg)
|
||||
else
|
||||
topCdromPtr = cdi->next;
|
||||
|
||||
spin_unlock(&cdrom_lock);
|
||||
mutex_unlock(&cdrom_mutex);
|
||||
|
||||
if (cdi->exit)
|
||||
cdi->exit(cdi);
|
||||
@@ -3289,103 +3289,137 @@ static struct cdrom_sysctl_settings {
|
||||
int check; /* check media type */
|
||||
} cdrom_sysctl_settings;
|
||||
|
||||
enum cdrom_print_option {
|
||||
CTL_NAME,
|
||||
CTL_SPEED,
|
||||
CTL_SLOTS,
|
||||
CTL_CAPABILITY
|
||||
};
|
||||
|
||||
static int cdrom_print_info(const char *header, int val, char *info,
|
||||
int *pos, enum cdrom_print_option option)
|
||||
{
|
||||
const int max_size = sizeof(cdrom_sysctl_settings.info);
|
||||
struct cdrom_device_info *cdi;
|
||||
int ret;
|
||||
|
||||
ret = scnprintf(info + *pos, max_size - *pos, header);
|
||||
if (!ret)
|
||||
return 1;
|
||||
|
||||
*pos += ret;
|
||||
|
||||
for (cdi = topCdromPtr; cdi; cdi = cdi->next) {
|
||||
switch (option) {
|
||||
case CTL_NAME:
|
||||
ret = scnprintf(info + *pos, max_size - *pos,
|
||||
"\t%s", cdi->name);
|
||||
break;
|
||||
case CTL_SPEED:
|
||||
ret = scnprintf(info + *pos, max_size - *pos,
|
||||
"\t%d", cdi->speed);
|
||||
break;
|
||||
case CTL_SLOTS:
|
||||
ret = scnprintf(info + *pos, max_size - *pos,
|
||||
"\t%d", cdi->capacity);
|
||||
break;
|
||||
case CTL_CAPABILITY:
|
||||
ret = scnprintf(info + *pos, max_size - *pos,
|
||||
"\t%d", CDROM_CAN(val) != 0);
|
||||
break;
|
||||
default:
|
||||
printk(KERN_INFO "cdrom: invalid option%d\n", option);
|
||||
return 1;
|
||||
}
|
||||
if (!ret)
|
||||
return 1;
|
||||
*pos += ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cdrom_sysctl_info(ctl_table *ctl, int write, struct file * filp,
|
||||
void __user *buffer, size_t *lenp, loff_t *ppos)
|
||||
{
|
||||
int pos;
|
||||
struct cdrom_device_info *cdi;
|
||||
int pos;
|
||||
char *info = cdrom_sysctl_settings.info;
|
||||
const int max_size = sizeof(cdrom_sysctl_settings.info);
|
||||
|
||||
if (!*lenp || (*ppos && !write)) {
|
||||
*lenp = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
mutex_lock(&cdrom_mutex);
|
||||
|
||||
pos = sprintf(info, "CD-ROM information, " VERSION "\n");
|
||||
|
||||
pos += sprintf(info+pos, "\ndrive name:\t");
|
||||
for (cdi=topCdromPtr;cdi!=NULL;cdi=cdi->next)
|
||||
pos += sprintf(info+pos, "\t%s", cdi->name);
|
||||
|
||||
pos += sprintf(info+pos, "\ndrive speed:\t");
|
||||
for (cdi=topCdromPtr;cdi!=NULL;cdi=cdi->next)
|
||||
pos += sprintf(info+pos, "\t%d", cdi->speed);
|
||||
|
||||
pos += sprintf(info+pos, "\ndrive # of slots:");
|
||||
for (cdi=topCdromPtr;cdi!=NULL;cdi=cdi->next)
|
||||
pos += sprintf(info+pos, "\t%d", cdi->capacity);
|
||||
|
||||
pos += sprintf(info+pos, "\nCan close tray:\t");
|
||||
for (cdi=topCdromPtr;cdi!=NULL;cdi=cdi->next)
|
||||
pos += sprintf(info+pos, "\t%d", CDROM_CAN(CDC_CLOSE_TRAY) != 0);
|
||||
|
||||
pos += sprintf(info+pos, "\nCan open tray:\t");
|
||||
for (cdi=topCdromPtr;cdi!=NULL;cdi=cdi->next)
|
||||
pos += sprintf(info+pos, "\t%d", CDROM_CAN(CDC_OPEN_TRAY) != 0);
|
||||
|
||||
pos += sprintf(info+pos, "\nCan lock tray:\t");
|
||||
for (cdi=topCdromPtr;cdi!=NULL;cdi=cdi->next)
|
||||
pos += sprintf(info+pos, "\t%d", CDROM_CAN(CDC_LOCK) != 0);
|
||||
|
||||
pos += sprintf(info+pos, "\nCan change speed:");
|
||||
for (cdi=topCdromPtr;cdi!=NULL;cdi=cdi->next)
|
||||
pos += sprintf(info+pos, "\t%d", CDROM_CAN(CDC_SELECT_SPEED) != 0);
|
||||
|
||||
pos += sprintf(info+pos, "\nCan select disk:");
|
||||
for (cdi=topCdromPtr;cdi!=NULL;cdi=cdi->next)
|
||||
pos += sprintf(info+pos, "\t%d", CDROM_CAN(CDC_SELECT_DISC) != 0);
|
||||
|
||||
pos += sprintf(info+pos, "\nCan read multisession:");
|
||||
for (cdi=topCdromPtr;cdi!=NULL;cdi=cdi->next)
|
||||
pos += sprintf(info+pos, "\t%d", CDROM_CAN(CDC_MULTI_SESSION) != 0);
|
||||
|
||||
pos += sprintf(info+pos, "\nCan read MCN:\t");
|
||||
for (cdi=topCdromPtr;cdi!=NULL;cdi=cdi->next)
|
||||
pos += sprintf(info+pos, "\t%d", CDROM_CAN(CDC_MCN) != 0);
|
||||
|
||||
pos += sprintf(info+pos, "\nReports media changed:");
|
||||
for (cdi=topCdromPtr;cdi!=NULL;cdi=cdi->next)
|
||||
pos += sprintf(info+pos, "\t%d", CDROM_CAN(CDC_MEDIA_CHANGED) != 0);
|
||||
|
||||
pos += sprintf(info+pos, "\nCan play audio:\t");
|
||||
for (cdi=topCdromPtr;cdi!=NULL;cdi=cdi->next)
|
||||
pos += sprintf(info+pos, "\t%d", CDROM_CAN(CDC_PLAY_AUDIO) != 0);
|
||||
|
||||
pos += sprintf(info+pos, "\nCan write CD-R:\t");
|
||||
for (cdi=topCdromPtr;cdi!=NULL;cdi=cdi->next)
|
||||
pos += sprintf(info+pos, "\t%d", CDROM_CAN(CDC_CD_R) != 0);
|
||||
|
||||
pos += sprintf(info+pos, "\nCan write CD-RW:");
|
||||
for (cdi=topCdromPtr;cdi!=NULL;cdi=cdi->next)
|
||||
pos += sprintf(info+pos, "\t%d", CDROM_CAN(CDC_CD_RW) != 0);
|
||||
|
||||
pos += sprintf(info+pos, "\nCan read DVD:\t");
|
||||
for (cdi=topCdromPtr;cdi!=NULL;cdi=cdi->next)
|
||||
pos += sprintf(info+pos, "\t%d", CDROM_CAN(CDC_DVD) != 0);
|
||||
|
||||
pos += sprintf(info+pos, "\nCan write DVD-R:");
|
||||
for (cdi=topCdromPtr;cdi!=NULL;cdi=cdi->next)
|
||||
pos += sprintf(info+pos, "\t%d", CDROM_CAN(CDC_DVD_R) != 0);
|
||||
|
||||
pos += sprintf(info+pos, "\nCan write DVD-RAM:");
|
||||
for (cdi=topCdromPtr;cdi!=NULL;cdi=cdi->next)
|
||||
pos += sprintf(info+pos, "\t%d", CDROM_CAN(CDC_DVD_RAM) != 0);
|
||||
|
||||
pos += sprintf(info+pos, "\nCan read MRW:\t");
|
||||
for (cdi=topCdromPtr;cdi!=NULL;cdi=cdi->next)
|
||||
pos += sprintf(info+pos, "\t%d", CDROM_CAN(CDC_MRW) != 0);
|
||||
|
||||
pos += sprintf(info+pos, "\nCan write MRW:\t");
|
||||
for (cdi=topCdromPtr;cdi!=NULL;cdi=cdi->next)
|
||||
pos += sprintf(info+pos, "\t%d", CDROM_CAN(CDC_MRW_W) != 0);
|
||||
|
||||
pos += sprintf(info+pos, "\nCan write RAM:\t");
|
||||
for (cdi=topCdromPtr;cdi!=NULL;cdi=cdi->next)
|
||||
pos += sprintf(info+pos, "\t%d", CDROM_CAN(CDC_RAM) != 0);
|
||||
|
||||
strcpy(info+pos,"\n\n");
|
||||
|
||||
return proc_dostring(ctl, write, filp, buffer, lenp, ppos);
|
||||
if (cdrom_print_info("\ndrive name:\t", 0, info, &pos, CTL_NAME))
|
||||
goto done;
|
||||
if (cdrom_print_info("\ndrive speed:\t", 0, info, &pos, CTL_SPEED))
|
||||
goto done;
|
||||
if (cdrom_print_info("\ndrive # of slots:", 0, info, &pos, CTL_SLOTS))
|
||||
goto done;
|
||||
if (cdrom_print_info("\nCan close tray:\t",
|
||||
CDC_CLOSE_TRAY, info, &pos, CTL_CAPABILITY))
|
||||
goto done;
|
||||
if (cdrom_print_info("\nCan open tray:\t",
|
||||
CDC_OPEN_TRAY, info, &pos, CTL_CAPABILITY))
|
||||
goto done;
|
||||
if (cdrom_print_info("\nCan lock tray:\t",
|
||||
CDC_LOCK, info, &pos, CTL_CAPABILITY))
|
||||
goto done;
|
||||
if (cdrom_print_info("\nCan change speed:",
|
||||
CDC_SELECT_SPEED, info, &pos, CTL_CAPABILITY))
|
||||
goto done;
|
||||
if (cdrom_print_info("\nCan select disk:",
|
||||
CDC_SELECT_DISC, info, &pos, CTL_CAPABILITY))
|
||||
goto done;
|
||||
if (cdrom_print_info("\nCan read multisession:",
|
||||
CDC_MULTI_SESSION, info, &pos, CTL_CAPABILITY))
|
||||
goto done;
|
||||
if (cdrom_print_info("\nCan read MCN:\t",
|
||||
CDC_MCN, info, &pos, CTL_CAPABILITY))
|
||||
goto done;
|
||||
if (cdrom_print_info("\nReports media changed:",
|
||||
CDC_MEDIA_CHANGED, info, &pos, CTL_CAPABILITY))
|
||||
goto done;
|
||||
if (cdrom_print_info("\nCan play audio:\t",
|
||||
CDC_PLAY_AUDIO, info, &pos, CTL_CAPABILITY))
|
||||
goto done;
|
||||
if (cdrom_print_info("\nCan write CD-R:\t",
|
||||
CDC_CD_R, info, &pos, CTL_CAPABILITY))
|
||||
goto done;
|
||||
if (cdrom_print_info("\nCan write CD-RW:",
|
||||
CDC_CD_RW, info, &pos, CTL_CAPABILITY))
|
||||
goto done;
|
||||
if (cdrom_print_info("\nCan read DVD:\t",
|
||||
CDC_DVD, info, &pos, CTL_CAPABILITY))
|
||||
goto done;
|
||||
if (cdrom_print_info("\nCan write DVD-R:",
|
||||
CDC_DVD_R, info, &pos, CTL_CAPABILITY))
|
||||
goto done;
|
||||
if (cdrom_print_info("\nCan write DVD-RAM:",
|
||||
CDC_DVD_RAM, info, &pos, CTL_CAPABILITY))
|
||||
goto done;
|
||||
if (cdrom_print_info("\nCan read MRW:\t",
|
||||
CDC_MRW, info, &pos, CTL_CAPABILITY))
|
||||
goto done;
|
||||
if (cdrom_print_info("\nCan write MRW:\t",
|
||||
CDC_MRW_W, info, &pos, CTL_CAPABILITY))
|
||||
goto done;
|
||||
if (cdrom_print_info("\nCan write RAM:\t",
|
||||
CDC_RAM, info, &pos, CTL_CAPABILITY))
|
||||
goto done;
|
||||
if (!scnprintf(info + pos, max_size - pos, "\n\n"))
|
||||
goto done;
|
||||
doit:
|
||||
mutex_unlock(&cdrom_mutex);
|
||||
return proc_dostring(ctl, write, filp, buffer, lenp, ppos);
|
||||
done:
|
||||
printk(KERN_INFO "cdrom: info buffer too small\n");
|
||||
goto doit;
|
||||
}
|
||||
|
||||
/* Unfortunately, per device settings are not implemented through
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user