diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-02-01 17:58:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-02-01 17:58:02 -0500 |
commit | f3191248bf1bf6627c04c5624904df45e0a979ed (patch) | |
tree | ad7a49bf947f849740999702204373c3c12caea7 /include | |
parent | cbb51afa6d69be003cc827a89e023906885f241e (diff) | |
parent | a14dc57495899175a0827673fe23ed17b5653896 (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: (100 commits)
ide: move hwif_register() call out of ide_probe_port()
ide: factor out code for tuning devices from ide_probe_port()
ide: move handling of I/O resources out of ide_probe_port()
ide: make probe_hwif() return an error value
ide: use ide_remove_port_from_hwgroup in init_irq()
ide: prepare init_irq() for using ide_remove_port_from_hwgroup()
ide: factor out code removing port from hwgroup from ide_unregister()
ide: I/O resources are released too early in ide_unregister()
ide: cleanup ide_system_bus_speed()
ide: remove needless zeroing of hwgroup fields from init_irq()
ide: remove unused ide_hwgroup_t fields
ide_platform: remove struct hwif_prop
ide: remove hwif->present manipulations from hwif_init()
ide: move wait_hwif_ready() documentation in the right place
ide: fix handling of busy I/O resources in probe_hwif()
<linux/hdsmart.h> is not used by kernel code
ide: don't include <linux/hdsmart.h>
ide-floppy: cleanup header
ide: update/add my Copyrights
ide: delete filenames/versions from comments
...
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-mips/mach-au1x00/au1xxx_ide.h | 1 | ||||
-rw-r--r-- | include/linux/cdrom.h | 14 | ||||
-rw-r--r-- | include/linux/hdsmart.h | 2 | ||||
-rw-r--r-- | include/linux/ide.h | 40 |
4 files changed, 36 insertions, 21 deletions
diff --git a/include/asm-mips/mach-au1x00/au1xxx_ide.h b/include/asm-mips/mach-au1x00/au1xxx_ide.h index aef0edbfe4c6..e4fe26c160ba 100644 --- a/include/asm-mips/mach-au1x00/au1xxx_ide.h +++ b/include/asm-mips/mach-au1x00/au1xxx_ide.h | |||
@@ -74,7 +74,6 @@ typedef struct | |||
74 | struct dbdma_cmd *dma_table_cpu; | 74 | struct dbdma_cmd *dma_table_cpu; |
75 | dma_addr_t dma_table_dma; | 75 | dma_addr_t dma_table_dma; |
76 | #endif | 76 | #endif |
77 | struct device *dev; | ||
78 | int irq; | 77 | int irq; |
79 | u32 regbase; | 78 | u32 regbase; |
80 | #ifdef CONFIG_PM | 79 | #ifdef CONFIG_PM |
diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h index fcdc11b9609b..a5cd2047624e 100644 --- a/include/linux/cdrom.h +++ b/include/linux/cdrom.h | |||
@@ -1187,6 +1187,20 @@ struct media_event_desc { | |||
1187 | 1187 | ||
1188 | extern int cdrom_get_media_event(struct cdrom_device_info *cdi, struct media_event_desc *med); | 1188 | extern int cdrom_get_media_event(struct cdrom_device_info *cdi, struct media_event_desc *med); |
1189 | 1189 | ||
1190 | static inline void lba_to_msf(int lba, u8 *m, u8 *s, u8 *f) | ||
1191 | { | ||
1192 | lba += CD_MSF_OFFSET; | ||
1193 | lba &= 0xffffff; /* negative lbas use only 24 bits */ | ||
1194 | *m = lba / (CD_SECS * CD_FRAMES); | ||
1195 | lba %= (CD_SECS * CD_FRAMES); | ||
1196 | *s = lba / CD_FRAMES; | ||
1197 | *f = lba % CD_FRAMES; | ||
1198 | } | ||
1199 | |||
1200 | static inline int msf_to_lba(u8 m, u8 s, u8 f) | ||
1201 | { | ||
1202 | return (((m * CD_SECS) + s) * CD_FRAMES + f) - CD_MSF_OFFSET; | ||
1203 | } | ||
1190 | #endif /* End of kernel only stuff */ | 1204 | #endif /* End of kernel only stuff */ |
1191 | 1205 | ||
1192 | #endif /* _LINUX_CDROM_H */ | 1206 | #endif /* _LINUX_CDROM_H */ |
diff --git a/include/linux/hdsmart.h b/include/linux/hdsmart.h index 7974a47fe582..e69192159d40 100644 --- a/include/linux/hdsmart.h +++ b/include/linux/hdsmart.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #ifndef _LINUX_HDSMART_H | 17 | #ifndef _LINUX_HDSMART_H |
18 | #define _LINUX_HDSMART_H | 18 | #define _LINUX_HDSMART_H |
19 | 19 | ||
20 | #ifndef __KERNEL | ||
20 | #define OFFLINE_FULL_SCAN 0 | 21 | #define OFFLINE_FULL_SCAN 0 |
21 | #define SHORT_SELF_TEST 1 | 22 | #define SHORT_SELF_TEST 1 |
22 | #define EXTEND_SELF_TEST 2 | 23 | #define EXTEND_SELF_TEST 2 |
@@ -120,5 +121,6 @@ typedef struct ata_smart_selftestlog_s { | |||
120 | unsigned char resevered[2]; | 121 | unsigned char resevered[2]; |
121 | unsigned char chksum; | 122 | unsigned char chksum; |
122 | } __attribute__ ((packed)) ata_smart_selftestlog_t; | 123 | } __attribute__ ((packed)) ata_smart_selftestlog_t; |
124 | #endif /* __KERNEL__ * | ||
123 | 125 | ||
124 | #endif /* _LINUX_HDSMART_H */ | 126 | #endif /* _LINUX_HDSMART_H */ |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 27cb39de2ae2..ec10b2a3bb6e 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -9,7 +9,6 @@ | |||
9 | #include <linux/init.h> | 9 | #include <linux/init.h> |
10 | #include <linux/ioport.h> | 10 | #include <linux/ioport.h> |
11 | #include <linux/hdreg.h> | 11 | #include <linux/hdreg.h> |
12 | #include <linux/hdsmart.h> | ||
13 | #include <linux/blkdev.h> | 12 | #include <linux/blkdev.h> |
14 | #include <linux/proc_fs.h> | 13 | #include <linux/proc_fs.h> |
15 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
@@ -503,7 +502,8 @@ typedef struct hwif_s { | |||
503 | 502 | ||
504 | hwif_chipset_t chipset; /* sub-module for tuning.. */ | 503 | hwif_chipset_t chipset; /* sub-module for tuning.. */ |
505 | 504 | ||
506 | struct pci_dev *pci_dev; /* for pci chipsets */ | 505 | struct device *dev; |
506 | |||
507 | const struct ide_port_info *cds; /* chipset device struct */ | 507 | const struct ide_port_info *cds; /* chipset device struct */ |
508 | 508 | ||
509 | ide_ack_intr_t *ack_intr; | 509 | ide_ack_intr_t *ack_intr; |
@@ -628,8 +628,7 @@ typedef int (ide_expiry_t)(ide_drive_t *); | |||
628 | typedef struct hwgroup_s { | 628 | typedef struct hwgroup_s { |
629 | /* irq handler, if active */ | 629 | /* irq handler, if active */ |
630 | ide_startstop_t (*handler)(ide_drive_t *); | 630 | ide_startstop_t (*handler)(ide_drive_t *); |
631 | /* irq handler, suspended if active */ | 631 | |
632 | ide_startstop_t (*handler_save)(ide_drive_t *); | ||
633 | /* BOOL: protects all fields below */ | 632 | /* BOOL: protects all fields below */ |
634 | volatile int busy; | 633 | volatile int busy; |
635 | /* BOOL: wake us up on timer expiry */ | 634 | /* BOOL: wake us up on timer expiry */ |
@@ -644,25 +643,18 @@ typedef struct hwgroup_s { | |||
644 | /* ptr to current hwif in linked-list */ | 643 | /* ptr to current hwif in linked-list */ |
645 | ide_hwif_t *hwif; | 644 | ide_hwif_t *hwif; |
646 | 645 | ||
647 | /* for pci chipsets */ | ||
648 | struct pci_dev *pci_dev; | ||
649 | |||
650 | /* current request */ | 646 | /* current request */ |
651 | struct request *rq; | 647 | struct request *rq; |
648 | |||
652 | /* failsafe timer */ | 649 | /* failsafe timer */ |
653 | struct timer_list timer; | 650 | struct timer_list timer; |
654 | /* local copy of current write rq */ | ||
655 | struct request wrq; | ||
656 | /* timeout value during long polls */ | 651 | /* timeout value during long polls */ |
657 | unsigned long poll_timeout; | 652 | unsigned long poll_timeout; |
658 | /* queried upon timeouts */ | 653 | /* queried upon timeouts */ |
659 | int (*expiry)(ide_drive_t *); | 654 | int (*expiry)(ide_drive_t *); |
660 | /* ide_system_bus_speed */ | 655 | |
661 | int pio_clock; | ||
662 | int req_gen; | 656 | int req_gen; |
663 | int req_gen_timer; | 657 | int req_gen_timer; |
664 | |||
665 | unsigned char cmd_buf[4]; | ||
666 | } ide_hwgroup_t; | 658 | } ide_hwgroup_t; |
667 | 659 | ||
668 | typedef struct ide_driver_s ide_driver_t; | 660 | typedef struct ide_driver_s ide_driver_t; |
@@ -986,8 +978,6 @@ ide_startstop_t do_rw_taskfile(ide_drive_t *, ide_task_t *); | |||
986 | 978 | ||
987 | void task_end_request(ide_drive_t *, struct request *, u8); | 979 | void task_end_request(ide_drive_t *, struct request *, u8); |
988 | 980 | ||
989 | u8 wait_drive_not_busy(ide_drive_t *); | ||
990 | |||
991 | int ide_raw_taskfile(ide_drive_t *, ide_task_t *, u8 *, u16); | 981 | int ide_raw_taskfile(ide_drive_t *, ide_task_t *, u8 *, u16); |
992 | int ide_no_data_taskfile(ide_drive_t *, ide_task_t *); | 982 | int ide_no_data_taskfile(ide_drive_t *, ide_task_t *); |
993 | 983 | ||
@@ -1017,7 +1007,6 @@ void ide_init_disk(struct gendisk *, ide_drive_t *); | |||
1017 | 1007 | ||
1018 | #ifdef CONFIG_IDEPCI_PCIBUS_ORDER | 1008 | #ifdef CONFIG_IDEPCI_PCIBUS_ORDER |
1019 | extern int ide_scan_direction; | 1009 | extern int ide_scan_direction; |
1020 | int __init ide_scan_pcibus(void); | ||
1021 | extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *owner, const char *mod_name); | 1010 | extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *owner, const char *mod_name); |
1022 | #define ide_pci_register_driver(d) __ide_pci_register_driver(d, THIS_MODULE, KBUILD_MODNAME) | 1011 | #define ide_pci_register_driver(d) __ide_pci_register_driver(d, THIS_MODULE, KBUILD_MODNAME) |
1023 | #else | 1012 | #else |
@@ -1096,6 +1085,10 @@ enum { | |||
1096 | IDE_HFLAG_ABUSE_SET_DMA_MODE = (1 << 26), | 1085 | IDE_HFLAG_ABUSE_SET_DMA_MODE = (1 << 26), |
1097 | /* host is CY82C693 */ | 1086 | /* host is CY82C693 */ |
1098 | IDE_HFLAG_CY82C693 = (1 << 27), | 1087 | IDE_HFLAG_CY82C693 = (1 << 27), |
1088 | /* force host out of "simplex" mode */ | ||
1089 | IDE_HFLAG_CLEAR_SIMPLEX = (1 << 28), | ||
1090 | /* DSC overlap is unsupported */ | ||
1091 | IDE_HFLAG_NO_DSC = (1 << 29), | ||
1099 | }; | 1092 | }; |
1100 | 1093 | ||
1101 | #ifdef CONFIG_BLK_DEV_OFFBOARD | 1094 | #ifdef CONFIG_BLK_DEV_OFFBOARD |
@@ -1153,12 +1146,13 @@ void ide_dma_on(ide_drive_t *); | |||
1153 | int ide_set_dma(ide_drive_t *); | 1146 | int ide_set_dma(ide_drive_t *); |
1154 | ide_startstop_t ide_dma_intr(ide_drive_t *); | 1147 | ide_startstop_t ide_dma_intr(ide_drive_t *); |
1155 | 1148 | ||
1149 | int ide_build_sglist(ide_drive_t *, struct request *); | ||
1150 | void ide_destroy_dmatable(ide_drive_t *); | ||
1151 | |||
1156 | #ifdef CONFIG_BLK_DEV_IDEDMA_PCI | 1152 | #ifdef CONFIG_BLK_DEV_IDEDMA_PCI |
1157 | extern int ide_build_sglist(ide_drive_t *, struct request *); | ||
1158 | extern int ide_build_dmatable(ide_drive_t *, struct request *); | 1153 | extern int ide_build_dmatable(ide_drive_t *, struct request *); |
1159 | extern void ide_destroy_dmatable(ide_drive_t *); | ||
1160 | extern int ide_release_dma(ide_hwif_t *); | 1154 | extern int ide_release_dma(ide_hwif_t *); |
1161 | extern void ide_setup_dma(ide_hwif_t *, unsigned long, unsigned int); | 1155 | extern void ide_setup_dma(ide_hwif_t *, unsigned long); |
1162 | 1156 | ||
1163 | void ide_dma_host_set(ide_drive_t *, int); | 1157 | void ide_dma_host_set(ide_drive_t *, int); |
1164 | extern int ide_dma_setup(ide_drive_t *); | 1158 | extern int ide_dma_setup(ide_drive_t *); |
@@ -1197,6 +1191,7 @@ static inline void ide_acpi_init(ide_hwif_t *hwif) { ; } | |||
1197 | static inline void ide_acpi_set_state(ide_hwif_t *hwif, int on) {} | 1191 | static inline void ide_acpi_set_state(ide_hwif_t *hwif, int on) {} |
1198 | #endif | 1192 | #endif |
1199 | 1193 | ||
1194 | void ide_remove_port_from_hwgroup(ide_hwif_t *); | ||
1200 | extern int ide_hwif_request_regions(ide_hwif_t *hwif); | 1195 | extern int ide_hwif_request_regions(ide_hwif_t *hwif); |
1201 | extern void ide_hwif_release_regions(ide_hwif_t* hwif); | 1196 | extern void ide_hwif_release_regions(ide_hwif_t* hwif); |
1202 | extern void ide_unregister (unsigned int index); | 1197 | extern void ide_unregister (unsigned int index); |
@@ -1291,9 +1286,14 @@ extern struct bus_type ide_bus_type; | |||
1291 | #define ide_id_has_flush_cache_ext(id) \ | 1286 | #define ide_id_has_flush_cache_ext(id) \ |
1292 | (((id)->cfs_enable_2 & 0x2400) == 0x2400) | 1287 | (((id)->cfs_enable_2 & 0x2400) == 0x2400) |
1293 | 1288 | ||
1289 | static inline void ide_dump_identify(u8 *id) | ||
1290 | { | ||
1291 | print_hex_dump(KERN_INFO, "", DUMP_PREFIX_NONE, 16, 2, id, 512, 0); | ||
1292 | } | ||
1293 | |||
1294 | static inline int hwif_to_node(ide_hwif_t *hwif) | 1294 | static inline int hwif_to_node(ide_hwif_t *hwif) |
1295 | { | 1295 | { |
1296 | struct pci_dev *dev = hwif->pci_dev; | 1296 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
1297 | return dev ? pcibus_to_node(dev->bus) : -1; | 1297 | return dev ? pcibus_to_node(dev->bus) : -1; |
1298 | } | 1298 | } |
1299 | 1299 | ||