Release 4.12 drivers/scsi/sr.c
  
  
  
/*
 *  sr.c Copyright (C) 1992 David Giller
 *           Copyright (C) 1993, 1994, 1995, 1999 Eric Youngdale
 *
 *  adapted from:
 *      sd.c Copyright (C) 1992 Drew Eckhardt
 *      Linux scsi disk driver by
 *              Drew Eckhardt <drew@colorado.edu>
 *
 *      Modified by Eric Youngdale ericy@andante.org to
 *      add scatter-gather, multiple outstanding request, and other
 *      enhancements.
 *
 *      Modified by Eric Youngdale eric@andante.org to support loadable
 *      low-level scsi drivers.
 *
 *      Modified by Thomas Quinot thomas@melchior.cuivre.fdn.fr to
 *      provide auto-eject.
 *
 *      Modified by Gerd Knorr <kraxel@cs.tu-berlin.de> to support the
 *      generic cdrom interface
 *
 *      Modified by Jens Axboe <axboe@suse.de> - Uniform sr_packet()
 *      interface, capabilities probe additions, ioctl cleanups, etc.
 *
 *      Modified by Richard Gooch <rgooch@atnf.csiro.au> to support devfs
 *
 *      Modified by Jens Axboe <axboe@suse.de> - support DVD-RAM
 *      transparently and lose the GHOST hack
 *
 *      Modified by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
 *      check resource allocation in sr_init and some cleanups
 */
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/bio.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/cdrom.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/blkdev.h>
#include <linux/mutex.h>
#include <linux/slab.h>
#include <linux/pm_runtime.h>
#include <linux/uaccess.h>
#include <scsi/scsi.h>
#include <scsi/scsi_dbg.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_driver.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_eh.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_ioctl.h>	/* For the door lock/unlock commands */
#include "scsi_logging.h"
#include "sr.h"
MODULE_DESCRIPTION("SCSI cdrom (sr) driver");
MODULE_LICENSE("GPL");
MODULE_ALIAS_BLOCKDEV_MAJOR(SCSI_CDROM_MAJOR);
MODULE_ALIAS_SCSI_DEVICE(TYPE_ROM);
MODULE_ALIAS_SCSI_DEVICE(TYPE_WORM);
#define SR_DISKS	256
#define SR_CAPABILITIES \
	(CDC_CLOSE_TRAY|CDC_OPEN_TRAY|CDC_LOCK|CDC_SELECT_SPEED| \
         CDC_SELECT_DISC|CDC_MULTI_SESSION|CDC_MCN|CDC_MEDIA_CHANGED| \
         CDC_PLAY_AUDIO|CDC_RESET|CDC_DRIVE_STATUS| \
         CDC_CD_R|CDC_CD_RW|CDC_DVD|CDC_DVD_R|CDC_DVD_RAM|CDC_GENERIC_PACKET| \
         CDC_MRW|CDC_MRW_W|CDC_RAM)
static DEFINE_MUTEX(sr_mutex);
static int sr_probe(struct device *);
static int sr_remove(struct device *);
static int sr_init_command(struct scsi_cmnd *SCpnt);
static int sr_done(struct scsi_cmnd *);
static int sr_runtime_suspend(struct device *dev);
static const struct dev_pm_ops sr_pm_ops = {
	.runtime_suspend	= sr_runtime_suspend,
};
static struct scsi_driver sr_template = {
	.gendrv = {
		.name   	= "sr",
		.owner		= THIS_MODULE,
		.probe		= sr_probe,
		.remove		= sr_remove,
		.pm		= &sr_pm_ops,
        },
	.init_command		= sr_init_command,
	.done			= sr_done,
};
static unsigned long sr_index_bits[SR_DISKS / BITS_PER_LONG];
static DEFINE_SPINLOCK(sr_index_lock);
/* This semaphore is used to mediate the 0->1 reference get in the
 * face of object destruction (i.e. we can't allow a get on an
 * object after last put) */
static DEFINE_MUTEX(sr_ref_mutex);
static int sr_open(struct cdrom_device_info *, int);
static void sr_release(struct cdrom_device_info *);
static void get_sectorsize(struct scsi_cd *);
static void get_capabilities(struct scsi_cd *);
static unsigned int sr_check_events(struct cdrom_device_info *cdi,
				    unsigned int clearing, int slot);
