ide: remove IDE_AFLAG_NO_DOORLOCKING

Just use IDE_DFLAG_DOORLOCKING instead.

There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
Bartlomiej Zolnierkiewicz 2008-10-17 18:09:11 +02:00
parent e01286282e
commit 42619d35c7
7 changed files with 7 additions and 8 deletions

View file

@ -191,7 +191,7 @@ int ide_set_media_lock(ide_drive_t *drive, struct gendisk *disk, int on)
{ {
struct ide_atapi_pc pc; struct ide_atapi_pc pc;
if (drive->atapi_flags & IDE_AFLAG_NO_DOORLOCK) if ((drive->dev_flags & IDE_DFLAG_DOORLOCKING) == 0)
return 0; return 0;
ide_init_pc(&pc); ide_init_pc(&pc);

View file

@ -1732,7 +1732,7 @@ static int ide_cdrom_probe_capabilities(ide_drive_t *drive)
return 0; return 0;
if ((buf[8 + 6] & 0x01) == 0) if ((buf[8 + 6] & 0x01) == 0)
drive->atapi_flags |= IDE_AFLAG_NO_DOORLOCK; drive->dev_flags &= ~IDE_DFLAG_DOORLOCKING;
if (buf[8 + 6] & 0x08) if (buf[8 + 6] & 0x08)
drive->atapi_flags &= ~IDE_AFLAG_NO_EJECT; drive->atapi_flags &= ~IDE_AFLAG_NO_EJECT;
if (buf[8 + 3] & 0x01) if (buf[8 + 3] & 0x01)

View file

@ -136,7 +136,7 @@ int ide_cd_lockdoor(ide_drive_t *drive, int lockflag,
sense = &my_sense; sense = &my_sense;
/* If the drive cannot lock the door, just pretend. */ /* If the drive cannot lock the door, just pretend. */
if (drive->atapi_flags & IDE_AFLAG_NO_DOORLOCK) { if ((drive->dev_flags & IDE_DFLAG_DOORLOCKING) == 0) {
stat = 0; stat = 0;
} else { } else {
unsigned char cmd[BLK_MAX_CDB]; unsigned char cmd[BLK_MAX_CDB];
@ -157,7 +157,7 @@ int ide_cd_lockdoor(ide_drive_t *drive, int lockflag,
(sense->asc == 0x24 || sense->asc == 0x20)) { (sense->asc == 0x24 || sense->asc == 0x20)) {
printk(KERN_ERR "%s: door locking not supported\n", printk(KERN_ERR "%s: door locking not supported\n",
drive->name); drive->name);
drive->atapi_flags |= IDE_AFLAG_NO_DOORLOCK; drive->dev_flags &= ~IDE_DFLAG_DOORLOCKING;
stat = 0; stat = 0;
} }

View file

@ -592,7 +592,7 @@ static void idefloppy_setup(ide_drive_t *drive)
blk_queue_max_sectors(drive->queue, 64); blk_queue_max_sectors(drive->queue, 64);
drive->atapi_flags |= IDE_AFLAG_CLIK_DRIVE; drive->atapi_flags |= IDE_AFLAG_CLIK_DRIVE;
/* IOMEGA Clik! drives do not support lock/unlock commands */ /* IOMEGA Clik! drives do not support lock/unlock commands */
drive->atapi_flags |= IDE_AFLAG_NO_DOORLOCK; drive->dev_flags &= ~IDE_DFLAG_DOORLOCKING;
} }
(void) ide_floppy_get_capacity(drive); (void) ide_floppy_get_capacity(drive);

View file

@ -208,6 +208,7 @@ static inline void do_identify (ide_drive_t *drive, u8 cmd)
drive->ready_stat = 0; drive->ready_stat = 0;
if (ata_id_cdb_intr(id)) if (ata_id_cdb_intr(id))
drive->atapi_flags |= IDE_AFLAG_DRQ_INTERRUPT; drive->atapi_flags |= IDE_AFLAG_DRQ_INTERRUPT;
drive->dev_flags |= IDE_DFLAG_DOORLOCKING;
/* we don't do head unloading on ATAPI devices */ /* we don't do head unloading on ATAPI devices */
drive->dev_flags |= IDE_DFLAG_NO_UNLOAD; drive->dev_flags |= IDE_DFLAG_NO_UNLOAD;
return; return;

View file

@ -2108,7 +2108,7 @@ static void idetape_get_mode_sense_results(ide_drive_t *drive)
/* device lacks locking support according to capabilities page */ /* device lacks locking support according to capabilities page */
if ((caps[6] & 1) == 0) if ((caps[6] & 1) == 0)
drive->atapi_flags |= IDE_AFLAG_NO_DOORLOCK; drive->dev_flags &= ~IDE_DFLAG_DOORLOCKING;
if (caps[7] & 0x02) if (caps[7] & 0x02)
tape->blk_size = 512; tape->blk_size = 512;

View file

@ -464,8 +464,6 @@ struct ide_acpi_hwif_link;
/* ATAPI device flags */ /* ATAPI device flags */
enum { enum {
IDE_AFLAG_DRQ_INTERRUPT = (1 << 0), IDE_AFLAG_DRQ_INTERRUPT = (1 << 0),
/* Drive cannot lock the door. */
IDE_AFLAG_NO_DOORLOCK = (1 << 2),
/* ide-cd */ /* ide-cd */
/* Drive cannot eject the disc. */ /* Drive cannot eject the disc. */