Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 42619d35 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz
Browse files

ide: remove IDE_AFLAG_NO_DOORLOCKING



Just use IDE_DFLAG_DOORLOCKING instead.

There should be no functional changes caused by this patch.

Acked-by: default avatarBorislav Petkov <petkovbb@gmail.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent e0128628
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -191,7 +191,7 @@ int ide_set_media_lock(ide_drive_t *drive, struct gendisk *disk, int on)
{
	struct ide_atapi_pc pc;

	if (drive->atapi_flags & IDE_AFLAG_NO_DOORLOCK)
	if ((drive->dev_flags & IDE_DFLAG_DOORLOCKING) == 0)
		return 0;

	ide_init_pc(&pc);
+1 −1
Original line number Diff line number Diff line
@@ -1732,7 +1732,7 @@ static int ide_cdrom_probe_capabilities(ide_drive_t *drive)
		return 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)
		drive->atapi_flags &= ~IDE_AFLAG_NO_EJECT;
	if (buf[8 + 3] & 0x01)
+2 −2
Original line number Diff line number Diff line
@@ -136,7 +136,7 @@ int ide_cd_lockdoor(ide_drive_t *drive, int lockflag,
		sense = &my_sense;

	/* 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;
	} else {
		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)) {
		printk(KERN_ERR "%s: door locking not supported\n",
			drive->name);
		drive->atapi_flags |= IDE_AFLAG_NO_DOORLOCK;
		drive->dev_flags &= ~IDE_DFLAG_DOORLOCKING;
		stat = 0;
	}

+1 −1
Original line number Diff line number Diff line
@@ -592,7 +592,7 @@ static void idefloppy_setup(ide_drive_t *drive)
		blk_queue_max_sectors(drive->queue, 64);
		drive->atapi_flags |= IDE_AFLAG_CLIK_DRIVE;
		/* 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);
+1 −0
Original line number Diff line number Diff line
@@ -208,6 +208,7 @@ static inline void do_identify (ide_drive_t *drive, u8 cmd)
		drive->ready_stat = 0;
		if (ata_id_cdb_intr(id))
			drive->atapi_flags |= IDE_AFLAG_DRQ_INTERRUPT;
		drive->dev_flags |= IDE_DFLAG_DOORLOCKING;
		/* we don't do head unloading on ATAPI devices */
		drive->dev_flags |= IDE_DFLAG_NO_UNLOAD;
		return;
Loading