for-5.19/cdrom-2022-05-22
-----BEGIN PGP SIGNATURE----- iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmKKrNUQHGF4Ym9lQGtl cm5lbC5kawAKCRD301j7KXHgpjZREACGej0LutZ5t3ar0WxFT9N8AhRR8y7v0Ard U66a7gVlObfnq/P2S+dIEQ6nKda3q5MzRLr2uoMI1xDpTlngwafkGpln9g32QwU2 yqpQRM1uAtGUuNCtloYmX54nWYmHG69QAxcrxeYZK4Z4NB3A2TIQSGHLVg6CfUq7 HxwgCBj0GI/VaxunnuTpMXgjGDVe1yq5iwCSr4VlG9xxHd3ySvoonZ/JnAaWwZqR G8/fHPL8A235QVtPnqxKZ0HoGYLRxY8pO3O9sWaNXQ8tVGerw0lShlvuyhig8DCn CXFQ011PuR4dxrDdz2GCIl/s8bVUofr0zsonJunHPgawJvCKGsN/C8rTSqc2lWa3 C0JeBy+kapRHygGZQgC0W/ApPPsE7KrqLMUtcz60sLR1ziYmRXfFWAxQNsQ35xUR cdzFGFEqmBMjGA5NI8bcVB8SfueKBG5Q3w0sBcF+L7EaHKkBN82fK3pBbBA6SXGT 36JjA5M3b2Wv7ZYRyqPLOtMO6vbehQ/AJekZzY4Uc4eUFeervv0EHjXr7bzH2h3N kuge1MfcrLmEGPUX0erkrV3I7cLWSc+vnkDb767RItEBb2HWfRU/4z1wzjppVN3/ Y2f6N+oF/JVnRztYO8DMwwZlTPa4ojyXDkv0uDk0fO0ZEeGUByTLn6FR6S1Mkh0z B7DwhDQk0Q== =f7O3 -----END PGP SIGNATURE----- Merge tag 'for-5.19/cdrom-2022-05-22' of git://git.kernel.dk/linux-block Pull cdrom updates from Jens Axboe: "Removal of unused code and documentation updates" * tag 'for-5.19/cdrom-2022-05-22' of git://git.kernel.dk/linux-block: cdrom: remove obsolete TODO list block: remove last remaining traces of IDE documentation cdrom: mark CDROMGETSPINDOWN/CDROMSETSPINDOWN obsolete cdrom: remove the unused driver specific disc change ioctl cdrom: make EXPORT_SYMBOL follow exported function
This commit is contained in:
commit
f6792c877a
@ -218,7 +218,6 @@ current *struct* is::
|
||||
int (*tray_move)(struct cdrom_device_info *, int);
|
||||
int (*lock_door)(struct cdrom_device_info *, int);
|
||||
int (*select_speed)(struct cdrom_device_info *, int);
|
||||
int (*select_disc)(struct cdrom_device_info *, int);
|
||||
int (*get_last_session) (struct cdrom_device_info *,
|
||||
struct cdrom_multisession *);
|
||||
int (*get_mcn)(struct cdrom_device_info *, struct cdrom_mcn *);
|
||||
@ -419,15 +418,6 @@ this `auto-selection` capability, the decision should be made on the
|
||||
current disc loaded and the return value should be positive. A negative
|
||||
return value indicates an error.
|
||||
|
||||
::
|
||||
|
||||
int select_disc(struct cdrom_device_info *cdi, int number)
|
||||
|
||||
If the drive can store multiple discs (a juke-box) this function
|
||||
will perform disc selection. It should return the number of the
|
||||
selected disc on success, a negative value on error. Currently, only
|
||||
the ide-cd driver supports this functionality.
|
||||
|
||||
::
|
||||
|
||||
int get_last_session(struct cdrom_device_info *cdi,
|
||||
|
@ -1183,85 +1183,7 @@ Provides counts of softirq handlers serviced since boot time, for each CPU.
|
||||
HRTIMER: 0 0 0 0
|
||||
RCU: 1678 1769 2178 2250
|
||||
|
||||
|
||||
1.3 IDE devices in /proc/ide
|
||||
----------------------------
|
||||
|
||||
The subdirectory /proc/ide contains information about all IDE devices of which
|
||||
the kernel is aware. There is one subdirectory for each IDE controller, the
|
||||
file drivers and a link for each IDE device, pointing to the device directory
|
||||
in the controller specific subtree.
|
||||
|
||||
The file 'drivers' contains general information about the drivers used for the
|
||||
IDE devices::
|
||||
|
||||
> cat /proc/ide/drivers
|
||||
ide-cdrom version 4.53
|
||||
ide-disk version 1.08
|
||||
|
||||
More detailed information can be found in the controller specific
|
||||
subdirectories. These are named ide0, ide1 and so on. Each of these
|
||||
directories contains the files shown in table 1-6.
|
||||
|
||||
|
||||
.. table:: Table 1-6: IDE controller info in /proc/ide/ide?
|
||||
|
||||
======= =======================================
|
||||
File Content
|
||||
======= =======================================
|
||||
channel IDE channel (0 or 1)
|
||||
config Configuration (only for PCI/IDE bridge)
|
||||
mate Mate name
|
||||
model Type/Chipset of IDE controller
|
||||
======= =======================================
|
||||
|
||||
Each device connected to a controller has a separate subdirectory in the
|
||||
controllers directory. The files listed in table 1-7 are contained in these
|
||||
directories.
|
||||
|
||||
|
||||
.. table:: Table 1-7: IDE device information
|
||||
|
||||
================ ==========================================
|
||||
File Content
|
||||
================ ==========================================
|
||||
cache The cache
|
||||
capacity Capacity of the medium (in 512Byte blocks)
|
||||
driver driver and version
|
||||
geometry physical and logical geometry
|
||||
identify device identify block
|
||||
media media type
|
||||
model device identifier
|
||||
settings device setup
|
||||
smart_thresholds IDE disk management thresholds
|
||||
smart_values IDE disk management values
|
||||
================ ==========================================
|
||||
|
||||
The most interesting file is ``settings``. This file contains a nice
|
||||
overview of the drive parameters::
|
||||
|
||||
# cat /proc/ide/ide0/hda/settings
|
||||
name value min max mode
|
||||
---- ----- --- --- ----
|
||||
bios_cyl 526 0 65535 rw
|
||||
bios_head 255 0 255 rw
|
||||
bios_sect 63 0 63 rw
|
||||
breada_readahead 4 0 127 rw
|
||||
bswap 0 0 1 r
|
||||
file_readahead 72 0 2097151 rw
|
||||
io_32bit 0 0 3 rw
|
||||
keepsettings 0 0 1 rw
|
||||
max_kb_per_request 122 1 127 rw
|
||||
multcount 0 0 8 rw
|
||||
nice1 1 0 1 rw
|
||||
nowerr 0 0 1 rw
|
||||
pio_mode write-only 0 255 w
|
||||
slow 0 0 1 rw
|
||||
unmaskirq 0 0 1 rw
|
||||
using_dma 0 0 1 rw
|
||||
|
||||
|
||||
1.4 Networking info in /proc/net
|
||||
1.3 Networking info in /proc/net
|
||||
--------------------------------
|
||||
|
||||
The subdirectory /proc/net follows the usual pattern. Table 1-8 shows the
|
||||
@ -1340,7 +1262,7 @@ It will contain information that is specific to that bond, such as the
|
||||
current slaves of the bond, the link status of the slaves, and how
|
||||
many times the slaves link has failed.
|
||||
|
||||
1.5 SCSI info
|
||||
1.4 SCSI info
|
||||
-------------
|
||||
|
||||
If you have a SCSI host adapter in your system, you'll find a subdirectory
|
||||
@ -1403,7 +1325,7 @@ AHA-2940 SCSI adapter::
|
||||
Total transfers 0 (0 reads and 0 writes)
|
||||
|
||||
|
||||
1.6 Parallel port info in /proc/parport
|
||||
1.5 Parallel port info in /proc/parport
|
||||
---------------------------------------
|
||||
|
||||
The directory /proc/parport contains information about the parallel ports of
|
||||
@ -1428,7 +1350,7 @@ These directories contain the four files shown in Table 1-10.
|
||||
number or none).
|
||||
========= ====================================================================
|
||||
|
||||
1.7 TTY info in /proc/tty
|
||||
1.6 TTY info in /proc/tty
|
||||
-------------------------
|
||||
|
||||
Information about the available and actually used tty's can be found in the
|
||||
@ -1463,7 +1385,7 @@ To see which tty's are currently in use, you can simply look into the file
|
||||
unknown /dev/tty 4 1-63 console
|
||||
|
||||
|
||||
1.8 Miscellaneous kernel statistics in /proc/stat
|
||||
1.7 Miscellaneous kernel statistics in /proc/stat
|
||||
-------------------------------------------------
|
||||
|
||||
Various pieces of information about kernel activity are available in the
|
||||
@ -1536,7 +1458,7 @@ softirqs serviced; each subsequent column is the total for that particular
|
||||
softirq.
|
||||
|
||||
|
||||
1.9 Ext4 file system parameters
|
||||
1.8 Ext4 file system parameters
|
||||
-------------------------------
|
||||
|
||||
Information about mounted ext4 file systems can be found in
|
||||
@ -1552,7 +1474,7 @@ in Table 1-12, below.
|
||||
mb_groups details of multiblock allocator buddy cache of free blocks
|
||||
============== ==========================================================
|
||||
|
||||
1.10 /proc/consoles
|
||||
1.9 /proc/consoles
|
||||
-------------------
|
||||
Shows registered system console lines.
|
||||
|
||||
|
@ -718,6 +718,9 @@ CDROMPLAYBLK
|
||||
|
||||
|
||||
CDROMGETSPINDOWN
|
||||
Obsolete, was ide-cd only
|
||||
|
||||
|
||||
usage::
|
||||
|
||||
char spindown;
|
||||
@ -736,6 +739,9 @@ CDROMGETSPINDOWN
|
||||
|
||||
|
||||
CDROMSETSPINDOWN
|
||||
Obsolete, was ide-cd only
|
||||
|
||||
|
||||
usage::
|
||||
|
||||
char spindown
|
||||
|
@ -12,7 +12,7 @@
|
||||
* Theory of operation:
|
||||
*
|
||||
* At the lowest level, there is the standard driver for the CD/DVD device,
|
||||
* typically ide-cd.c or sr.c. This driver can handle read and write requests,
|
||||
* such as drivers/scsi/sr.c. This driver can handle read and write requests,
|
||||
* but it doesn't know anything about the special restrictions that apply to
|
||||
* packet writing. One restriction is that write requests must be aligned to
|
||||
* packet boundaries on the physical media, and the size of a write request
|
||||
|
@ -14,15 +14,6 @@
|
||||
actually talk to the hardware. Suggestions are welcome.
|
||||
Patches that work are more welcome though. ;-)
|
||||
|
||||
To Do List:
|
||||
----------------------------------
|
||||
|
||||
-- Modify sysctl/proc interface. I plan on having one directory per
|
||||
drive, with entries for outputing general drive information, and sysctl
|
||||
based tunable parameters such as whether the tray should auto-close for
|
||||
that drive. Suggestions (or patches) for this welcome!
|
||||
|
||||
|
||||
Revision History
|
||||
----------------------------------
|
||||
1.00 Date Unknown -- David van Leeuwen <david@tm.tno.nl>
|
||||
@ -648,6 +639,7 @@ int register_cdrom(struct gendisk *disk, struct cdrom_device_info *cdi)
|
||||
mutex_unlock(&cdrom_mutex);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(register_cdrom);
|
||||
#undef ENSURE
|
||||
|
||||
void unregister_cdrom(struct cdrom_device_info *cdi)
|
||||
@ -663,6 +655,7 @@ void unregister_cdrom(struct cdrom_device_info *cdi)
|
||||
|
||||
cd_dbg(CD_REG_UNREG, "drive \"/dev/%s\" unregistered\n", cdi->name);
|
||||
}
|
||||
EXPORT_SYMBOL(unregister_cdrom);
|
||||
|
||||
int cdrom_get_media_event(struct cdrom_device_info *cdi,
|
||||
struct media_event_desc *med)
|
||||
@ -690,6 +683,7 @@ int cdrom_get_media_event(struct cdrom_device_info *cdi,
|
||||
memcpy(med, &buffer[sizeof(*eh)], sizeof(*med));
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(cdrom_get_media_event);
|
||||
|
||||
static int cdrom_get_random_writable(struct cdrom_device_info *cdi,
|
||||
struct rwrt_feature_desc *rfd)
|
||||
@ -1206,6 +1200,7 @@ err:
|
||||
cdi->use_count--;
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(cdrom_open);
|
||||
|
||||
/* This code is similar to that in open_for_data. The routine is called
|
||||
whenever an audio play operation is requested.
|
||||
@ -1301,6 +1296,7 @@ void cdrom_release(struct cdrom_device_info *cdi, fmode_t mode)
|
||||
cdo->tray_move(cdi, 1);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(cdrom_release);
|
||||
|
||||
static int cdrom_read_mech_status(struct cdrom_device_info *cdi,
|
||||
struct cdrom_changer_info *buf)
|
||||
@ -1382,6 +1378,7 @@ int cdrom_number_of_slots(struct cdrom_device_info *cdi)
|
||||
kfree(info);
|
||||
return nslots;
|
||||
}
|
||||
EXPORT_SYMBOL(cdrom_number_of_slots);
|
||||
|
||||
|
||||
/* If SLOT < 0, unload the current slot. Otherwise, try to load SLOT. */
|
||||
@ -1581,6 +1578,7 @@ void init_cdrom_command(struct packet_command *cgc, void *buf, int len,
|
||||
cgc->data_direction = type;
|
||||
cgc->timeout = CDROM_DEF_TIMEOUT;
|
||||
}
|
||||
EXPORT_SYMBOL(init_cdrom_command);
|
||||
|
||||
/* DVD handling */
|
||||
|
||||
@ -1999,6 +1997,7 @@ int cdrom_mode_sense(struct cdrom_device_info *cdi,
|
||||
cgc->data_direction = CGC_DATA_READ;
|
||||
return cdo->generic_packet(cdi, cgc);
|
||||
}
|
||||
EXPORT_SYMBOL(cdrom_mode_sense);
|
||||
|
||||
int cdrom_mode_select(struct cdrom_device_info *cdi,
|
||||
struct packet_command *cgc)
|
||||
@ -2014,6 +2013,7 @@ int cdrom_mode_select(struct cdrom_device_info *cdi,
|
||||
cgc->data_direction = CGC_DATA_WRITE;
|
||||
return cdo->generic_packet(cdi, cgc);
|
||||
}
|
||||
EXPORT_SYMBOL(cdrom_mode_select);
|
||||
|
||||
static int cdrom_read_subchannel(struct cdrom_device_info *cdi,
|
||||
struct cdrom_subchnl *subchnl, int mcn)
|
||||
@ -2443,14 +2443,6 @@ static int cdrom_ioctl_select_disc(struct cdrom_device_info *cdi,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* ->select_disc is a hook to allow a driver-specific way of
|
||||
* seleting disc. However, since there is no equivalent hook for
|
||||
* cdrom_slot_status this may not actually be useful...
|
||||
*/
|
||||
if (cdi->ops->select_disc)
|
||||
return cdi->ops->select_disc(cdi, arg);
|
||||
|
||||
cd_dbg(CD_CHANGER, "Using generic cdrom_select_disc()\n");
|
||||
return cdrom_select_disc(cdi, arg);
|
||||
}
|
||||
@ -2892,6 +2884,7 @@ use_toc:
|
||||
*last_written = toc.cdte_addr.lba;
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(cdrom_get_last_written);
|
||||
|
||||
/* return the next writable block. also for udf file system. */
|
||||
static int cdrom_get_next_writable(struct cdrom_device_info *cdi,
|
||||
@ -3429,18 +3422,7 @@ int cdrom_ioctl(struct cdrom_device_info *cdi, struct block_device *bdev,
|
||||
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(cdrom_get_last_written);
|
||||
EXPORT_SYMBOL(register_cdrom);
|
||||
EXPORT_SYMBOL(unregister_cdrom);
|
||||
EXPORT_SYMBOL(cdrom_open);
|
||||
EXPORT_SYMBOL(cdrom_release);
|
||||
EXPORT_SYMBOL(cdrom_ioctl);
|
||||
EXPORT_SYMBOL(cdrom_number_of_slots);
|
||||
EXPORT_SYMBOL(cdrom_mode_select);
|
||||
EXPORT_SYMBOL(cdrom_mode_sense);
|
||||
EXPORT_SYMBOL(init_cdrom_command);
|
||||
EXPORT_SYMBOL(cdrom_get_media_event);
|
||||
|
||||
#ifdef CONFIG_SYSCTL
|
||||
|
||||
|
@ -77,7 +77,6 @@ struct cdrom_device_ops {
|
||||
int (*tray_move) (struct cdrom_device_info *, int);
|
||||
int (*lock_door) (struct cdrom_device_info *, int);
|
||||
int (*select_speed) (struct cdrom_device_info *, int);
|
||||
int (*select_disc) (struct cdrom_device_info *, int);
|
||||
int (*get_last_session) (struct cdrom_device_info *,
|
||||
struct cdrom_multisession *);
|
||||
int (*get_mcn) (struct cdrom_device_info *,
|
||||
|
@ -103,7 +103,7 @@
|
||||
#define CDROMREADALL 0x5318 /* read all 2646 bytes */
|
||||
|
||||
/*
|
||||
* These ioctls are (now) only in ide-cd.c for controlling
|
||||
* These ioctls were only in (now removed) ide-cd.c for controlling
|
||||
* drive spindown time. They should be implemented in the
|
||||
* Uniform driver, via generic packet commands, GPCMD_MODE_SELECT_10,
|
||||
* GPCMD_MODE_SENSE_10 and the GPMODE_POWER_PAGE...
|
||||
|
Loading…
x
Reference in New Issue
Block a user