diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-08-24 03:19:22 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-08-24 03:19:22 -0400 |
commit | cca3974e48607c3775dc73b544a5700b2e37c21a (patch) | |
tree | 0777d6121ba199af0aad196eb5a693510ec8e62e /include/linux | |
parent | 54a86bfc3d4601be9c36cd4e8a1bdc580c98fa6a (diff) |
libata: Grand renaming.
The biggest change is that ata_host_set is renamed to ata_host.
* ata_host_set => ata_host
* ata_probe_ent->host_flags => ata_probe_ent->port_flags
* ata_probe_ent->host_set_flags => ata_probe_ent->_host_flags
* ata_host_stats => ata_port_stats
* ata_port->host => ata_port->scsi_host
* ata_port->host_set => ata_port->host
* ata_port_info->host_flags => ata_port_info->flags
* ata_(.*)host_set(.*)\(\) => ata_\1host\2()
The leading underscore in ata_probe_ent->_host_flags is to avoid
reusing ->host_flags for different purpose. Currently, the only user
of the field is libata-bmdma.c and probe_ent itself is scheduled to be
removed.
ata_port->host is reused for different purpose but this field is used
inside libata core proper and of different type.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/libata.h | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 806682603ac5..563885cb0995 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -197,7 +197,7 @@ enum { | |||
197 | ATA_QCFLAG_EH_SCHEDULED = (1 << 18), /* EH scheduled (obsolete) */ | 197 | ATA_QCFLAG_EH_SCHEDULED = (1 << 18), /* EH scheduled (obsolete) */ |
198 | 198 | ||
199 | /* host set flags */ | 199 | /* host set flags */ |
200 | ATA_HOST_SIMPLEX = (1 << 0), /* Host is simplex, one DMA channel per host_set only */ | 200 | ATA_HOST_SIMPLEX = (1 << 0), /* Host is simplex, one DMA channel per host only */ |
201 | 201 | ||
202 | /* various lengths of time */ | 202 | /* various lengths of time */ |
203 | ATA_TMOUT_BOOT = 30 * HZ, /* heuristic */ | 203 | ATA_TMOUT_BOOT = 30 * HZ, /* heuristic */ |
@@ -357,13 +357,13 @@ struct ata_probe_ent { | |||
357 | unsigned long irq; | 357 | unsigned long irq; |
358 | unsigned long irq2; | 358 | unsigned long irq2; |
359 | unsigned int irq_flags; | 359 | unsigned int irq_flags; |
360 | unsigned long host_flags; | 360 | unsigned long port_flags; |
361 | unsigned long host_set_flags; | 361 | unsigned long _host_flags; |
362 | void __iomem *mmio_base; | 362 | void __iomem *mmio_base; |
363 | void *private_data; | 363 | void *private_data; |
364 | }; | 364 | }; |
365 | 365 | ||
366 | struct ata_host_set { | 366 | struct ata_host { |
367 | spinlock_t lock; | 367 | spinlock_t lock; |
368 | struct device *dev; | 368 | struct device *dev; |
369 | unsigned long irq; | 369 | unsigned long irq; |
@@ -420,7 +420,7 @@ struct ata_queued_cmd { | |||
420 | void *private_data; | 420 | void *private_data; |
421 | }; | 421 | }; |
422 | 422 | ||
423 | struct ata_host_stats { | 423 | struct ata_port_stats { |
424 | unsigned long unhandled_irq; | 424 | unsigned long unhandled_irq; |
425 | unsigned long idle_irq; | 425 | unsigned long idle_irq; |
426 | unsigned long rw_reqbuf; | 426 | unsigned long rw_reqbuf; |
@@ -498,7 +498,7 @@ struct ata_eh_context { | |||
498 | }; | 498 | }; |
499 | 499 | ||
500 | struct ata_port { | 500 | struct ata_port { |
501 | struct Scsi_Host *host; /* our co-allocated scsi host */ | 501 | struct Scsi_Host *scsi_host; /* our co-allocated scsi host */ |
502 | const struct ata_port_operations *ops; | 502 | const struct ata_port_operations *ops; |
503 | spinlock_t *lock; | 503 | spinlock_t *lock; |
504 | unsigned long flags; /* ATA_FLAG_xxx */ | 504 | unsigned long flags; /* ATA_FLAG_xxx */ |
@@ -523,7 +523,7 @@ struct ata_port { | |||
523 | unsigned int hw_sata_spd_limit; | 523 | unsigned int hw_sata_spd_limit; |
524 | unsigned int sata_spd_limit; /* SATA PHY speed limit */ | 524 | unsigned int sata_spd_limit; /* SATA PHY speed limit */ |
525 | 525 | ||
526 | /* record runtime error info, protected by host_set lock */ | 526 | /* record runtime error info, protected by host lock */ |
527 | struct ata_eh_info eh_info; | 527 | struct ata_eh_info eh_info; |
528 | /* EH context owned by EH */ | 528 | /* EH context owned by EH */ |
529 | struct ata_eh_context eh_context; | 529 | struct ata_eh_context eh_context; |
@@ -537,8 +537,8 @@ struct ata_port { | |||
537 | unsigned int active_tag; | 537 | unsigned int active_tag; |
538 | u32 sactive; | 538 | u32 sactive; |
539 | 539 | ||
540 | struct ata_host_stats stats; | 540 | struct ata_port_stats stats; |
541 | struct ata_host_set *host_set; | 541 | struct ata_host *host; |
542 | struct device *dev; | 542 | struct device *dev; |
543 | 543 | ||
544 | struct work_struct port_task; | 544 | struct work_struct port_task; |
@@ -614,7 +614,7 @@ struct ata_port_operations { | |||
614 | int (*port_start) (struct ata_port *ap); | 614 | int (*port_start) (struct ata_port *ap); |
615 | void (*port_stop) (struct ata_port *ap); | 615 | void (*port_stop) (struct ata_port *ap); |
616 | 616 | ||
617 | void (*host_stop) (struct ata_host_set *host_set); | 617 | void (*host_stop) (struct ata_host *host); |
618 | 618 | ||
619 | void (*bmdma_stop) (struct ata_queued_cmd *qc); | 619 | void (*bmdma_stop) (struct ata_queued_cmd *qc); |
620 | u8 (*bmdma_status) (struct ata_port *ap); | 620 | u8 (*bmdma_status) (struct ata_port *ap); |
@@ -622,7 +622,7 @@ struct ata_port_operations { | |||
622 | 622 | ||
623 | struct ata_port_info { | 623 | struct ata_port_info { |
624 | struct scsi_host_template *sht; | 624 | struct scsi_host_template *sht; |
625 | unsigned long host_flags; | 625 | unsigned long flags; |
626 | unsigned long pio_mask; | 626 | unsigned long pio_mask; |
627 | unsigned long mwdma_mask; | 627 | unsigned long mwdma_mask; |
628 | unsigned long udma_mask; | 628 | unsigned long udma_mask; |
@@ -690,15 +690,15 @@ extern int ata_pci_clear_simplex(struct pci_dev *pdev); | |||
690 | #endif /* CONFIG_PCI */ | 690 | #endif /* CONFIG_PCI */ |
691 | extern int ata_device_add(const struct ata_probe_ent *ent); | 691 | extern int ata_device_add(const struct ata_probe_ent *ent); |
692 | extern void ata_port_detach(struct ata_port *ap); | 692 | extern void ata_port_detach(struct ata_port *ap); |
693 | extern void ata_host_set_init(struct ata_host_set *, struct device *, | 693 | extern void ata_host_init(struct ata_host *, struct device *, |
694 | unsigned long, const struct ata_port_operations *); | 694 | unsigned long, const struct ata_port_operations *); |
695 | extern void ata_host_set_remove(struct ata_host_set *host_set); | 695 | extern void ata_host_remove(struct ata_host *host); |
696 | extern int ata_scsi_detect(struct scsi_host_template *sht); | 696 | extern int ata_scsi_detect(struct scsi_host_template *sht); |
697 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); | 697 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); |
698 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); | 698 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); |
699 | extern int ata_scsi_release(struct Scsi_Host *host); | 699 | extern int ata_scsi_release(struct Scsi_Host *host); |
700 | extern void ata_sas_port_destroy(struct ata_port *); | 700 | extern void ata_sas_port_destroy(struct ata_port *); |
701 | extern struct ata_port *ata_sas_port_alloc(struct ata_host_set *, | 701 | extern struct ata_port *ata_sas_port_alloc(struct ata_host *, |
702 | struct ata_port_info *, struct Scsi_Host *); | 702 | struct ata_port_info *, struct Scsi_Host *); |
703 | extern int ata_sas_port_init(struct ata_port *); | 703 | extern int ata_sas_port_init(struct ata_port *); |
704 | extern int ata_sas_port_start(struct ata_port *ap); | 704 | extern int ata_sas_port_start(struct ata_port *ap); |
@@ -715,9 +715,8 @@ extern int ata_port_online(struct ata_port *ap); | |||
715 | extern int ata_port_offline(struct ata_port *ap); | 715 | extern int ata_port_offline(struct ata_port *ap); |
716 | extern int ata_scsi_device_resume(struct scsi_device *); | 716 | extern int ata_scsi_device_resume(struct scsi_device *); |
717 | extern int ata_scsi_device_suspend(struct scsi_device *, pm_message_t mesg); | 717 | extern int ata_scsi_device_suspend(struct scsi_device *, pm_message_t mesg); |
718 | extern int ata_host_set_suspend(struct ata_host_set *host_set, | 718 | extern int ata_host_suspend(struct ata_host *host, pm_message_t mesg); |
719 | pm_message_t mesg); | 719 | extern void ata_host_resume(struct ata_host *host); |
720 | extern void ata_host_set_resume(struct ata_host_set *host_set); | ||
721 | extern int ata_ratelimit(void); | 720 | extern int ata_ratelimit(void); |
722 | extern unsigned int ata_busy_sleep(struct ata_port *ap, | 721 | extern unsigned int ata_busy_sleep(struct ata_port *ap, |
723 | unsigned long timeout_pat, | 722 | unsigned long timeout_pat, |
@@ -742,7 +741,7 @@ extern u8 ata_altstatus(struct ata_port *ap); | |||
742 | extern void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf); | 741 | extern void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf); |
743 | extern int ata_port_start (struct ata_port *ap); | 742 | extern int ata_port_start (struct ata_port *ap); |
744 | extern void ata_port_stop (struct ata_port *ap); | 743 | extern void ata_port_stop (struct ata_port *ap); |
745 | extern void ata_host_stop (struct ata_host_set *host_set); | 744 | extern void ata_host_stop (struct ata_host *host); |
746 | extern irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs); | 745 | extern irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs); |
747 | extern void ata_mmio_data_xfer(struct ata_device *adev, unsigned char *buf, | 746 | extern void ata_mmio_data_xfer(struct ata_device *adev, unsigned char *buf, |
748 | unsigned int buflen, int write_data); | 747 | unsigned int buflen, int write_data); |
@@ -828,7 +827,7 @@ struct pci_bits { | |||
828 | unsigned long val; | 827 | unsigned long val; |
829 | }; | 828 | }; |
830 | 829 | ||
831 | extern void ata_pci_host_stop (struct ata_host_set *host_set); | 830 | extern void ata_pci_host_stop (struct ata_host *host); |
832 | extern struct ata_probe_ent * | 831 | extern struct ata_probe_ent * |
833 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask); | 832 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask); |
834 | extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); | 833 | extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); |