/* * Copyright (C) 1994-1998 Linus Torvalds & authors (see below) * Copyright (C) 2005, 2007 Bartlomiej Zolnierkiewicz *//* * Mostly written by Mark Lord <mlord@pobox.com> * and Gadi Oxman <gadio@netvision.net.il> * and Andre Hedrick <andre@linux-ide.org> * * See linux/MAINTAINERS for address of current maintainer. * * This is the IDE probe module, as evolved from hd.c and ide.c. * * -- increase WAIT_PIDENTIFY to avoid CD-ROM locking at boot * by Andrea Arcangeli */#include<linux/module.h>#include<linux/types.h>#include<linux/string.h>#include<linux/kernel.h>#include<linux/timer.h>#include<linux/mm.h>#include<linux/interrupt.h>#include<linux/major.h>#include<linux/errno.h>#include<linux/genhd.h>#include<linux/slab.h>#include<linux/delay.h>#include<linux/ide.h>#include<linux/spinlock.h>#include<linux/kmod.h>#include<linux/pci.h>#include<linux/scatterlist.h>#include<asm/byteorder.h>#include<asm/irq.h>#include<asm/uaccess.h>#include<asm/io.h>/** * generic_id - add a generic drive id * @drive: drive to make an ID block for * * Add a fake id field to the drive we are passed. This allows * use to skip a ton of NULL checks (which people always miss) * and make drive properties unconditional outside of this file */staticvoidgeneric_id(ide_drive_t*drive){drive->id->cyls=drive->cyl;drive->id->heads=drive->head;drive->id->sectors=drive->sect;drive->id->cur_cyls=drive->cyl;drive->