ide: sanitize SELECT_MASK() usage in ide_driveid_update()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Thursday, March 26, 2009 - 12:25 pm

Gitweb:     http://git.kernel.org/linus/f323b80dceaca858f8e240ca098681fcfe7fd3c4
Commit:     f323b80dceaca858f8e240ca098681fcfe7fd3c4
Parent:     1bd4c1f4fe6607a0253d1318847b618a2a598612
Author:     Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
AuthorDate: Tue Mar 24 23:22:58 2009 +0100
Committer:  Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
CommitDate: Tue Mar 24 23:22:58 2009 +0100

    ide: sanitize SELECT_MASK() usage in ide_driveid_update()
    
    Call SELECT_MASK() after ide_fix_driveid().
    
    Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/ide-iops.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index 59c0218..f92c63f 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -340,13 +340,15 @@ int ide_driveid_update(ide_drive_t *drive)
 	}
 
 	local_irq_save(flags);
-	SELECT_MASK(drive, 0);
 	tp_ops->input_data(drive, NULL, id, SECTOR_SIZE);
 	(void)tp_ops->read_status(hwif);	/* clear drive IRQ */
 	local_irq_enable();
 	local_irq_restore(flags);
+
 	ide_fix_driveid(id);
 
+	SELECT_MASK(drive, 0);
+
 	drive->id[ATA_ID_UDMA_MODES]  = id[ATA_ID_UDMA_MODES];
 	drive->id[ATA_ID_MWDMA_MODES] = id[ATA_ID_MWDMA_MODES];
 	drive->id[ATA_ID_SWDMA_MODES] = id[ATA_ID_SWDMA_MODES];
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
ide: sanitize SELECT_MASK() usage in ide_driveid_update(), Linux Kernel Mailing ..., (Thu Mar 26, 12:25 pm)