static int sr_packet(struct cdrom_device_info *, struct packet_command *);
static const struct cdrom_device_ops sr_dops = {
	.open			= sr_open,
	.release	 	= sr_release,
	.drive_status	 	= sr_drive_status,
	.check_events		= sr_check_events,
	.tray_move		= sr_tray_move,
	.lock_door		= sr_lock_door,
	.select_speed		= sr_select_speed,
	.get_last_session	= sr_get_last_session,
	.get_mcn		= sr_get_mcn,
	.reset			= sr_reset,
	.audio_ioctl		= sr_audio_ioctl,
	.capability		= SR_CAPABILITIES,
	.generic_packet		= sr_packet,
};
static void sr_kref_release(struct kref *kref);
static inline struct scsi_cd *scsi_cd(struct gendisk *disk)
{
	return container_of(disk->private_data, struct scsi_cd, driver);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| James Bottomley | 27 | 100.00% | 2 | 100.00% | 
| Total | 27 | 100.00% | 2 | 100.00% | 
static int sr_runtime_suspend(struct device *dev)
{
	struct scsi_cd *cd = dev_get_drvdata(dev);
	if (!cd)	/* E.g.: runtime suspend following sr_remove() */
		return 0;
	if (cd->media_present)
		return -EBUSY;
	else
		return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Aaron Lu | 35 | 79.55% | 1 | 50.00% | 
| Alan Stern | 9 | 20.45% | 1 | 50.00% | 
| Total | 44 | 100.00% | 2 | 100.00% | 
/*
 * The get and put routines for the struct scsi_cd.  Note this entity
 * has a scsi_device pointer and owns a reference to this.
 */
static inline struct scsi_cd *scsi_cd_get(struct gendisk *disk)
{
	struct scsi_cd *cd = NULL;
	mutex_lock(&sr_ref_mutex);
	if (disk->private_data == NULL)
		goto out;
	cd = scsi_cd(disk);
	kref_get(&cd->kref);
	if (scsi_device_get(cd->device)) {
		kref_put(&cd->kref, sr_kref_release);
		cd = NULL;
	}
 out:
	mutex_unlock(&sr_ref_mutex);
	return cd;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| James Bottomley | 80 | 89.89% | 3 | 42.86% | 
| Arjan van de Ven | 4 | 4.49% | 1 | 14.29% | 
| Greg Kroah-Hartman | 3 | 3.37% | 2 | 28.57% | 
| Aaron Lu | 2 | 2.25% | 1 | 14.29% | 
| Total | 89 | 100.00% | 7 | 100.00% | 
static void scsi_cd_put(struct scsi_cd *cd)
{
	struct scsi_device *sdev = cd->device;
	mutex_lock(&sr_ref_mutex);
	kref_put(&cd->kref, sr_kref_release);
	scsi_device_put(sdev);
	mutex_unlock(&sr_ref_mutex);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| James Bottomley | 41 | 87.23% | 4 | 66.67% | 
| Arjan van de Ven | 4 | 8.51% | 1 | 16.67% | 
| Greg Kroah-Hartman | 2 | 4.26% | 1 | 16.67% | 
| Total | 47 | 100.00% | 6 | 100.00% | 
static unsigned int sr_get_events(struct scsi_device *sdev)
{
	u8 buf[8];
	u8 cmd[] = { GET_EVENT_STATUS_NOTIFICATION,
		     1,			/* polled */
		     0, 0,		/* reserved */
		     1 << 4,		/* notification class: media */
		     0, 0,		/* reserved */
		     0, sizeof(buf),	/* allocation length */
		     0,			/* control */
	};
	struct event_header *eh = (void *)buf;
	struct media_event_desc *med = (void *)(buf + 4);
	struct scsi_sense_hdr sshdr;
	int result;
	result = scsi_execute_req(sdev, cmd, DMA_FROM_DEVICE, buf, sizeof(buf),
				  &sshdr, SR_TIMEOUT, MAX_RETRIES, NULL);
	if (scsi_sense_valid(&sshdr) && sshdr.sense_key == UNIT_ATTENTION)
		return DISK_EVENT_MEDIA_CHANGE;
	if (result || be16_to_cpu(eh->data_len) < sizeof(*med))
		return 0;
	if (eh->nea || eh->notification_class != 0x4)
		return 0;
	if (med->media_event_code == 1)
		return DISK_EVENT_EJECT_REQUEST;
	else if (med->media_event_code == 2)
		return DISK_EVENT_MEDIA_CHANGE;
	return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Tejun Heo | 194 | 100.00% | 1 | 100.00% | 
| Total | 194 | 100.00% | 1 | 100.00% | 
/*
 * This function checks to see if the media has been changed or eject
 * button has been pressed.  It is possible that we have already
 * sensed a change, or the drive may have sensed one and not yet
 * reported it.  The past events are accumulated in sdev->changed and
 * returned together with the current state.
 */
static unsigned int sr_check_events(struct cdrom_device_info *cdi,
				    unsigned int clearing, int slot)
{
	struct scsi_cd *cd = cdi->handle;
	bool last_present;
	struct scsi_sense_hdr sshdr;
	unsigned int events;
	int ret;
	/* no changer support */
	if (CDSL_CURRENT != slot)
		return 0;
	events = sr_get_events(cd->device);
	cd->get_event_changed |= events & DISK_EVENT_MEDIA_CHANGE;
	/*
         * If earlier GET_EVENT_STATUS_NOTIFICATION and TUR did not agree
         * for several times in a row.  We rely on TUR only for this likely
         * broken device, to prevent generating incorrect media changed
         * events for every open().
         */
	if (cd->ignore_get_event) {
		events &= ~DISK_EVENT_MEDIA_CHANGE;
		goto do_tur;
	}
	/*
         * GET_EVENT_STATUS_NOTIFICATION is enough unless MEDIA_CHANGE
         * is being cleared.  Note that there are devices which hang
         * if asked to execute TUR repeatedly.
         */
	if (cd->device->changed) {
		events |= DISK_EVENT_MEDIA_CHANGE;
		cd->device->changed = 0;
		cd->tur_changed = true;
	}
	if (!(clearing & DISK_EVENT_MEDIA_CHANGE))
		return events;
do_tur:
	/* let's see whether the media is there with TUR */
	last_present = cd->media_present;
	ret = scsi_test_unit_ready(cd->device, SR_TIMEOUT, MAX_RETRIES, &sshdr);
	/*
         * Media is considered to be present if TUR succeeds or fails with
         * sense data indicating something other than media-not-present
         * (ASC 0x3a).
         */
	cd->media_present = scsi_status_is_good(ret) ||
		(scsi_sense_valid(&sshdr) && sshdr.asc != 0x3a);
	if (last_present != cd->media_present)
		cd->device->changed = 1;
	if (cd->device->changed) {
		events |= DISK_EVENT_MEDIA_CHANGE;
		cd->device->changed = 0;
		cd->tur_changed = true;
	}
	if (cd->ignore_get_event)
		return events;
	/* check whether GET_EVENT is reporting spurious MEDIA_CHANGE */
	if (!cd->tur_changed) {
		if (cd->get_event_changed) {
			if (cd->tur_mismatch++ > 8) {
				sr_printk(KERN_WARNING, cd,
					  "GET_EVENT and TUR disagree continuously, suppress GET_EVENT events\n");
				cd->ignore_get_event = true;
			}
		} else {
			cd->tur_mismatch = 0;
		}
	}
	cd->tur_changed = false;
	cd->get_event_changed = false;
	return events;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Kay Sievers | 145 | 48.82% | 2 | 13.33% | 
| Tejun Heo | 75 | 25.25% | 3 | 20.00% | 
| Linus Torvalds (pre-git) | 44 | 14.81% | 4 | 26.67% | 
| James Bottomley | 18 | 6.06% | 1 | 6.67% | 
| Christoph Hellwig | 8 | 2.69% | 2 | 13.33% | 
| Al Viro | 5 | 1.68% | 1 | 6.67% | 
| Adrian Bunk | 1 | 0.34% | 1 | 6.67% | 
| Hannes Reinecke | 1 | 0.34% | 1 | 6.67% | 
| Total | 297 | 100.00% | 15 | 100.00% | 
/*
 * sr_done is the interrupt routine for the device driver.
 *
 * It will be notified on the end of a SCSI read / write, and will take one
 * of several actions based on success or failure.
 */
static int sr_done(struct scsi_cmnd *SCpnt)
{
	int result = SCpnt->result;
	int this_count = scsi_bufflen(SCpnt);
	int good_bytes = (result == 0 ? this_count : 0);
	int block_sectors = 0;
	long error_sector;
	struct scsi_cd *cd = scsi_cd(SCpnt->request->rq_disk);
#ifdef DEBUG
	scmd_printk(KERN_INFO, SCpnt, "done: %x\n", result);
#endif
	/*
         * Handle MEDIUM ERRORs or VOLUME OVERFLOWs that indicate partial
         * success.  Since this is a relatively rare error condition, no
         * care is taken to avoid unnecessary additional work such as
         * memcpy's that could be avoided.
         */
	if (driver_byte(result) != 0 &&		/* An error occurred */
	    (SCpnt->sense_buffer[0] & 0x7f) == 0x70) { /* Sense current */
		switch (SCpnt->sense_buffer[2]) {
		case MEDIUM_ERROR:
		case VOLUME_OVERFLOW:
		case ILLEGAL_REQUEST:
			if (!(SCpnt->sense_buffer[0] & 0x90))
				break;
			error_sector = (SCpnt->sense_buffer[3] << 24) |
				(SCpnt->sense_buffer[4] << 16) |
				(SCpnt->sense_buffer[5] << 8) |
				SCpnt->sense_buffer[6];
			if (SCpnt->request->bio != NULL)
				block_sectors =
					bio_sectors(SCpnt->request->bio);
			if (block_sectors < 4)
				block_sectors = 4;
			if (cd->device->sector_size == 2048)
				error_sector <<= 2;
			error_sector &= ~(block_sectors - 1);
			good_bytes = (error_sector -
				      blk_rq_pos(SCpnt->request)) << 9;
			if (good_bytes < 0 || good_bytes >= this_count)
				good_bytes = 0;
			/*
                         * The SCSI specification allows for the value
                         * returned by READ CAPACITY to be up to 75 2K
                         * sectors past the last readable block.
                         * Therefore, if we hit a medium error within the
                         * last 75 2K sectors, we decrease the saved size
                         * value.
                         */
			if (error_sector < get_capacity(cd->disk) &&
			    cd->capacity - error_sector < 4 * 75)
				set_capacity(cd->disk, error_sector);
			break;
		case RECOVERED_ERROR:
			good_bytes = this_count;
			break;
		default:
			break;
		}
	}
	return good_bytes;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Linus Torvalds (pre-git) | 201 | 65.05% | 6 | 28.57% | 
| Mike Anderson | 44 | 14.24% | 1 | 4.76% | 
| Al Viro | 21 | 6.80% | 5 | 23.81% | 
| Jens Axboe | 11 | 3.56% | 1 | 4.76% | 
| Linus Torvalds | 9 | 2.91% | 2 | 9.52% | 
| Christoph Hellwig | 8 | 2.59% | 2 | 9.52% | 
| Hannes Reinecke | 6 | 1.94% | 1 | 4.76% | 
| Tejun Heo | 3 | 0.97% | 1 | 4.76% | 
| James Bottomley | 3 | 0.97% | 1 | 4.76% | 
| Boaz Harrosh | 3 | 0.97% | 1 | 4.76% | 
| Total | 309 | 100.00% | 21 | 100.00% | 
static int sr_init_command(struct scsi_cmnd *SCpnt)
{
	int block = 0, this_count, s_size;
	struct scsi_cd *cd;
	struct request *rq = SCpnt->request;
	int ret;
	ret = scsi_init_io(SCpnt);
	if (ret != BLKPREP_OK)
		goto out;
	SCpnt = rq->special;
	cd = scsi_cd(rq->rq_disk);
	/* from here on until we're complete, any goto out
         * is used for a killable error condition */
	ret = BLKPREP_KILL;
	SCSI_LOG_HLQUEUE(1, scmd_printk(KERN_INFO, SCpnt,
		"Doing sr request, block = %d\n", block));
	if (!cd->device || !scsi_device_online(cd->device)) {
		SCSI_LOG_HLQUEUE(2, scmd_printk(KERN_INFO, SCpnt,
			"Finishing %u sectors\n", blk_rq_sectors(rq)));
		SCSI_LOG_HLQUEUE(2, scmd_printk(KERN_INFO, SCpnt,
			"Retry with 0x%p\n", SCpnt));
		goto out;
	}
	if (cd->device->changed) {
		/*
                 * quietly refuse to do anything to a changed disc until the
                 * changed bit has been reset
                 */
		goto out;
	}
	/*
         * we do lazy blocksize switching (when reading XA sectors,
         * see CDROMREADMODE2 ioctl) 
         */
	s_size = cd->device->sector_size;
	if (s_size > 2048) {
		if (!in_interrupt())
			sr_set_blocklength(cd, 2048);
		else
			scmd_printk(KERN_INFO, SCpnt,
				    "can't switch blocksize: in interrupt\n");
	}
	if (s_size != 512 && s_size != 1024 && s_size != 2048) {
		scmd_printk(KERN_ERR, SCpnt, "bad sector size %d\n", s_size);
		goto out;
	}
	switch (req_op(rq)) {
	case REQ_OP_WRITE:
		if (!cd->writeable)
			goto out;
		SCpnt->cmnd[0] = WRITE_10;
		cd->cdi.media_written = 1;
		break;
	case REQ_OP_READ:
		SCpnt->cmnd[0] = READ_10;
		break;
	default:
		blk_dump_rq_flags(rq, "Unknown sr command");
		goto out;
	}
	{
		struct scatterlist *sg;
		int i, size = 0, sg_count = scsi_sg_count(SCpnt);
		scsi_for_each_sg(SCpnt, sg, sg_count, i)
			size += sg->length;
		if (size != scsi_bufflen(SCpnt)) {
			scmd_printk(KERN_ERR, SCpnt,
				"mismatch count %d, bytes %d\n",
				size, scsi_bufflen(SCpnt));
			if (scsi_bufflen(SCpnt) > size)
				SCpnt->sdb.length = size;
		}
	}
	/*
         * request doesn't start on hw block boundary, add scatter pads
         */
	if (((unsigned int)blk_rq_pos(rq) % (s_size >> 9)) ||
	    (scsi_bufflen(SCpnt) % s_size)) {
		scmd_printk(KERN_NOTICE, SCpnt, "unaligned transfer\n");
		goto out;
	}
	this_count = (scsi_bufflen(SCpnt) >> 9) / (s_size >> 9);
	SCSI_LOG_HLQUEUE(2, scmd_printk(KERN_INFO, SCpnt,
					"%s %d/%u 512 byte blocks.\n",
					(rq_data_dir(rq) == WRITE) ?
					"writing" : "reading",
					this_count, blk_rq_sectors(rq)));
	SCpnt->cmnd[1] = 0;
	block = (unsigned int)blk_rq_pos(rq) / (s_size >> 9);
	if (this_count > 0xffff) {
		this_count = 0xffff;
		SCpnt->sdb.length = this_count * s_size;
	}
	SCpnt->cmnd[2] = (unsigned char) (block >> 24) & 0xff;
	SCpnt->cmnd[3] = (unsigned char) (block >> 16) & 0xff;
	SCpnt->cmnd[4] = (unsigned char) (block >> 8) & 0xff;
	SCpnt->cmnd[5] = (unsigned char) block & 0xff;
	SCpnt->cmnd[6] = SCpnt->cmnd[9] = 0;
	SCpnt->cmnd[7] = (unsigned char) (this_count >> 8) & 0xff;
	SCpnt->cmnd[8] = (unsigned char) this_count & 0xff;
	/*
         * We shouldn't disconnect in the middle of a sector, so with a dumb
         * host adapter, it's safe to assume that we can at least transfer
         * this many bytes between each connect / disconnect.
         */
	SCpnt->transfersize = cd->device->sector_size;
	SCpnt->underflow = this_count << 9;
	SCpnt->allowed = MAX_RETRIES;
	/*
         * This indicates that the command is ready from our end to be
         * queued.
         */
	ret = BLKPREP_OK;
 out:
	return ret;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Linus Torvalds (pre-git) | 336 | 50.00% | 8 | 25.00% | 
| James Bottomley | 87 | 12.95% | 4 | 12.50% | 
| Alan Stern | 55 | 8.18% | 1 | 3.12% | 
| Linus Torvalds | 55 | 8.18% | 4 | 12.50% | 
| Boaz Harrosh | 39 | 5.80% | 1 | 3.12% | 
| Christoph Hellwig | 31 | 4.61% | 5 | 15.62% | 
| Hannes Reinecke | 26 | 3.87% | 1 | 3.12% | 
| Tejun Heo | 13 | 1.93% | 1 | 3.12% | 
| Al Viro | 11 | 1.64% | 4 | 12.50% | 
| Peter Osterlund | 8 | 1.19% | 1 | 3.12% | 
| Andrew Morton | 8 | 1.19% | 1 | 3.12% | 
| Jeff Garzik | 3 | 0.45% | 1 | 3.12% | 
| Total | 672 | 100.00% | 32 | 100.00% | 
static int sr_block_open(struct block_device *bdev, fmode_t mode)
{
	struct scsi_cd *cd;
	int ret = -ENXIO;
	mutex_lock(&sr_mutex);
	cd = scsi_cd_get(bdev->bd_disk);
	if (cd) {
		ret = cdrom_open(&cd->cdi, bdev, mode);
		if (ret)
			scsi_cd_put(cd);
	}
	mutex_unlock(&sr_mutex);
	return ret;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Al Viro | 37 | 47.44% | 2 | 33.33% | 
| Arnd Bergmann | 21 | 26.92% | 2 | 33.33% | 
| James Bottomley | 19 | 24.36% | 1 | 16.67% | 
| Christoph Hellwig | 1 | 1.28% | 1 | 16.67% | 
| Total | 78 | 100.00% | 6 | 100.00% | 
static void sr_block_release(struct gendisk *disk, fmode_t mode)
{
	struct scsi_cd *cd = scsi_cd(disk);
	mutex_lock(&sr_mutex);
	cdrom_release(&cd->cdi, mode);
	scsi_cd_put(cd);
	mutex_unlock(&sr_mutex);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Al Viro | 31 | 60.78% | 4 | 50.00% | 
| Arnd Bergmann | 12 | 23.53% | 2 | 25.00% | 
| James Bottomley | 6 | 11.76% | 1 | 12.50% | 
| Christoph Hellwig | 2 | 3.92% | 1 | 12.50% | 
| Total | 51 | 100.00% | 8 | 100.00% | 
static int sr_block_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd,
			  unsigned long arg)
{
	struct scsi_cd *cd = scsi_cd(bdev->bd_disk);
	struct scsi_device *sdev = cd->device;
	void __user *argp = (void __user *)arg;
	int ret;
	mutex_lock(&sr_mutex);
	ret = scsi_ioctl_block_when_processing_errors(sdev, cmd,
			(mode & FMODE_NDELAY) != 0);
	if (ret)
		goto out;
	/*
         * Send SCSI addressing ioctls directly to mid level, send other
         * ioctls to cdrom/block level.
         */
	switch (cmd) {
	case SCSI_IOCTL_GET_IDLUN:
	case SCSI_IOCTL_GET_BUS_NUMBER:
		ret = scsi_ioctl(sdev, cmd, argp);
		goto out;
	}
	ret = cdrom_ioctl(&cd->cdi, bdev, mode, cmd, arg);
	if (ret != -ENOSYS)
		goto out;
	ret = scsi_ioctl(sdev, cmd, argp);
out:
	mutex_unlock(&sr_mutex);
	return ret;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Christoph Hellwig | 61 | 37.20% | 3 | 27.27% | 
| Al Viro | 47 | 28.66% | 4 | 36.36% | 
| Douglas Gilbert | 28 | 17.07% | 1 | 9.09% | 
| Arnd Bergmann | 27 | 16.46% | 2 | 18.18% | 
| Tejun Heo | 1 | 0.61% | 1 | 9.09% | 
| Total | 164 | 100.00% | 11 | 100.00% | 
static unsigned int sr_block_check_events(struct gendisk *disk,
					  unsigned int clearing)
{
	struct scsi_cd *cd = scsi_cd(disk);
	if (atomic_read(&cd->device->disk_events_disable_depth))
		return 0;
	return cdrom_check_events(&cd->cdi, clearing);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Tejun Heo | 36 | 69.23% | 1 | 33.33% | 
| Aaron Lu | 16 | 30.77% | 2 | 66.67% | 
| Total | 52 | 100.00% | 3 | 100.00% | 
static int sr_block_revalidate_disk(struct gendisk *disk)
{
	struct scsi_cd *cd = scsi_cd(disk);
	struct scsi_sense_hdr sshdr;
	/* if the unit is not ready, nothing more to do */
	if (scsi_test_unit_ready(cd->device, SR_TIMEOUT, MAX_RETRIES, &sshdr))
		goto out;
	sr_cd_check(&cd->cdi);
	get_sectorsize(cd);
out:
	return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Tejun Heo | 31 | 49.21% | 1 | 20.00% | 
| Al Viro | 25 | 39.68% | 2 | 40.00% | 
| Aaron Lu | 5 | 7.94% | 1 | 20.00% | 
| Christoph Hellwig | 2 | 3.17% | 1 | 20.00% | 
| Total | 63 | 100.00% | 5 | 100.00% | 
static const struct block_device_operations sr_bdops =
{
	.owner		= THIS_MODULE,
	.open		= sr_block_open,
	.release	= sr_block_release,
	.ioctl		= sr_block_ioctl,
	.check_events	= sr_block_check_events,
	.revalidate_disk = sr_block_revalidate_disk,
	/* 
         * No compat_ioctl for now because sr_block_ioctl never
         * seems to pass arbitrary ioctls down to host drivers.
         */
};
static int sr_open(struct cdrom_device_info *cdi, int purpose)
{
	struct scsi_cd *cd = cdi->handle;
	struct scsi_device *sdev = cd->device;
	int retval;
	/*
         * If the device is in error recovery, wait until it is done.
         * If the device is offline, then disallow any access to it.
         */
	retval = -ENXIO;
	if (!scsi_block_when_processing_errors(sdev))
		goto error_out;
	return 0;
error_out:
	return retval;	
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Christoph Hellwig | 33 | 55.00% | 3 | 42.86% | 
| Linus Torvalds (pre-git) | 23 | 38.33% | 2 | 28.57% | 
| Doug Ledford | 2 | 3.33% | 1 | 14.29% | 
| Al Viro | 2 | 3.33% | 1 | 14.29% | 
| Total | 60 | 100.00% | 7 | 100.00% | 
static void sr_release(struct cdrom_device_info *cdi)
{
	struct scsi_cd *cd = cdi->handle;
	if (cd->device->sector_size > 2048)
		sr_set_blocklength(cd, 2048);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Christoph Hellwig | 30 | 81.08% | 2 | 33.33% | 
| Linus Torvalds (pre-git) | 4 | 10.81% | 2 | 33.33% | 
| Al Viro | 3 | 8.11% | 2 | 33.33% | 
| Total | 37 | 100.00% | 6 | 100.00% | 
static int sr_probe(struct device *dev)
{
	struct scsi_device *sdev = to_scsi_device(dev);
	struct gendisk *disk;
	struct scsi_cd *cd;
	int minor, error;
	scsi_autopm_get_device(sdev);
	error = -ENODEV;
	if (sdev->type != TYPE_ROM && sdev->type != TYPE_WORM)
		goto fail;
	error = -ENOMEM;
	cd = kzalloc(sizeof(*cd), GFP_KERNEL);
	if (!cd)
		goto fail;
	kref_init(&cd->kref);
	disk = alloc_disk(1);
	if (!disk)
		goto fail_free;
	spin_lock(&sr_index_lock);
	minor = find_first_zero_bit(sr_index_bits, SR_DISKS);
	if (minor == SR_DISKS) {
		spin_unlock(&sr_index_lock);
		error = -EBUSY;
		goto fail_put;
	}
	__set_bit(minor, sr_index_bits);
	spin_unlock(&sr_index_lock);
	disk->major = SCSI_CDROM_MAJOR;
	disk->first_minor = minor;
	sprintf(disk->disk_name, "sr%d", minor);
	disk->fops = &sr_bdops;
	disk->flags = GENHD_FL_CD | GENHD_FL_BLOCK_EVENTS_ON_EXCL_WRITE;
	disk->events = DISK_EVENT_MEDIA_CHANGE | DISK_EVENT_EJECT_REQUEST;
	blk_queue_rq_timeout(sdev->request_queue, SR_TIMEOUT);
	cd->device = sdev;
	cd->disk = disk;
	cd->driver = &sr_template;
	cd->disk = disk;
	cd->capacity = 0x1fffff;
	cd->device->changed = 1;	/* force recheck CD type */
	cd->media_present = 1;
	cd->use = 1;
	cd->readcd_known = 0;
	cd->readcd_cdda = 0;
	cd->cdi.ops = &sr_dops;
	cd->cdi.handle = cd;
	cd->cdi.mask = 0;
	cd->cdi.capacity = 1;
	sprintf(cd->cdi.name, "sr%d", minor);
	sdev->sector_size = 2048;	/* A guess, just in case */
	/* FIXME: need to handle a get_capabilities failure properly ?? */
	get_capabilities(cd);
	sr_vendor_init(cd);
	set_capacity(disk, cd->capacity);
	disk->private_data = &cd->driver;
	disk->queue = sdev->request_queue;
	cd->cdi.disk = disk;
	if (register_cdrom(&cd->cdi))
		goto fail_put;
	/*
         * Initialize block layer runtime PM stuffs before the
         * periodic event checking request gets started in add_disk.
         */
	blk_pm_runtime_init(sdev->request_queue, dev);
	dev_set_drvdata(dev, cd);
	disk->flags |= GENHD_FL_REMOVABLE;
	device_add_disk(&sdev->sdev_gendev, disk);
	sdev_printk(KERN_DEBUG, sdev,
		    "Attached scsi CD-ROM %s\n", cd->cdi.name);
	scsi_autopm_put_device(cd->device);
	return 0;
fail_put:
	put_disk(disk);
fail_free:
	kfree(cd);
fail:
	scsi_autopm_put_device(sdev);
	return error;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Christoph Hellwig | 333 | 70.25% | 6 | 22.22% | 
| Linus Torvalds (pre-git) | 31 | 6.54% | 3 | 11.11% | 
| Jens Axboe | 30 | 6.33% | 2 | 7.41% | 
| Aaron Lu | 17 | 3.59% | 2 | 7.41% | 
| James Bottomley | 16 | 3.38% | 5 | 18.52% | 
| Tejun Heo | 11 | 2.32% | 2 | 7.41% | 
| Subhash Jadavani | 10 | 2.11% | 1 | 3.70% | 
| Dan J Williams | 6 | 1.27% | 1 | 3.70% | 
| Andrew Morton | 6 | 1.27% | 1 | 3.70% | 
| Kay Sievers | 5 | 1.05% | 1 | 3.70% | 
| Linus Torvalds | 4 | 0.84% | 1 | 3.70% | 
| Al Viro | 4 | 0.84% | 1 | 3.70% | 
| Jes Sorensen | 1 | 0.21% | 1 | 3.70% | 
| Total | 474 | 100.00% | 27 | 100.00% | 
static void get_sectorsize(struct scsi_cd *cd)
{
	unsigned char cmd[10];
	unsigned char buffer[8];
	int the_result, retries = 3;
	int sector_size;
	struct request_queue *queue;
	do {
		cmd[0] = READ_CAPACITY;
		memset((void *) &cmd[1], 0, 9);
		memset(buffer, 0, sizeof(buffer));
		/* Do the command and wait.. */
		the_result = scsi_execute_req(cd->device, cmd, DMA_FROM_DEVICE,
					      buffer, sizeof(buffer), NULL,
					      SR_TIMEOUT, MAX_RETRIES, NULL);
		retries--;
	} while (the_result && retries);
	if (the_result) {
		cd->capacity = 0x1fffff;
		sector_size = 2048;	/* A guess, just in case */
	} else {
		long last_written;
		cd->capacity = 1 + ((buffer[0] << 24) | (buffer[1] << 16) |
				    (buffer[2] << 8) | buffer[3]);
		/*
                 * READ_CAPACITY doesn't return the correct size on
                 * certain UDF media.  If last_written is larger, use
                 * it instead.
                 *
                 * http://bugzilla.kernel.org/show_bug.cgi?id=9668
                 */
		if (!cdrom_get_last_written(&cd->cdi, &last_written))
			cd->capacity = max_t(long, cd->capacity, last_written);
		sector_size = (buffer[4] << 24) |
		    (buffer[5] << 16) | (buffer[6] << 8) | buffer[7];
		switch (sector_size) {
			/*
                         * HP 4020i CD-Recorder reports 2340 byte sectors
                         * Philips CD-Writers report 2352 byte sectors
                         *
                         * Use 2k sectors for them..
                         */
		case 0:
		case 2340:
		case 2352:
			sector_size = 2048;
			/* fall through */
		case 2048:
			cd->capacity *= 4;
			/* fall through */
		case 512:
			break;
		default:
			sr_printk(KERN_INFO, cd,
				  "unsupported sector size %d.", sector_size);
			cd->capacity = 0;
		}
		cd->device->sector_size = sector_size;
		/*
                 * Add this so that we have the ability to correctly gauge
                 * what the device is capable of.
                 */
		set_capacity(cd->disk, cd->capacity);
	}
	queue = cd->device->request_queue;
	blk_queue_logical_block_size(queue, sector_size);
	return;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Linus Torvalds (pre-git) | 225 | 67.37% | 12 | 42.86% | 
| Tejun Heo | 33 | 9.88% | 1 | 3.57% | 
| Al Viro | 18 | 5.39% | 4 | 14.29% | 
| Linus Torvalds | 15 | 4.49% | 2 | 7.14% | 
| FUJITA Tomonori | 13 | 3.89% | 2 | 7.14% | 
| Christoph Hellwig | 12 | 3.59% | 2 | 7.14% | 
| James Bottomley | 9 | 2.69% | 1 | 3.57% | 
| Hannes Reinecke | 4 | 1.20% | 1 | 3.57% | 
| Jens Axboe | 2 | 0.60% | 1 | 3.57% | 
| Patrick Mansfield | 2 | 0.60% | 1 | 3.57% | 
| Martin K. Petersen | 1 | 0.30% | 1 | 3.57% | 
| Total | 334 | 100.00% | 28 | 100.00% | 
static void get_capabilities(struct scsi_cd *cd)
{
	unsigned char *buffer;
	struct scsi_mode_data data;
	struct scsi_sense_hdr sshdr;
	unsigned int ms_len = 128;
	int rc, n;
	static const char *loadmech[] =
	{
		"caddy",
		"tray",
		"pop-up",
		"",
		"changer",
		"cartridge changer",
		"",
		""
	};
	/* allocate transfer buffer */
	buffer = kmalloc(512, GFP_KERNEL | GFP_DMA);
	if (!buffer) {
		sr_printk(KERN_ERR, cd, "out of memory.\n");
		return;
	}
	/* eat unit attentions */
	scsi_test_unit_ready(cd->device, SR_TIMEOUT, MAX_RETRIES, &sshdr);
	/* ask for mode page 0x2a */
	rc = scsi_mode_sense(cd->device, 0, 0x2a, buffer, ms_len,
			     SR_TIMEOUT, 3, &data, NULL);
	if (!scsi_status_is_good(rc) || data.length > ms_len ||
	    data.header_length + data.block_descriptor_length > data.length) {
		/* failed, drive doesn't have capabilities mode page */
		cd->cdi.speed = 1;
		cd->cdi.mask |= (CDC_CD_R | CDC_CD_RW | CDC_DVD_R |
				 CDC_DVD | CDC_DVD_RAM |
				 CDC_SELECT_DISC | CDC_SELECT_SPEED |
				 CDC_MRW | CDC_MRW_W | CDC_RAM);
		kfree(buffer);
		sr_printk(KERN_INFO, cd, "scsi-1 drive");
		return;
	}
	n = data.header_length + data.block_descriptor_length;
	cd->cdi.speed = ((buffer[n + 8] << 8) + buffer[n + 9]) / 176;
	cd->readcd_known = 1;
	cd->readcd_cdda = buffer[n + 5] & 0x01;
	/* print some capability bits */
	sr_printk(KERN_INFO, cd,
		  "scsi3-mmc drive: %dx/%dx %s%s%s%s%s%s\n",
		  ((buffer[n + 14] << 8) + buffer[n + 15]) / 176,
		  cd->cdi.speed,
		  buffer[n + 3] & 0x01 ? "writer " : "", /* CD Writer */
		  buffer[n + 3] & 0x20 ? "dvd-ram " : "",
		  buffer[n + 2] & 0x02 ? "cd/rw " : "", /* can read rewriteable */
		  buffer[n + 4] & 0x20 ? "xa/form2 " : "",	/* can read xa/from2 */
		  buffer[n + 5] & 0x01 ? "cdda " : "", /* can read audio data */
		  loadmech[buffer[n + 6] >> 5]);
	if ((buffer[n + 6] >> 5) == 0)
		/* caddy drives can't close tray... */
		cd->cdi.mask |= CDC_CLOSE_TRAY;
	if ((buffer[n + 2] & 0x8) == 0)
		/* not a DVD drive */
		cd->cdi.mask |= CDC_DVD;
	if ((buffer[n + 3] & 0x20) == 0)
		/* can't write DVD-RAM media */
		cd->cdi.mask |= CDC_DVD_RAM;
	if ((buffer[n + 3] & 0x10) == 0)
		/* can't write DVD-R media */
		cd->cdi.mask |= CDC_DVD_R;
	if ((buffer[n + 3] & 0x2) == 0)
		/* can't write CD-RW media */
		cd->cdi.mask |= CDC_CD_RW;
	if ((buffer[n + 3] & 0x1) == 0)
		/* can't write CD-R media */
		cd->cdi.mask |= CDC_CD_R;
	if ((buffer[n + 6] & 0x8) == 0)
		/* can't eject */
		cd->cdi.mask |= CDC_OPEN_TRAY;
	if ((buffer[n + 6] >> 5) == mechtype_individual_changer ||
	    (buffer[n + 6] >> 5) == mechtype_cartridge_changer)
		cd->cdi.capacity =
		    cdrom_number_of_slots(&cd->cdi);
	if (cd->cdi.capacity <= 1)
		/* not a changer */
		cd->cdi.mask |= CDC_SELECT_DISC;
	/*else    I don't think it can close its tray
                cd->cdi.mask |= CDC_CLOSE_TRAY; */
	/*
         * if DVD-RAM, MRW-W or CD-RW, we are randomly writable
         */
	if ((cd->cdi.mask & (CDC_DVD_RAM | CDC_MRW_W | CDC_RAM | CDC_CD_RW)) !=
			(CDC_DVD_RAM | CDC_MRW_W | CDC_RAM | CDC_CD_RW)) {
		cd->writeable = 1;
	}
	kfree(buffer);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Linus Torvalds (pre-git) | 434 | 65.66% | 4 | 13.79% | 
| James Bottomley | 38 | 5.75% | 4 | 13.79% | 
| Linus Torvalds | 36 | 5.45% | 4 | 13.79% | 
| Andrew Morton | 30 | 4.54% | 2 | 6.90% | 
| Martin K. Petersen | 25 | 3.78% | 1 | 3.45% | 
| Al Viro | 23 | 3.48% | 2 | 6.90% | 
| Christoph Hellwig | 20 | 3.03% | 2 | 6.90% | 
| Hannes Reinecke | 13 | 1.97% | 1 | 3.45% | 
| Matthew Dharm | 8 | 1.21% | 1 | 3.45% | 
| Jens Axboe | 7 | 1.06% | 2 | 6.90% | 
| Alan Cox | 7 | 1.06% | 1 | 3.45% | 
| Chuck Ebbert | 6 | 0.91% | 1 | 3.45% | 
| Peter Osterlund | 5 | 0.76% | 1 | 3.45% | 
| Tejun Heo | 5 | 0.76% | 1 | 3.45% | 
| Matthew Wilcox | 3 | 0.45% | 1 | 3.45% | 
| Arjan van de Ven | 1 | 0.15% | 1 | 3.45% | 
| Total | 661 | 100.00% | 29 | 100.00% | 
/*
 * sr_packet() is the entry point for the generic commands generated
 * by the Uniform CD-ROM layer.
 */
static int sr_packet(struct cdrom_device_info *cdi,
		struct packet_command *cgc)
{
	struct scsi_cd *cd = cdi->handle;
	struct scsi_device *sdev = cd->device;
	if (cgc->cmd[0] == GPCMD_READ_DISC_INFO && sdev->no_read_disc_info)
		return -EDRIVE_CANT_DO_THIS;
	if (cgc->timeout <= 0)
		cgc->timeout = IOCTL_TIMEOUT;
	sr_do_ioctl(cd, cgc);
	return cgc->stat;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Hans de Goede | 38 | 48.10% | 1 | 14.29% | 
| Linus Torvalds (pre-git) | 29 | 36.71% | 4 | 57.14% | 
| Alan Cox | 11 | 13.92% | 1 | 14.29% | 
| Al Viro | 1 | 1.27% | 1 | 14.29% | 
| Total | 79 | 100.00% | 7 | 100.00% | 
/**
 *      sr_kref_release - Called to free the scsi_cd structure
 *      @kref: pointer to embedded kref
 *
 *      sr_ref_mutex must be held entering this routine.  Because it is
 *      called on last put, you should always use the scsi_cd_get()
 *      scsi_cd_put() helpers which manipulate the semaphore directly
 *      and never do a direct kref_put().
 **/
static void sr_kref_release(struct kref *kref)
{
	struct scsi_cd *cd = container_of(kref, struct scsi_cd, kref);
	struct gendisk *disk = cd->disk;
	spin_lock(&sr_index_lock);
	clear_bit(MINOR(disk_devt(disk)), sr_index_bits);
	spin_unlock(&sr_index_lock);
	unregister_cdrom(&cd->cdi);
	disk->private_data = NULL;
	put_disk(disk);
	kfree(cd);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| James Bottomley | 36 | 42.86% | 2 | 20.00% | 
| Christoph Hellwig | 28 | 33.33% | 3 | 30.00% | 
| Linus Torvalds (pre-git) | 9 | 10.71% | 3 | 30.00% | 
| Tejun Heo | 6 | 7.14% | 1 | 10.00% | 
| Al Viro | 5 | 5.95% | 1 | 10.00% | 
| Total | 84 | 100.00% | 10 | 100.00% | 
static int sr_remove(struct device *dev)
{
	struct scsi_cd *cd = dev_get_drvdata(dev);
	scsi_autopm_get_device(cd->device);
	del_gendisk(cd->disk);
	dev_set_drvdata(dev, NULL);
	mutex_lock(&sr_ref_mutex);
	kref_put(&cd->kref, sr_kref_release);
	mutex_unlock(&sr_ref_mutex);
	return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| James Bottomley | 34 | 50.75% | 2 | 18.18% | 
| Christoph Hellwig | 8 | 11.94% | 3 | 27.27% | 
| Aaron Lu | 7 | 10.45% | 1 | 9.09% | 
| Alan Stern | 7 | 10.45% | 1 | 9.09% | 
| Arjan van de Ven | 4 | 5.97% | 1 | 9.09% | 
| Linus Torvalds (pre-git) | 3 | 4.48% | 1 | 9.09% | 
| Greg Kroah-Hartman | 2 | 2.99% | 1 | 9.09% | 
| Patrick Mansfield | 2 | 2.99% | 1 | 9.09% | 
| Total | 67 | 100.00% | 11 | 100.00% | 
static int __init init_sr(void)
{
	int rc;
	rc = register_blkdev(SCSI_CDROM_MAJOR, "sr");
	if (rc)
		return rc;
	rc = scsi_register_driver(&sr_template.gendrv);
	if (rc)
		unregister_blkdev(SCSI_CDROM_MAJOR, "sr");
	return rc;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Christoph Hellwig | 22 | 42.31% | 3 | 42.86% | 
| Akinobu Mita | 16 | 30.77% | 1 | 14.29% | 
| Linus Torvalds (pre-git) | 14 | 26.92% | 3 | 42.86% | 
| Total | 52 | 100.00% | 7 | 100.00% | 
static void __exit exit_sr(void)
{
	scsi_unregister_driver(&sr_template.gendrv);
	unregister_blkdev(SCSI_CDROM_MAJOR, "sr");
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Linus Torvalds (pre-git) | 19 | 79.17% | 3 | 50.00% | 
| Christoph Hellwig | 4 | 16.67% | 2 | 33.33% | 
| Greg Kroah-Hartman | 1 | 4.17% | 1 | 16.67% | 
| Total | 24 | 100.00% | 6 | 100.00% | 
module_init(init_sr);
module_exit(exit_sr);
MODULE_LICENSE("GPL");
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Linus Torvalds (pre-git) | 1514 | 34.26% | 42 | 24.56% | 
| Christoph Hellwig | 738 | 16.70% | 16 | 9.36% | 
| James Bottomley | 433 | 9.80% | 15 | 8.77% | 
| Tejun Heo | 429 | 9.71% | 9 | 5.26% | 
| Al Viro | 254 | 5.75% | 13 | 7.60% | 
| Linus Torvalds | 152 | 3.44% | 13 | 7.60% | 
| Kay Sievers | 150 | 3.39% | 3 | 1.75% | 
| Aaron Lu | 113 | 2.56% | 3 | 1.75% | 
| Alan Stern | 71 | 1.61% | 2 | 1.17% | 
| Arnd Bergmann | 67 | 1.52% | 3 | 1.75% | 
| Hannes Reinecke | 51 | 1.15% | 1 | 0.58% | 
| Jens Axboe | 50 | 1.13% | 6 | 3.51% | 
| Andrew Morton | 47 | 1.06% | 5 | 2.92% | 
| Mike Anderson | 45 | 1.02% | 2 | 1.17% | 
| Boaz Harrosh | 42 | 0.95% | 1 | 0.58% | 
| Hans de Goede | 38 | 0.86% | 1 | 0.58% | 
| Douglas Gilbert | 28 | 0.63% | 1 | 0.58% | 
| Martin K. Petersen | 26 | 0.59% | 2 | 1.17% | 
| Arjan van de Ven | 19 | 0.43% | 2 | 1.17% | 
| Alan Cox | 18 | 0.41% | 1 | 0.58% | 
| Akinobu Mita | 16 | 0.36% | 1 | 0.58% | 
| René Herman | 15 | 0.34% | 1 | 0.58% | 
| Peter Osterlund | 13 | 0.29% | 2 | 1.17% | 
| FUJITA Tomonori | 13 | 0.29% | 2 | 1.17% | 
| Subhash Jadavani | 10 | 0.23% | 1 | 0.58% | 
| Michael Tokarev | 10 | 0.23% | 1 | 0.58% | 
| Greg Kroah-Hartman | 8 | 0.18% | 3 | 1.75% | 
| Matthew Dharm | 8 | 0.18% | 1 | 0.58% | 
| Chuck Ebbert | 6 | 0.14% | 1 | 0.58% | 
| Dan J Williams | 6 | 0.14% | 1 | 0.58% | 
| Doug Ledford | 4 | 0.09% | 1 | 0.58% | 
| Patrick Mansfield | 4 | 0.09% | 2 | 1.17% | 
| Thomas Gleixner | 4 | 0.09% | 1 | 0.58% | 
| Matthew Wilcox | 3 | 0.07% | 1 | 0.58% | 
| Adrian Bunk | 3 | 0.07% | 3 | 1.75% | 
| Jeff Garzik | 3 | 0.07% | 1 | 0.58% | 
| Andi Kleen | 2 | 0.05% | 1 | 0.58% | 
| Alexey Dobriyan | 1 | 0.02% | 1 | 0.58% | 
| Lucas De Marchi | 1 | 0.02% | 1 | 0.58% | 
| Julia Lawall | 1 | 0.02% | 1 | 0.58% | 
| Jes Sorensen | 1 | 0.02% | 1 | 0.58% | 
| Kees Cook | 1 | 0.02% | 1 | 0.58% | 
| Steven Cole | 1 | 0.02% | 1 | 0.58% | 
| Total | 4419 | 100.00% | 171 | 100.00% | 
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.