diff options
author | Tejun Heo <htejun@gmail.com> | 2006-02-12 09:32:59 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-02-12 14:36:30 -0500 |
commit | b00eec1d58ee71131375bfeb86e64bceec3f5618 (patch) | |
tree | 03536ad3ecc61d42da0611f40a51fedcd44192b5 /include/linux/libata.h | |
parent | 6e7846e9c548443c86cfbad9e4defb4bdcfc538b (diff) |
[PATCH] libata: add per-device max_sectors
If a low level driver wants to control max_sectors, it had to adjust
ap->host->max_sectors and set ATA_DFLAG_LOCK_SECTORS to tell
ata_scsi_slave_config not to override the limit. This is not only
cumbersome but also incorrect for hosts which support more than one
devices per port.
This patch adds per-device ->max_sectors. If the field is unset
(zero), libata core layer will adjust ->max_sectors according to
default rules. If the field is set, libata honors the setting.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 853c98859a9f..afe46457124e 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -122,8 +122,7 @@ enum { | |||
122 | /* struct ata_device stuff */ | 122 | /* struct ata_device stuff */ |
123 | ATA_DFLAG_LBA48 = (1 << 0), /* device supports LBA48 */ | 123 | ATA_DFLAG_LBA48 = (1 << 0), /* device supports LBA48 */ |
124 | ATA_DFLAG_PIO = (1 << 1), /* device currently in PIO mode */ | 124 | ATA_DFLAG_PIO = (1 << 1), /* device currently in PIO mode */ |
125 | ATA_DFLAG_LOCK_SECTORS = (1 << 2), /* don't adjust max_sectors */ | 125 | ATA_DFLAG_LBA = (1 << 2), /* device supports LBA */ |
126 | ATA_DFLAG_LBA = (1 << 3), /* device supports LBA */ | ||
127 | 126 | ||
128 | ATA_DEV_UNKNOWN = 0, /* unknown device */ | 127 | ATA_DEV_UNKNOWN = 0, /* unknown device */ |
129 | ATA_DEV_ATA = 1, /* ATA device */ | 128 | ATA_DEV_ATA = 1, /* ATA device */ |
@@ -348,6 +347,7 @@ struct ata_device { | |||
348 | 347 | ||
349 | unsigned int multi_count; /* sectors count for | 348 | unsigned int multi_count; /* sectors count for |
350 | READ/WRITE MULTIPLE */ | 349 | READ/WRITE MULTIPLE */ |
350 | unsigned int max_sectors; /* per-device max sectors */ | ||
351 | unsigned int cdb_len; | 351 | unsigned int cdb_len; |
352 | 352 | ||
353 | /* for CHS addressing */ | 353 | /* for CHS addressing */ |