diff options
Diffstat (limited to 'include/linux/libata.h')
| -rw-r--r-- | include/linux/libata.h | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index ceee1fc42c60..7929cfc9318d 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -97,6 +97,7 @@ enum { | |||
| 97 | ATA_DFLAG_LBA48 = (1 << 0), /* device supports LBA48 */ | 97 | ATA_DFLAG_LBA48 = (1 << 0), /* device supports LBA48 */ |
| 98 | ATA_DFLAG_PIO = (1 << 1), /* device currently in PIO mode */ | 98 | ATA_DFLAG_PIO = (1 << 1), /* device currently in PIO mode */ |
| 99 | ATA_DFLAG_LOCK_SECTORS = (1 << 2), /* don't adjust max_sectors */ | 99 | ATA_DFLAG_LOCK_SECTORS = (1 << 2), /* don't adjust max_sectors */ |
| 100 | ATA_DFLAG_LBA = (1 << 3), /* device supports LBA */ | ||
| 100 | 101 | ||
| 101 | ATA_DEV_UNKNOWN = 0, /* unknown device */ | 102 | ATA_DEV_UNKNOWN = 0, /* unknown device */ |
| 102 | ATA_DEV_ATA = 1, /* ATA device */ | 103 | ATA_DEV_ATA = 1, /* ATA device */ |
| @@ -154,17 +155,21 @@ enum { | |||
| 154 | ATA_SHIFT_UDMA = 0, | 155 | ATA_SHIFT_UDMA = 0, |
| 155 | ATA_SHIFT_MWDMA = 8, | 156 | ATA_SHIFT_MWDMA = 8, |
| 156 | ATA_SHIFT_PIO = 11, | 157 | ATA_SHIFT_PIO = 11, |
| 158 | |||
| 159 | /* Masks for port functions */ | ||
| 160 | ATA_PORT_PRIMARY = (1 << 0), | ||
| 161 | ATA_PORT_SECONDARY = (1 << 1), | ||
| 157 | }; | 162 | }; |
| 158 | 163 | ||
| 159 | enum pio_task_states { | 164 | enum hsm_task_states { |
| 160 | PIO_ST_UNKNOWN, | 165 | HSM_ST_UNKNOWN, |
| 161 | PIO_ST_IDLE, | 166 | HSM_ST_IDLE, |
| 162 | PIO_ST_POLL, | 167 | HSM_ST_POLL, |
| 163 | PIO_ST_TMOUT, | 168 | HSM_ST_TMOUT, |
| 164 | PIO_ST, | 169 | HSM_ST, |
| 165 | PIO_ST_LAST, | 170 | HSM_ST_LAST, |
| 166 | PIO_ST_LAST_POLL, | 171 | HSM_ST_LAST_POLL, |
| 167 | PIO_ST_ERR, | 172 | HSM_ST_ERR, |
| 168 | }; | 173 | }; |
| 169 | 174 | ||
| 170 | /* forward declarations */ | 175 | /* forward declarations */ |
| @@ -282,6 +287,11 @@ struct ata_device { | |||
| 282 | u8 xfer_protocol; /* taskfile xfer protocol */ | 287 | u8 xfer_protocol; /* taskfile xfer protocol */ |
| 283 | u8 read_cmd; /* opcode to use on read */ | 288 | u8 read_cmd; /* opcode to use on read */ |
| 284 | u8 write_cmd; /* opcode to use on write */ | 289 | u8 write_cmd; /* opcode to use on write */ |
| 290 | |||
| 291 | /* for CHS addressing */ | ||
| 292 | u16 cylinders; /* Number of cylinders */ | ||
| 293 | u16 heads; /* Number of heads */ | ||
| 294 | u16 sectors; /* Number of sectors per track */ | ||
| 285 | }; | 295 | }; |
| 286 | 296 | ||
| 287 | struct ata_port { | 297 | struct ata_port { |
| @@ -319,7 +329,7 @@ struct ata_port { | |||
| 319 | struct work_struct packet_task; | 329 | struct work_struct packet_task; |
| 320 | 330 | ||
| 321 | struct work_struct pio_task; | 331 | struct work_struct pio_task; |
| 322 | unsigned int pio_task_state; | 332 | unsigned int hsm_task_state; |
| 323 | unsigned long pio_task_timeout; | 333 | unsigned long pio_task_timeout; |
| 324 | 334 | ||
| 325 | void *private_data; | 335 | void *private_data; |
| @@ -400,6 +410,8 @@ extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmn | |||
| 400 | extern int ata_scsi_error(struct Scsi_Host *host); | 410 | extern int ata_scsi_error(struct Scsi_Host *host); |
| 401 | extern int ata_scsi_release(struct Scsi_Host *host); | 411 | extern int ata_scsi_release(struct Scsi_Host *host); |
| 402 | extern unsigned int ata_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc); | 412 | extern unsigned int ata_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc); |
| 413 | extern int ata_ratelimit(void); | ||
| 414 | |||
| 403 | /* | 415 | /* |
| 404 | * Default driver ops implementations | 416 | * Default driver ops implementations |
| 405 | */ | 417 | */ |
| @@ -452,7 +464,7 @@ struct pci_bits { | |||
| 452 | 464 | ||
| 453 | extern void ata_pci_host_stop (struct ata_host_set *host_set); | 465 | extern void ata_pci_host_stop (struct ata_host_set *host_set); |
| 454 | extern struct ata_probe_ent * | 466 | extern struct ata_probe_ent * |
| 455 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port); | 467 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask); |
| 456 | extern int pci_test_config_bits(struct pci_dev *pdev, struct pci_bits *bits); | 468 | extern int pci_test_config_bits(struct pci_dev *pdev, struct pci_bits *bits); |
| 457 | 469 | ||
| 458 | #endif /* CONFIG_PCI */ | 470 | #endif /* CONFIG_PCI */ |
