X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fide%2Fide.c;h=fc69fe2e3ec0ede1c5beb62e4ed05adfb85d94a7;hb=d6c238503ee3d015c5f8a701b2bfbeaad90a6d4b;hp=477833f0daf501cbb1a67150e6523818a1fc38f6;hpb=bfe38ccf8d0b541f387f65267f6f3794be59233a;p=linux-2.6-omap-h63xx.git diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 477833f0daf..fc69fe2e3ec 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c @@ -590,11 +590,6 @@ void ide_unregister(unsigned int index, int init_default, int restore) hwif->extra_ports = 0; } - /* - * Note that we only release the standard ports, - * and do not even try to handle any extra ports - * allocated for weird IDE interface chipsets. - */ ide_hwif_release_regions(hwif); /* copy original settings */ @@ -672,7 +667,6 @@ int ide_register_hw(hw_regs_t *hw, void (*quirkproc)(ide_drive_t *), do { hwif = ide_deprecated_find_port(hw->io_ports[IDE_DATA_OFFSET]); - index = hwif->index; if (hwif) goto found; for (index = 0; index < MAX_HWIFS; index++) @@ -680,6 +674,7 @@ int ide_register_hw(hw_regs_t *hw, void (*quirkproc)(ide_drive_t *), } while (retry--); return -1; found: + index = hwif->index; if (hwif->present) ide_unregister(index, 0, 1); else if (!hwif->hold) @@ -1036,10 +1031,9 @@ int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device drive->nice1 = (arg >> IDE_NICE_1) & 1; return 0; case HDIO_DRIVE_RESET: - { - unsigned long flags; - if (!capable(CAP_SYS_ADMIN)) return -EACCES; - + if (!capable(CAP_SYS_ADMIN)) + return -EACCES; + /* * Abort the current command on the * group if there is one, taking @@ -1058,17 +1052,15 @@ int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device ide_abort(drive, "drive reset"); BUG_ON(HWGROUP(drive)->handler); - + /* Ensure nothing gets queued after we drop the lock. Reset will clear the busy */ - + HWGROUP(drive)->busy = 1; spin_unlock_irqrestore(&ide_lock, flags); (void) ide_do_reset(drive); return 0; - } - case HDIO_GET_BUSSTATE: if (!capable(CAP_SYS_ADMIN)) return -EACCES; @@ -1188,7 +1180,7 @@ static int __initdata is_chipset_set[MAX_HWIFS]; * ide_setup() gets called VERY EARLY during initialization, * to handle kernel "command line" strings beginning with "hdx=" or "ide". * - * Remember to update Documentation/ide.txt if you change something here. + * Remember to update Documentation/ide/ide.txt if you change something here. */ static int __init ide_setup(char *s) { @@ -1266,7 +1258,7 @@ static int __init ide_setup(char *s) drive = &hwif->drives[unit]; if (strncmp(s + 4, "ide-", 4) == 0) { strlcpy(drive->driver_req, s + 4, sizeof(drive->driver_req)); - goto done; + goto obsolete_option; } switch (match_parm(&s[3], hd_words, vals, 3)) { case -1: /* "none" */ @@ -1298,13 +1290,13 @@ static int __init ide_setup(char *s) goto done; case -12: /* "remap" */ drive->remap_0_to_1 = 1; - goto done; + goto obsolete_option; case -13: /* "remap63" */ drive->sect0 = 63; - goto done; + goto obsolete_option; case -14: /* "scsi" */ drive->scsi = 1; - goto done; + goto obsolete_option; case 3: /* cyl,head,sect */ drive->media = ide_disk; drive->ready_stat = READY_STAT; @@ -1378,32 +1370,32 @@ static int __init ide_setup(char *s) #ifdef CONFIG_BLK_DEV_ALI14XX case -17: /* "ali14xx" */ probe_ali14xx = 1; - goto done; + goto obsolete_option; #endif #ifdef CONFIG_BLK_DEV_UMC8672 case -16: /* "umc8672" */ probe_umc8672 = 1; - goto done; + goto obsolete_option; #endif #ifdef CONFIG_BLK_DEV_DTC2278 case -15: /* "dtc2278" */ probe_dtc2278 = 1; - goto done; + goto obsolete_option; #endif #ifdef CONFIG_BLK_DEV_CMD640 case -14: /* "cmd640_vlb" */ cmd640_vlb = 1; - goto done; + goto obsolete_option; #endif #ifdef CONFIG_BLK_DEV_HT6560B case -13: /* "ht6560b" */ probe_ht6560b = 1; - goto done; + goto obsolete_option; #endif #ifdef CONFIG_BLK_DEV_QD65XX case -12: /* "qd65xx" */ probe_qd65xx = 1; - goto done; + goto obsolete_option; #endif #ifdef CONFIG_BLK_DEV_4DRIVES case -11: /* "four" drives on one set of ports */ @@ -1449,7 +1441,7 @@ static int __init ide_setup(char *s) case -1: /* "noprobe" */ hwif->noprobe = 1; - goto done; + goto obsolete_option; case 1: /* base */ vals[1] = vals[0] + 0x206; /* default ctl */