diff options
author | Tejun Heo <htejun@gmail.com> | 2007-02-02 02:22:30 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-02-21 04:58:16 -0500 |
commit | 458337dbb120d33f326e2b19d54eca8cf179b5c0 (patch) | |
tree | 91bc5284430b5a8856ec1b2fd4c277c4eb3f8827 /drivers/ata/libata.h | |
parent | a619f981b477035027dd27dfbee6148b4cd4a83c (diff) |
libata: improve ata_down_xfermask_limit()
Make ata_down_xfermask_limit() accept @sel instead of @force_pio0.
@sel selects how the xfermask limit will be adjusted. The following
selectors are defined.
* ATA_DNXFER_PIO : only speed down PIO
* ATA_DNXFER_DMA : only speed down DMA, don't cause transfer mode change
* ATA_DNXFER_40C : apply 40c cable limit
* ATA_DNXFER_FORCE_PIO : force PIO
* ATA_DNXFER_FORCE_PIO0 : force PIO0 (same as original with @force_pio0 == 1)
* ATA_DNXFER_ANY : same as original with @force_pio0 == 0
Currently, only ANY and FORCE_PIO0 are used to maintain the original
behavior. Other selectors will be used later to improve EH speed down
sequence.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/libata.h')
-rw-r--r-- | drivers/ata/libata.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h index 0ad7781d72a3..8533de67d87e 100644 --- a/drivers/ata/libata.h +++ b/drivers/ata/libata.h | |||
@@ -41,6 +41,16 @@ struct ata_scsi_args { | |||
41 | enum { | 41 | enum { |
42 | /* flags for ata_dev_read_id() */ | 42 | /* flags for ata_dev_read_id() */ |
43 | ATA_READID_POSTRESET = (1 << 0), /* reading ID after reset */ | 43 | ATA_READID_POSTRESET = (1 << 0), /* reading ID after reset */ |
44 | |||
45 | /* selector for ata_down_xfermask_limit() */ | ||
46 | ATA_DNXFER_PIO = 0, /* speed down PIO */ | ||
47 | ATA_DNXFER_DMA = 1, /* speed down DMA */ | ||
48 | ATA_DNXFER_40C = 2, /* apply 40c cable limit */ | ||
49 | ATA_DNXFER_FORCE_PIO = 3, /* force PIO */ | ||
50 | ATA_DNXFER_FORCE_PIO0 = 4, /* force PIO0 */ | ||
51 | ATA_DNXFER_ANY = 5, /* speed down any */ | ||
52 | |||
53 | ATA_DNXFER_QUIET = (1 << 31), | ||
44 | }; | 54 | }; |
45 | 55 | ||
46 | extern struct workqueue_struct *ata_aux_wq; | 56 | extern struct workqueue_struct *ata_aux_wq; |
@@ -69,7 +79,7 @@ extern int ata_dev_revalidate(struct ata_device *dev, unsigned int flags); | |||
69 | extern int ata_dev_configure(struct ata_device *dev); | 79 | extern int ata_dev_configure(struct ata_device *dev); |
70 | extern int sata_down_spd_limit(struct ata_port *ap); | 80 | extern int sata_down_spd_limit(struct ata_port *ap); |
71 | extern int sata_set_spd_needed(struct ata_port *ap); | 81 | extern int sata_set_spd_needed(struct ata_port *ap); |
72 | extern int ata_down_xfermask_limit(struct ata_device *dev, int force_pio0); | 82 | extern int ata_down_xfermask_limit(struct ata_device *dev, unsigned int sel); |
73 | extern int ata_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev); | 83 | extern int ata_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev); |
74 | extern void ata_sg_clean(struct ata_queued_cmd *qc); | 84 | extern void ata_sg_clean(struct ata_queued_cmd *qc); |
75 | extern void ata_qc_free(struct ata_queued_cmd *qc); | 85 | extern void ata_qc_free(struct ata_queued_cmd *qc); |