diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-06 20:00:50 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-06 20:00:50 -0500 |
commit | 59e3af21e94bd56f6a31ba774786a2bfc753581b (patch) | |
tree | ce535150d8edd5648a6fc81fdc2387a6813b7e08 /include | |
parent | f59abb161c955b68fd3d473368420c5919733e09 (diff) | |
parent | c2ce5ca047ff6bbc41d491451c39e597c4537cd3 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (41 commits)
scc_pata: make use of scc_dma_sff_read_status()
ide-dma-sff: factor out ide_dma_sff_write_status()
ide: move read_sff_dma_status() method to 'struct ide_dma_ops'
ide: don't set hwif->dma_ops in init_dma() method
Resurrect IT8172 IDE controller driver
piix: sync ich_laptop[] with ata_piix.c
ide: update warm-plug HOWTO
ide: fix ide_port_scan() to do ACPI setup after initializing request queues
ide: remove now redundant ->cur_dev checks
ide: remove unused ide_hwif_t.sg_mapped field
ide: struct ide_atapi_pc - remove unused fields and update documentation
ide: remove superfluous hwif variable assignment from ide_timer_expiry()
ide: use ide_pci_is_in_compatibility_mode() helper in setup-pci.c
ide: make "paranoia" ->handler check in ide_intr() more strict
ide-cd: convert to ide-atapi facilities
ide-cd: start DMA before sending the actual packet command
ide-cd: wait for DRQ to get set per default
ide: Fix drive's DWORD-IO handling
ide: add port and host iterators
ide: dynamic allocation of device structures
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ide.h | 171 | ||||
-rw-r--r-- | include/linux/pci_ids.h | 1 |
2 files changed, 65 insertions, 107 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h index db5ef8ae1ab9..3644f6323384 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -32,18 +32,14 @@ | |||
32 | # define SUPPORT_VLB_SYNC 1 | 32 | # define SUPPORT_VLB_SYNC 1 |
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | typedef unsigned char byte; /* used everywhere */ | ||
36 | |||
37 | /* | 35 | /* |
38 | * Probably not wise to fiddle with these | 36 | * Probably not wise to fiddle with these |
39 | */ | 37 | */ |
38 | #define IDE_DEFAULT_MAX_FAILURES 1 | ||
40 | #define ERROR_MAX 8 /* Max read/write errors per sector */ | 39 | #define ERROR_MAX 8 /* Max read/write errors per sector */ |
41 | #define ERROR_RESET 3 /* Reset controller every 4th retry */ | 40 | #define ERROR_RESET 3 /* Reset controller every 4th retry */ |
42 | #define ERROR_RECAL 1 /* Recalibrate every 2nd retry */ | 41 | #define ERROR_RECAL 1 /* Recalibrate every 2nd retry */ |
43 | 42 | ||
44 | #define HWIF(drive) ((ide_hwif_t *)((drive)->hwif)) | ||
45 | #define HWGROUP(drive) ((ide_hwgroup_t *)(HWIF(drive)->hwgroup)) | ||
46 | |||
47 | /* | 43 | /* |
48 | * Definitions for accessing IDE controller registers | 44 | * Definitions for accessing IDE controller registers |
49 | */ | 45 | */ |
@@ -185,9 +181,6 @@ typedef struct hw_regs_s { | |||
185 | unsigned long config; | 181 | unsigned long config; |
186 | } hw_regs_t; | 182 | } hw_regs_t; |
187 | 183 | ||
188 | void ide_init_port_data(struct hwif_s *, unsigned int); | ||
189 | void ide_init_port_hw(struct hwif_s *, hw_regs_t *); | ||
190 | |||
191 | static inline void ide_std_init_ports(hw_regs_t *hw, | 184 | static inline void ide_std_init_ports(hw_regs_t *hw, |
192 | unsigned long io_addr, | 185 | unsigned long io_addr, |
193 | unsigned long ctl_addr) | 186 | unsigned long ctl_addr) |
@@ -433,18 +426,14 @@ struct ide_atapi_pc { | |||
433 | struct idetape_bh *bh; | 426 | struct idetape_bh *bh; |
434 | char *b_data; | 427 | char *b_data; |
435 | 428 | ||
436 | /* idescsi only for now */ | ||
437 | struct scatterlist *sg; | 429 | struct scatterlist *sg; |
438 | unsigned int sg_cnt; | 430 | unsigned int sg_cnt; |
439 | 431 | ||
440 | struct scsi_cmnd *scsi_cmd; | ||
441 | void (*done) (struct scsi_cmnd *); | ||
442 | |||
443 | unsigned long timeout; | 432 | unsigned long timeout; |
444 | }; | 433 | }; |
445 | 434 | ||
446 | struct ide_devset; | 435 | struct ide_devset; |
447 | struct ide_driver_s; | 436 | struct ide_driver; |
448 | 437 | ||
449 | #ifdef CONFIG_BLK_DEV_IDEACPI | 438 | #ifdef CONFIG_BLK_DEV_IDEACPI |
450 | struct ide_acpi_drive_link; | 439 | struct ide_acpi_drive_link; |
@@ -588,7 +577,6 @@ struct ide_drive_s { | |||
588 | struct request_queue *queue; /* request queue */ | 577 | struct request_queue *queue; /* request queue */ |
589 | 578 | ||
590 | struct request *rq; /* current request */ | 579 | struct request *rq; /* current request */ |
591 | struct ide_drive_s *next; /* circular list of hwgroup drives */ | ||
592 | void *driver_data; /* extra driver data */ | 580 | void *driver_data; /* extra driver data */ |
593 | u16 *id; /* identification info */ | 581 | u16 *id; /* identification info */ |
594 | #ifdef CONFIG_IDE_PROC_FS | 582 | #ifdef CONFIG_IDE_PROC_FS |
@@ -662,6 +650,8 @@ struct ide_drive_s { | |||
662 | int (*pc_io_buffers)(struct ide_drive_s *, struct ide_atapi_pc *, | 650 | int (*pc_io_buffers)(struct ide_drive_s *, struct ide_atapi_pc *, |
663 | unsigned int, int); | 651 | unsigned int, int); |
664 | 652 | ||
653 | ide_startstop_t (*irq_handler)(struct ide_drive_s *); | ||
654 | |||
665 | unsigned long atapi_flags; | 655 | unsigned long atapi_flags; |
666 | 656 | ||
667 | struct ide_atapi_pc request_sense_pc; | 657 | struct ide_atapi_pc request_sense_pc; |
@@ -684,7 +674,6 @@ struct ide_tp_ops { | |||
684 | void (*exec_command)(struct hwif_s *, u8); | 674 | void (*exec_command)(struct hwif_s *, u8); |
685 | u8 (*read_status)(struct hwif_s *); | 675 | u8 (*read_status)(struct hwif_s *); |
686 | u8 (*read_altstatus)(struct hwif_s *); | 676 | u8 (*read_altstatus)(struct hwif_s *); |
687 | u8 (*read_sff_dma_status)(struct hwif_s *); | ||
688 | 677 | ||
689 | void (*set_irq)(struct hwif_s *, int); | 678 | void (*set_irq)(struct hwif_s *, int); |
690 | 679 | ||
@@ -745,14 +734,17 @@ struct ide_dma_ops { | |||
745 | int (*dma_test_irq)(struct ide_drive_s *); | 734 | int (*dma_test_irq)(struct ide_drive_s *); |
746 | void (*dma_lost_irq)(struct ide_drive_s *); | 735 | void (*dma_lost_irq)(struct ide_drive_s *); |
747 | void (*dma_timeout)(struct ide_drive_s *); | 736 | void (*dma_timeout)(struct ide_drive_s *); |
737 | /* | ||
738 | * The following method is optional and only required to be | ||
739 | * implemented for the SFF-8038i compatible controllers. | ||
740 | */ | ||
741 | u8 (*dma_sff_read_status)(struct hwif_s *); | ||
748 | }; | 742 | }; |
749 | 743 | ||
750 | struct ide_host; | 744 | struct ide_host; |
751 | 745 | ||
752 | typedef struct hwif_s { | 746 | typedef struct hwif_s { |
753 | struct hwif_s *next; /* for linked-list in ide_hwgroup_t */ | ||
754 | struct hwif_s *mate; /* other hwif from same PCI chip */ | 747 | struct hwif_s *mate; /* other hwif from same PCI chip */ |
755 | struct hwgroup_s *hwgroup; /* actually (ide_hwgroup_t *) */ | ||
756 | struct proc_dir_entry *proc; /* /proc/ide/ directory entry */ | 748 | struct proc_dir_entry *proc; /* /proc/ide/ directory entry */ |
757 | 749 | ||
758 | struct ide_host *host; | 750 | struct ide_host *host; |
@@ -763,7 +755,7 @@ typedef struct hwif_s { | |||
763 | 755 | ||
764 | unsigned long sata_scr[SATA_NR_PORTS]; | 756 | unsigned long sata_scr[SATA_NR_PORTS]; |
765 | 757 | ||
766 | ide_drive_t drives[MAX_DRIVES]; /* drive info */ | 758 | ide_drive_t *devices[MAX_DRIVES + 1]; |
767 | 759 | ||
768 | u8 major; /* our major number */ | 760 | u8 major; /* our major number */ |
769 | u8 index; /* 0 for ide0; 1 for ide1; ... */ | 761 | u8 index; /* 0 for ide0; 1 for ide1; ... */ |
@@ -829,7 +821,7 @@ typedef struct hwif_s { | |||
829 | unsigned extra_ports; /* number of extra dma ports */ | 821 | unsigned extra_ports; /* number of extra dma ports */ |
830 | 822 | ||
831 | unsigned present : 1; /* this interface exists */ | 823 | unsigned present : 1; /* this interface exists */ |
832 | unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */ | 824 | unsigned busy : 1; /* serializes devices on a port */ |
833 | 825 | ||
834 | struct device gendev; | 826 | struct device gendev; |
835 | struct device *portdev; | 827 | struct device *portdev; |
@@ -841,19 +833,49 @@ typedef struct hwif_s { | |||
841 | #ifdef CONFIG_BLK_DEV_IDEACPI | 833 | #ifdef CONFIG_BLK_DEV_IDEACPI |
842 | struct ide_acpi_hwif_link *acpidata; | 834 | struct ide_acpi_hwif_link *acpidata; |
843 | #endif | 835 | #endif |
836 | |||
837 | /* IRQ handler, if active */ | ||
838 | ide_startstop_t (*handler)(ide_drive_t *); | ||
839 | |||
840 | /* BOOL: polling active & poll_timeout field valid */ | ||
841 | unsigned int polling : 1; | ||
842 | |||
843 | /* current drive */ | ||
844 | ide_drive_t *cur_dev; | ||
845 | |||
846 | /* current request */ | ||
847 | struct request *rq; | ||
848 | |||
849 | /* failsafe timer */ | ||
850 | struct timer_list timer; | ||
851 | /* timeout value during long polls */ | ||
852 | unsigned long poll_timeout; | ||
853 | /* queried upon timeouts */ | ||
854 | int (*expiry)(ide_drive_t *); | ||
855 | |||
856 | int req_gen; | ||
857 | int req_gen_timer; | ||
858 | |||
859 | spinlock_t lock; | ||
844 | } ____cacheline_internodealigned_in_smp ide_hwif_t; | 860 | } ____cacheline_internodealigned_in_smp ide_hwif_t; |
845 | 861 | ||
846 | #define MAX_HOST_PORTS 4 | 862 | #define MAX_HOST_PORTS 4 |
847 | 863 | ||
848 | struct ide_host { | 864 | struct ide_host { |
849 | ide_hwif_t *ports[MAX_HOST_PORTS]; | 865 | ide_hwif_t *ports[MAX_HOST_PORTS + 1]; |
850 | unsigned int n_ports; | 866 | unsigned int n_ports; |
851 | struct device *dev[2]; | 867 | struct device *dev[2]; |
852 | unsigned int (*init_chipset)(struct pci_dev *); | 868 | unsigned int (*init_chipset)(struct pci_dev *); |
853 | unsigned long host_flags; | 869 | unsigned long host_flags; |
854 | void *host_priv; | 870 | void *host_priv; |
871 | ide_hwif_t *cur_port; /* for hosts requiring serialization */ | ||
872 | |||
873 | /* used for hosts requiring serialization */ | ||
874 | volatile long host_busy; | ||
855 | }; | 875 | }; |
856 | 876 | ||
877 | #define IDE_HOST_BUSY 0 | ||
878 | |||
857 | /* | 879 | /* |
858 | * internal ide interrupt handler type | 880 | * internal ide interrupt handler type |
859 | */ | 881 | */ |
@@ -863,38 +885,6 @@ typedef int (ide_expiry_t)(ide_drive_t *); | |||
863 | /* used by ide-cd, ide-floppy, etc. */ | 885 | /* used by ide-cd, ide-floppy, etc. */ |
864 | typedef void (xfer_func_t)(ide_drive_t *, struct request *rq, void *, unsigned); | 886 | typedef void (xfer_func_t)(ide_drive_t *, struct request *rq, void *, unsigned); |
865 | 887 | ||
866 | typedef struct hwgroup_s { | ||
867 | /* irq handler, if active */ | ||
868 | ide_startstop_t (*handler)(ide_drive_t *); | ||
869 | |||
870 | /* BOOL: protects all fields below */ | ||
871 | volatile int busy; | ||
872 | /* BOOL: polling active & poll_timeout field valid */ | ||
873 | unsigned int polling : 1; | ||
874 | |||
875 | /* current drive */ | ||
876 | ide_drive_t *drive; | ||
877 | /* ptr to current hwif in linked-list */ | ||
878 | ide_hwif_t *hwif; | ||
879 | |||
880 | /* current request */ | ||
881 | struct request *rq; | ||
882 | |||
883 | /* failsafe timer */ | ||
884 | struct timer_list timer; | ||
885 | /* timeout value during long polls */ | ||
886 | unsigned long poll_timeout; | ||
887 | /* queried upon timeouts */ | ||
888 | int (*expiry)(ide_drive_t *); | ||
889 | |||
890 | int req_gen; | ||
891 | int req_gen_timer; | ||
892 | |||
893 | spinlock_t lock; | ||
894 | } ide_hwgroup_t; | ||
895 | |||
896 | typedef struct ide_driver_s ide_driver_t; | ||
897 | |||
898 | extern struct mutex ide_setting_mtx; | 888 | extern struct mutex ide_setting_mtx; |
899 | 889 | ||
900 | /* | 890 | /* |
@@ -1020,8 +1010,8 @@ void ide_proc_register_port(ide_hwif_t *); | |||
1020 | void ide_proc_port_register_devices(ide_hwif_t *); | 1010 | void ide_proc_port_register_devices(ide_hwif_t *); |
1021 | void ide_proc_unregister_device(ide_drive_t *); | 1011 | void ide_proc_unregister_device(ide_drive_t *); |
1022 | void ide_proc_unregister_port(ide_hwif_t *); | 1012 | void ide_proc_unregister_port(ide_hwif_t *); |
1023 | void ide_proc_register_driver(ide_drive_t *, ide_driver_t *); | 1013 | void ide_proc_register_driver(ide_drive_t *, struct ide_driver *); |
1024 | void ide_proc_unregister_driver(ide_drive_t *, ide_driver_t *); | 1014 | void ide_proc_unregister_driver(ide_drive_t *, struct ide_driver *); |
1025 | 1015 | ||
1026 | read_proc_t proc_ide_read_capacity; | 1016 | read_proc_t proc_ide_read_capacity; |
1027 | read_proc_t proc_ide_read_geometry; | 1017 | read_proc_t proc_ide_read_geometry; |
@@ -1048,8 +1038,10 @@ static inline void ide_proc_register_port(ide_hwif_t *hwif) { ; } | |||
1048 | static inline void ide_proc_port_register_devices(ide_hwif_t *hwif) { ; } | 1038 | static inline void ide_proc_port_register_devices(ide_hwif_t *hwif) { ; } |
1049 | static inline void ide_proc_unregister_device(ide_drive_t *drive) { ; } | 1039 | static inline void ide_proc_unregister_device(ide_drive_t *drive) { ; } |
1050 | static inline void ide_proc_unregister_port(ide_hwif_t *hwif) { ; } | 1040 | static inline void ide_proc_unregister_port(ide_hwif_t *hwif) { ; } |
1051 | static inline void ide_proc_register_driver(ide_drive_t *drive, ide_driver_t *driver) { ; } | 1041 | static inline void ide_proc_register_driver(ide_drive_t *drive, |
1052 | static inline void ide_proc_unregister_driver(ide_drive_t *drive, ide_driver_t *driver) { ; } | 1042 | struct ide_driver *driver) { ; } |
1043 | static inline void ide_proc_unregister_driver(ide_drive_t *drive, | ||
1044 | struct ide_driver *driver) { ; } | ||
1053 | #define PROC_IDE_READ_RETURN(page,start,off,count,eof,len) return 0; | 1045 | #define PROC_IDE_READ_RETURN(page,start,off,count,eof,len) return 0; |
1054 | #endif | 1046 | #endif |
1055 | 1047 | ||
@@ -1118,11 +1110,10 @@ void ide_check_pm_state(ide_drive_t *, struct request *); | |||
1118 | * The gendriver.owner field should be set to the module owner of this driver. | 1110 | * The gendriver.owner field should be set to the module owner of this driver. |
1119 | * The gendriver.name field should be set to the name of this driver | 1111 | * The gendriver.name field should be set to the name of this driver |
1120 | */ | 1112 | */ |
1121 | struct ide_driver_s { | 1113 | struct ide_driver { |
1122 | const char *version; | 1114 | const char *version; |
1123 | ide_startstop_t (*do_request)(ide_drive_t *, struct request *, sector_t); | 1115 | ide_startstop_t (*do_request)(ide_drive_t *, struct request *, sector_t); |
1124 | int (*end_request)(ide_drive_t *, int, int); | 1116 | int (*end_request)(ide_drive_t *, int, int); |
1125 | ide_startstop_t (*error)(ide_drive_t *, struct request *rq, u8, u8); | ||
1126 | struct device_driver gen_driver; | 1117 | struct device_driver gen_driver; |
1127 | int (*probe)(ide_drive_t *); | 1118 | int (*probe)(ide_drive_t *); |
1128 | void (*remove)(ide_drive_t *); | 1119 | void (*remove)(ide_drive_t *); |
@@ -1134,7 +1125,7 @@ struct ide_driver_s { | |||
1134 | #endif | 1125 | #endif |
1135 | }; | 1126 | }; |
1136 | 1127 | ||
1137 | #define to_ide_driver(drv) container_of(drv, ide_driver_t, gen_driver) | 1128 | #define to_ide_driver(drv) container_of(drv, struct ide_driver, gen_driver) |
1138 | 1129 | ||
1139 | int ide_device_get(ide_drive_t *); | 1130 | int ide_device_get(ide_drive_t *); |
1140 | void ide_device_put(ide_drive_t *); | 1131 | void ide_device_put(ide_drive_t *); |
@@ -1166,9 +1157,7 @@ void ide_execute_pkt_cmd(ide_drive_t *); | |||
1166 | 1157 | ||
1167 | void ide_pad_transfer(ide_drive_t *, int, int); | 1158 | void ide_pad_transfer(ide_drive_t *, int, int); |
1168 | 1159 | ||
1169 | ide_startstop_t __ide_error(ide_drive_t *, struct request *, u8, u8); | 1160 | ide_startstop_t ide_error(ide_drive_t *, const char *, u8); |
1170 | |||
1171 | ide_startstop_t ide_error (ide_drive_t *drive, const char *msg, byte stat); | ||
1172 | 1161 | ||
1173 | void ide_fix_driveid(u16 *); | 1162 | void ide_fix_driveid(u16 *); |
1174 | 1163 | ||
@@ -1192,7 +1181,6 @@ void ide_tf_dump(const char *, struct ide_taskfile *); | |||
1192 | void ide_exec_command(ide_hwif_t *, u8); | 1181 | void ide_exec_command(ide_hwif_t *, u8); |
1193 | u8 ide_read_status(ide_hwif_t *); | 1182 | u8 ide_read_status(ide_hwif_t *); |
1194 | u8 ide_read_altstatus(ide_hwif_t *); | 1183 | u8 ide_read_altstatus(ide_hwif_t *); |
1195 | u8 ide_read_sff_dma_status(ide_hwif_t *); | ||
1196 | 1184 | ||
1197 | void ide_set_irq(ide_hwif_t *, int); | 1185 | void ide_set_irq(ide_hwif_t *, int); |
1198 | 1186 | ||
@@ -1272,26 +1260,6 @@ extern void ide_stall_queue(ide_drive_t *drive, unsigned long timeout); | |||
1272 | 1260 | ||
1273 | extern void ide_timer_expiry(unsigned long); | 1261 | extern void ide_timer_expiry(unsigned long); |
1274 | extern irqreturn_t ide_intr(int irq, void *dev_id); | 1262 | extern irqreturn_t ide_intr(int irq, void *dev_id); |
1275 | |||
1276 | static inline int ide_lock_hwgroup(ide_hwgroup_t *hwgroup) | ||
1277 | { | ||
1278 | if (hwgroup->busy) | ||
1279 | return 1; | ||
1280 | |||
1281 | hwgroup->busy = 1; | ||
1282 | /* for atari only */ | ||
1283 | ide_get_lock(ide_intr, hwgroup); | ||
1284 | |||
1285 | return 0; | ||
1286 | } | ||
1287 | |||
1288 | static inline void ide_unlock_hwgroup(ide_hwgroup_t *hwgroup) | ||
1289 | { | ||
1290 | /* for atari only */ | ||
1291 | ide_release_lock(); | ||
1292 | hwgroup->busy = 0; | ||
1293 | } | ||
1294 | |||
1295 | extern void do_ide_request(struct request_queue *); | 1263 | extern void do_ide_request(struct request_queue *); |
1296 | 1264 | ||
1297 | void ide_init_disk(struct gendisk *, ide_drive_t *); | 1265 | void ide_init_disk(struct gendisk *, ide_drive_t *); |
@@ -1327,11 +1295,11 @@ static inline int ide_hwif_setup_dma(ide_hwif_t *hwif, | |||
1327 | } | 1295 | } |
1328 | #endif | 1296 | #endif |
1329 | 1297 | ||
1330 | typedef struct ide_pci_enablebit_s { | 1298 | struct ide_pci_enablebit { |
1331 | u8 reg; /* byte pci reg holding the enable-bit */ | 1299 | u8 reg; /* byte pci reg holding the enable-bit */ |
1332 | u8 mask; /* mask to isolate the enable-bit */ | 1300 | u8 mask; /* mask to isolate the enable-bit */ |
1333 | u8 val; /* value of masked reg when "enabled" */ | 1301 | u8 val; /* value of masked reg when "enabled" */ |
1334 | } ide_pci_enablebit_t; | 1302 | }; |
1335 | 1303 | ||
1336 | enum { | 1304 | enum { |
1337 | /* Uses ISA control ports not PCI ones. */ | 1305 | /* Uses ISA control ports not PCI ones. */ |
@@ -1420,7 +1388,8 @@ struct ide_port_info { | |||
1420 | const struct ide_port_ops *port_ops; | 1388 | const struct ide_port_ops *port_ops; |
1421 | const struct ide_dma_ops *dma_ops; | 1389 | const struct ide_dma_ops *dma_ops; |
1422 | 1390 | ||
1423 | ide_pci_enablebit_t enablebits[2]; | 1391 | struct ide_pci_enablebit enablebits[2]; |
1392 | |||
1424 | hwif_chipset_t chipset; | 1393 | hwif_chipset_t chipset; |
1425 | 1394 | ||
1426 | u16 max_sectors; /* if < than the default one */ | 1395 | u16 max_sectors; /* if < than the default one */ |
@@ -1492,6 +1461,7 @@ void ide_dma_exec_cmd(ide_drive_t *, u8); | |||
1492 | extern void ide_dma_start(ide_drive_t *); | 1461 | extern void ide_dma_start(ide_drive_t *); |
1493 | int ide_dma_end(ide_drive_t *); | 1462 | int ide_dma_end(ide_drive_t *); |
1494 | int ide_dma_test_irq(ide_drive_t *); | 1463 | int ide_dma_test_irq(ide_drive_t *); |
1464 | u8 ide_dma_sff_read_status(ide_hwif_t *); | ||
1495 | extern const struct ide_dma_ops sff_dma_ops; | 1465 | extern const struct ide_dma_ops sff_dma_ops; |
1496 | #else | 1466 | #else |
1497 | static inline int config_drive_for_dma(ide_drive_t *drive) { return 0; } | 1467 | static inline int config_drive_for_dma(ide_drive_t *drive) { return 0; } |
@@ -1529,9 +1499,6 @@ static inline void ide_acpi_port_init_devices(ide_hwif_t *hwif) { ; } | |||
1529 | static inline void ide_acpi_set_state(ide_hwif_t *hwif, int on) {} | 1499 | static inline void ide_acpi_set_state(ide_hwif_t *hwif, int on) {} |
1530 | #endif | 1500 | #endif |
1531 | 1501 | ||
1532 | void ide_remove_port_from_hwgroup(ide_hwif_t *); | ||
1533 | void ide_unregister(ide_hwif_t *); | ||
1534 | |||
1535 | void ide_register_region(struct gendisk *); | 1502 | void ide_register_region(struct gendisk *); |
1536 | void ide_unregister_region(struct gendisk *); | 1503 | void ide_unregister_region(struct gendisk *); |
1537 | 1504 | ||
@@ -1616,23 +1583,6 @@ static inline void ide_set_max_pio(ide_drive_t *drive) | |||
1616 | ide_set_pio(drive, 255); | 1583 | ide_set_pio(drive, 255); |
1617 | } | 1584 | } |
1618 | 1585 | ||
1619 | extern spinlock_t ide_lock; | ||
1620 | extern struct mutex ide_cfg_mtx; | ||
1621 | /* | ||
1622 | * Structure locking: | ||
1623 | * | ||
1624 | * ide_cfg_mtx and hwgroup->lock together protect changes to | ||
1625 | * ide_hwif_t->next | ||
1626 | * ide_drive_t->next | ||
1627 | * | ||
1628 | * ide_hwgroup_t->busy: hwgroup->lock | ||
1629 | * ide_hwgroup_t->hwif: hwgroup->lock | ||
1630 | * ide_hwif_t->{hwgroup,mate}: constant, no locking | ||
1631 | * ide_drive_t->hwif: constant, no locking | ||
1632 | */ | ||
1633 | |||
1634 | #define local_irq_set(flags) do { local_save_flags((flags)); local_irq_enable_in_hardirq(); } while (0) | ||
1635 | |||
1636 | char *ide_media_string(ide_drive_t *); | 1586 | char *ide_media_string(ide_drive_t *); |
1637 | 1587 | ||
1638 | extern struct device_attribute ide_dev_attrs[]; | 1588 | extern struct device_attribute ide_dev_attrs[]; |
@@ -1651,8 +1601,15 @@ static inline int hwif_to_node(ide_hwif_t *hwif) | |||
1651 | 1601 | ||
1652 | static inline ide_drive_t *ide_get_pair_dev(ide_drive_t *drive) | 1602 | static inline ide_drive_t *ide_get_pair_dev(ide_drive_t *drive) |
1653 | { | 1603 | { |
1654 | ide_drive_t *peer = &drive->hwif->drives[(drive->dn ^ 1) & 1]; | 1604 | ide_drive_t *peer = drive->hwif->devices[(drive->dn ^ 1) & 1]; |
1655 | 1605 | ||
1656 | return (peer->dev_flags & IDE_DFLAG_PRESENT) ? peer : NULL; | 1606 | return (peer->dev_flags & IDE_DFLAG_PRESENT) ? peer : NULL; |
1657 | } | 1607 | } |
1608 | |||
1609 | #define ide_port_for_each_dev(i, dev, port) \ | ||
1610 | for ((i) = 0; ((dev) = (port)->devices[i]) || (i) < MAX_DRIVES; (i)++) | ||
1611 | |||
1612 | #define ide_host_for_each_port(i, port, host) \ | ||
1613 | for ((i) = 0; ((port) = (host)->ports[i]) || (i) < MAX_HOST_PORTS; (i)++) | ||
1614 | |||
1658 | #endif /* _IDE_H */ | 1615 | #endif /* _IDE_H */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 218c73b1e6d4..d543365518ab 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1658,6 +1658,7 @@ | |||
1658 | #define PCI_VENDOR_ID_ROCKWELL 0x127A | 1658 | #define PCI_VENDOR_ID_ROCKWELL 0x127A |
1659 | 1659 | ||
1660 | #define PCI_VENDOR_ID_ITE 0x1283 | 1660 | #define PCI_VENDOR_ID_ITE 0x1283 |
1661 | #define PCI_DEVICE_ID_ITE_8172 0x8172 | ||
1661 | #define PCI_DEVICE_ID_ITE_8211 0x8211 | 1662 | #define PCI_DEVICE_ID_ITE_8211 0x8211 |
1662 | #define PCI_DEVICE_ID_ITE_8212 0x8212 | 1663 | #define PCI_DEVICE_ID_ITE_8212 0x8212 |
1663 | #define PCI_DEVICE_ID_ITE_8213 0x8213 | 1664 | #define PCI_DEVICE_ID_ITE_8213 0x8213 |