diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-01-06 11:20:50 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-01-06 11:20:50 -0500 |
commit | b65fac32cfe3b2f98cd472fef400bd1c1340de23 (patch) | |
tree | 493a7e30e23e5413a9e5ad6102b8e91ebc02c069 /include/linux/ide.h | |
parent | 5b31f855f10d0053e738baa6d91fb6a3fad35119 (diff) |
ide: merge ide_hwgroup_t with ide_hwif_t (v2)
* Merge ide_hwgroup_t with ide_hwif_t.
* Cleanup init_irq() accordingly, then remove no longer needed
ide_remove_port_from_hwgroup() and ide_ports[].
* Remove now unused HWGROUP() macro.
While at it:
* ide_dump_ata_error() fixups
v2:
* Fix ->quirk_list check in do_ide_request()
(s/hwif->cur_dev/prev_port->cur_dev).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r-- | include/linux/ide.h | 55 |
1 files changed, 24 insertions, 31 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h index 00df155b5a02..f27f130ba000 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -42,7 +42,6 @@ typedef unsigned char byte; /* used everywhere */ | |||
42 | #define ERROR_RECAL 1 /* Recalibrate every 2nd retry */ | 42 | #define ERROR_RECAL 1 /* Recalibrate every 2nd retry */ |
43 | 43 | ||
44 | #define HWIF(drive) ((ide_hwif_t *)((drive)->hwif)) | 44 | #define HWIF(drive) ((ide_hwif_t *)((drive)->hwif)) |
45 | #define HWGROUP(drive) ((ide_hwgroup_t *)(HWIF(drive)->hwgroup)) | ||
46 | 45 | ||
47 | /* | 46 | /* |
48 | * Definitions for accessing IDE controller registers | 47 | * Definitions for accessing IDE controller registers |
@@ -750,7 +749,6 @@ struct ide_host; | |||
750 | 749 | ||
751 | typedef struct hwif_s { | 750 | typedef struct hwif_s { |
752 | struct hwif_s *mate; /* other hwif from same PCI chip */ | 751 | struct hwif_s *mate; /* other hwif from same PCI chip */ |
753 | struct hwgroup_s *hwgroup; /* actually (ide_hwgroup_t *) */ | ||
754 | struct proc_dir_entry *proc; /* /proc/ide/ directory entry */ | 752 | struct proc_dir_entry *proc; /* /proc/ide/ directory entry */ |
755 | 753 | ||
756 | struct ide_host *host; | 754 | struct ide_host *host; |
@@ -840,6 +838,30 @@ typedef struct hwif_s { | |||
840 | #ifdef CONFIG_BLK_DEV_IDEACPI | 838 | #ifdef CONFIG_BLK_DEV_IDEACPI |
841 | struct ide_acpi_hwif_link *acpidata; | 839 | struct ide_acpi_hwif_link *acpidata; |
842 | #endif | 840 | #endif |
841 | |||
842 | /* IRQ handler, if active */ | ||
843 | ide_startstop_t (*handler)(ide_drive_t *); | ||
844 | |||
845 | /* BOOL: polling active & poll_timeout field valid */ | ||
846 | unsigned int polling : 1; | ||
847 | |||
848 | /* current drive */ | ||
849 | ide_drive_t *cur_dev; | ||
850 | |||
851 | /* current request */ | ||
852 | struct request *rq; | ||
853 | |||
854 | /* failsafe timer */ | ||
855 | struct timer_list timer; | ||
856 | /* timeout value during long polls */ | ||
857 | unsigned long poll_timeout; | ||
858 | /* queried upon timeouts */ | ||
859 | int (*expiry)(ide_drive_t *); | ||
860 | |||
861 | int req_gen; | ||
862 | int req_gen_timer; | ||
863 | |||
864 | spinlock_t lock; | ||
843 | } ____cacheline_internodealigned_in_smp ide_hwif_t; | 865 | } ____cacheline_internodealigned_in_smp ide_hwif_t; |
844 | 866 | ||
845 | #define MAX_HOST_PORTS 4 | 867 | #define MAX_HOST_PORTS 4 |
@@ -868,34 +890,6 @@ typedef int (ide_expiry_t)(ide_drive_t *); | |||
868 | /* used by ide-cd, ide-floppy, etc. */ | 890 | /* used by ide-cd, ide-floppy, etc. */ |
869 | typedef void (xfer_func_t)(ide_drive_t *, struct request *rq, void *, unsigned); | 891 | typedef void (xfer_func_t)(ide_drive_t *, struct request *rq, void *, unsigned); |
870 | 892 | ||
871 | typedef struct hwgroup_s { | ||
872 | /* irq handler, if active */ | ||
873 | ide_startstop_t (*handler)(ide_drive_t *); | ||
874 | |||
875 | /* BOOL: polling active & poll_timeout field valid */ | ||
876 | unsigned int polling : 1; | ||
877 | |||
878 | /* current drive */ | ||
879 | ide_drive_t *cur_dev; | ||
880 | |||
881 | /* current request */ | ||
882 | struct request *rq; | ||
883 | |||
884 | /* failsafe timer */ | ||
885 | struct timer_list timer; | ||
886 | /* timeout value during long polls */ | ||
887 | unsigned long poll_timeout; | ||
888 | /* queried upon timeouts */ | ||
889 | int (*expiry)(ide_drive_t *); | ||
890 | |||
891 | int req_gen; | ||
892 | int req_gen_timer; | ||
893 | |||
894 | spinlock_t lock; | ||
895 | |||
896 | int port_count; | ||
897 | } ide_hwgroup_t; | ||
898 | |||
899 | typedef struct ide_driver_s ide_driver_t; | 893 | typedef struct ide_driver_s ide_driver_t; |
900 | 894 | ||
901 | extern struct mutex ide_setting_mtx; | 895 | extern struct mutex ide_setting_mtx; |
@@ -1512,7 +1506,6 @@ static inline void ide_acpi_port_init_devices(ide_hwif_t *hwif) { ; } | |||
1512 | static inline void ide_acpi_set_state(ide_hwif_t *hwif, int on) {} | 1506 | static inline void ide_acpi_set_state(ide_hwif_t *hwif, int on) {} |
1513 | #endif | 1507 | #endif |
1514 | 1508 | ||
1515 | void ide_remove_port_from_hwgroup(ide_hwif_t *); | ||
1516 | void ide_unregister(ide_hwif_t *); | 1509 | void ide_unregister(ide_hwif_t *); |
1517 | 1510 | ||
1518 | void ide_register_region(struct gendisk *); | 1511 | void ide_register_region(struct gendisk *); |