diff options
author | Tejun Heo <htejun@gmail.com> | 2006-04-02 05:51:53 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-04-02 10:09:19 -0400 |
commit | ea1dd4e13010eb9dd5ffb4bfabbb472bc238bebb (patch) | |
tree | 2c55fb5671c1dab0c99d84d46c09fd03ebdc5f53 | |
parent | 198e0fed9e59461fc1890dd8b75ec72d14638873 (diff) |
[PATCH] libata: clear only affected flags during ata_dev_configure()
ata_dev_configure() should not clear dynamic device flags determined
elsewhere. Lower eight bits are reserved for feature flags, define
ATA_DFLAG_CFG_MASK and clear only those bits before configuring
device. Without this patch, ATA_DFLAG_PIO gets turned off during
revalidation making PIO mode unuseable.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r-- | drivers/scsi/libata-core.c | 2 | ||||
-rw-r--r-- | include/linux/libata.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 53226b16355..985283cbcbd 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -1241,7 +1241,7 @@ static int ata_dev_configure(struct ata_port *ap, struct ata_device *dev, | |||
1241 | id[84], id[85], id[86], id[87], id[88]); | 1241 | id[84], id[85], id[86], id[87], id[88]); |
1242 | 1242 | ||
1243 | /* initialize to-be-configured parameters */ | 1243 | /* initialize to-be-configured parameters */ |
1244 | dev->flags = 0; | 1244 | dev->flags &= ~ATA_DFLAG_CFG_MASK; |
1245 | dev->max_sectors = 0; | 1245 | dev->max_sectors = 0; |
1246 | dev->cdb_len = 0; | 1246 | dev->cdb_len = 0; |
1247 | dev->n_sectors = 0; | 1247 | dev->n_sectors = 0; |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 890262f44d0..cbbc821fe22 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -122,6 +122,7 @@ enum { | |||
122 | /* struct ata_device stuff */ | 122 | /* struct ata_device stuff */ |
123 | ATA_DFLAG_LBA = (1 << 0), /* device supports LBA */ | 123 | ATA_DFLAG_LBA = (1 << 0), /* device supports LBA */ |
124 | ATA_DFLAG_LBA48 = (1 << 1), /* device supports LBA48 */ | 124 | ATA_DFLAG_LBA48 = (1 << 1), /* device supports LBA48 */ |
125 | ATA_DFLAG_CFG_MASK = (1 << 8) - 1, | ||
125 | 126 | ||
126 | ATA_DFLAG_PIO = (1 << 8), /* device currently in PIO mode */ | 127 | ATA_DFLAG_PIO = (1 << 8), /* device currently in PIO mode */ |
127 | 128 | ||