/* * linux/drivers/ide/ide-probe.c Version 1.11 Mar 05, 2003 * * Copyright (C) 1994-1998 Linus Torvalds & authors (see below) *//* * 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. * * Version 1.00 move drive probing code from ide.c to ide-probe.c * Version 1.01 fix compilation problem for m68k * Version 1.02 increase WAIT_PIDENTIFY to avoid CD-ROM locking at boot * by Andrea Arcangeli * Version 1.03 fix for (hwif->chipset == ide_4drives) * Version 1.04 fixed buggy treatments of known flash memory cards * * Version 1.05 fix for (hwif->chipset == ide_pdc4030) * added ide6/7/8/9 * allowed for secondary flash card to be detectable * with new flag : drive->ata_flash : 1; * Version 1.06 stream line request queue and prep for cascade project. * Version 1.07 max_sect <= 255; slower disks would get behind and * then fall over when they get to 256. Paul G. * Version 1.10 Update set for new IDE. drive->id is now always * valid after probe time even with noprobe */#undef REALLY_SLOW_IO /* most systems can safely undef this */#include<linux/config.h>#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/devfs_fs_kernel.h>#include<linux/spinlock.h>#include<linux/kmod.h>#include<linux/pci.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->id->cur_heads=drive->head;drive->id->cur_