diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-26 12:48:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-26 12:48:00 -0400 |
commit | 1292ebb82c00c69cf983e871faa221ce88ed3338 (patch) | |
tree | 91f624dd175c9d3e842db78789c6a0c79a78eee5 /include | |
parent | b82287587ef9917afbea5fcbf7aa63424b6f3719 (diff) | |
parent | 784506cbddd17bcd5929f827df39b0c7014e3f1e (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: (61 commits)
ide: sanitize handling of IDE_HFLAG_NO_SET_MODE host flag
sis5513: fail early for unsupported chipsets
it821x: fix kzalloc() failure handling
qd65xx: use IDE_HFLAG_SINGLE host flag
qd65xx: always use ->selectproc method
ide-cd: put proc-related functions together under single ifdef
ide-cd: Replace __FUNCTION__ with __func__
IDE: Coding Style fixes to drivers/ide/ide-cd.c
IDE: Coding Style fixes to drivers/ide/pci/cy82c693.c
IDE: Coding Style fixes to drivers/ide/pci/it8213.c
IDE: Coding Style fixes to drivers/ide/ide-floppy.c
IDE: Coding Style fixes to drivers/ide/legacy/ali14xx.c
IDE: Coding Style fixes to drivers/ide/legacy/hd.c
IDE: Coding Style fixes to drivers/ide/pci/cmd640.c
IDE: Coding Style fixes to drivers/ide/pci/opti621.c
IDE: Coding Style fixes to drivers/ide/ide-pnp.c
IDE: Coding Style fixes to drivers/ide/ide-proc.c
IDE: Coding Style fixes to drivers/ide/legacy/ide-4drives.c
IDE: Coding Style fixes to drivers/ide/legacy/umc8672.c
IDE: Coding Style fixes to drivers/ide/pci/generic.c
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/Kbuild | 1 | ||||
-rw-r--r-- | include/linux/hdsmart.h | 126 | ||||
-rw-r--r-- | include/linux/ide.h | 23 |
3 files changed, 13 insertions, 137 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index cbb5ccb27de3..bda6f04791d4 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -210,7 +210,6 @@ unifdef-y += hayesesp.h | |||
210 | unifdef-y += hdlcdrv.h | 210 | unifdef-y += hdlcdrv.h |
211 | unifdef-y += hdlc.h | 211 | unifdef-y += hdlc.h |
212 | unifdef-y += hdreg.h | 212 | unifdef-y += hdreg.h |
213 | unifdef-y += hdsmart.h | ||
214 | unifdef-y += hid.h | 213 | unifdef-y += hid.h |
215 | unifdef-y += hiddev.h | 214 | unifdef-y += hiddev.h |
216 | unifdef-y += hidraw.h | 215 | unifdef-y += hidraw.h |
diff --git a/include/linux/hdsmart.h b/include/linux/hdsmart.h deleted file mode 100644 index 4f4faf9d4238..000000000000 --- a/include/linux/hdsmart.h +++ /dev/null | |||
@@ -1,126 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/linux/hdsmart.h | ||
3 | * | ||
4 | * Copyright (C) 1999-2000 Michael Cornwell <cornwell@acm.org> | ||
5 | * Copyright (C) 2000 Andre Hedrick <andre@linux-ide.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2, or (at your option) | ||
10 | * any later version. | ||
11 | * | ||
12 | * You should have received a copy of the GNU General Public License | ||
13 | * (for example /usr/src/linux/COPYING); if not, write to the Free | ||
14 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
15 | */ | ||
16 | |||
17 | #ifndef _LINUX_HDSMART_H | ||
18 | #define _LINUX_HDSMART_H | ||
19 | |||
20 | #ifndef __KERNEL__ | ||
21 | #define OFFLINE_FULL_SCAN 0 | ||
22 | #define SHORT_SELF_TEST 1 | ||
23 | #define EXTEND_SELF_TEST 2 | ||
24 | #define SHORT_CAPTIVE_SELF_TEST 129 | ||
25 | #define EXTEND_CAPTIVE_SELF_TEST 130 | ||
26 | |||
27 | /* smart_attribute is the vendor specific in SFF-8035 spec */ | ||
28 | typedef struct ata_smart_attribute_s { | ||
29 | unsigned char id; | ||
30 | unsigned short status_flag; | ||
31 | unsigned char normalized; | ||
32 | unsigned char worse_normal; | ||
33 | unsigned char raw[6]; | ||
34 | unsigned char reserv; | ||
35 | } __attribute__ ((packed)) ata_smart_attribute_t; | ||
36 | |||
37 | /* smart_values is format of the read drive Atrribute command */ | ||
38 | typedef struct ata_smart_values_s { | ||
39 | unsigned short revnumber; | ||
40 | ata_smart_attribute_t vendor_attributes [30]; | ||
41 | unsigned char offline_data_collection_status; | ||
42 | unsigned char self_test_exec_status; | ||
43 | unsigned short total_time_to_complete_off_line; | ||
44 | unsigned char vendor_specific_366; | ||
45 | unsigned char offline_data_collection_capability; | ||
46 | unsigned short smart_capability; | ||
47 | unsigned char errorlog_capability; | ||
48 | unsigned char vendor_specific_371; | ||
49 | unsigned char short_test_completion_time; | ||
50 | unsigned char extend_test_completion_time; | ||
51 | unsigned char reserved_374_385 [12]; | ||
52 | unsigned char vendor_specific_386_509 [125]; | ||
53 | unsigned char chksum; | ||
54 | } __attribute__ ((packed)) ata_smart_values_t; | ||
55 | |||
56 | /* Smart Threshold data structures */ | ||
57 | /* Vendor attribute of SMART Threshold */ | ||
58 | typedef struct ata_smart_threshold_entry_s { | ||
59 | unsigned char id; | ||
60 | unsigned char normalized_threshold; | ||
61 | unsigned char reserved[10]; | ||
62 | } __attribute__ ((packed)) ata_smart_threshold_entry_t; | ||
63 | |||
64 | /* Format of Read SMART THreshold Command */ | ||
65 | typedef struct ata_smart_thresholds_s { | ||
66 | unsigned short revnumber; | ||
67 | ata_smart_threshold_entry_t thres_entries[30]; | ||
68 | unsigned char reserved[149]; | ||
69 | unsigned char chksum; | ||
70 | } __attribute__ ((packed)) ata_smart_thresholds_t; | ||
71 | |||
72 | typedef struct ata_smart_errorlog_command_struct_s { | ||
73 | unsigned char devicecontrolreg; | ||
74 | unsigned char featuresreg; | ||
75 | unsigned char sector_count; | ||
76 | unsigned char sector_number; | ||
77 | unsigned char cylinder_low; | ||
78 | unsigned char cylinder_high; | ||
79 | unsigned char drive_head; | ||
80 | unsigned char commandreg; | ||
81 | unsigned int timestamp; | ||
82 | } __attribute__ ((packed)) ata_smart_errorlog_command_struct_t; | ||
83 | |||
84 | typedef struct ata_smart_errorlog_error_struct_s { | ||
85 | unsigned char error_condition; | ||
86 | unsigned char extended_error[14]; | ||
87 | unsigned char state; | ||
88 | unsigned short timestamp; | ||
89 | } __attribute__ ((packed)) ata_smart_errorlog_error_struct_t; | ||
90 | |||
91 | typedef struct ata_smart_errorlog_struct_s { | ||
92 | ata_smart_errorlog_command_struct_t commands[6]; | ||
93 | ata_smart_errorlog_error_struct_t error_struct; | ||
94 | } __attribute__ ((packed)) ata_smart_errorlog_struct_t; | ||
95 | |||
96 | typedef struct ata_smart_errorlog_s { | ||
97 | unsigned char revnumber; | ||
98 | unsigned char error_log_pointer; | ||
99 | ata_smart_errorlog_struct_t errorlog_struct[5]; | ||
100 | unsigned short ata_error_count; | ||
101 | unsigned short non_fatal_count; | ||
102 | unsigned short drive_timeout_count; | ||
103 | unsigned char reserved[53]; | ||
104 | unsigned char chksum; | ||
105 | } __attribute__ ((packed)) ata_smart_errorlog_t; | ||
106 | |||
107 | typedef struct ata_smart_selftestlog_struct_s { | ||
108 | unsigned char selftestnumber; | ||
109 | unsigned char selfteststatus; | ||
110 | unsigned short timestamp; | ||
111 | unsigned char selftestfailurecheckpoint; | ||
112 | unsigned int lbafirstfailure; | ||
113 | unsigned char vendorspecific[15]; | ||
114 | } __attribute__ ((packed)) ata_smart_selftestlog_struct_t; | ||
115 | |||
116 | typedef struct ata_smart_selftestlog_s { | ||
117 | unsigned short revnumber; | ||
118 | ata_smart_selftestlog_struct_t selftest_struct[21]; | ||
119 | unsigned char vendorspecific[2]; | ||
120 | unsigned char mostrecenttest; | ||
121 | unsigned char resevered[2]; | ||
122 | unsigned char chksum; | ||
123 | } __attribute__ ((packed)) ata_smart_selftestlog_t; | ||
124 | #endif /* __KERNEL__ */ | ||
125 | |||
126 | #endif /* _LINUX_HDSMART_H */ | ||
diff --git a/include/linux/ide.h b/include/linux/ide.h index 5f3e82ae901a..f20410dd4482 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -170,7 +170,6 @@ typedef struct hw_regs_s { | |||
170 | struct device *dev; | 170 | struct device *dev; |
171 | } hw_regs_t; | 171 | } hw_regs_t; |
172 | 172 | ||
173 | struct hwif_s * ide_find_port(unsigned long); | ||
174 | void ide_init_port_data(struct hwif_s *, unsigned int); | 173 | void ide_init_port_data(struct hwif_s *, unsigned int); |
175 | void ide_init_port_hw(struct hwif_s *, hw_regs_t *); | 174 | void ide_init_port_hw(struct hwif_s *, hw_regs_t *); |
176 | 175 | ||
@@ -522,7 +521,6 @@ typedef struct hwif_s { | |||
522 | unsigned reset : 1; /* reset after probe */ | 521 | unsigned reset : 1; /* reset after probe */ |
523 | unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */ | 522 | unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */ |
524 | unsigned mmio : 1; /* host uses MMIO */ | 523 | unsigned mmio : 1; /* host uses MMIO */ |
525 | unsigned straight8 : 1; /* Alan's straight 8 check */ | ||
526 | 524 | ||
527 | struct device gendev; | 525 | struct device gendev; |
528 | struct device *portdev; | 526 | struct device *portdev; |
@@ -809,6 +807,13 @@ extern ide_hwif_t ide_hwifs[]; /* master data repository */ | |||
809 | #endif | 807 | #endif |
810 | extern int noautodma; | 808 | extern int noautodma; |
811 | 809 | ||
810 | ide_hwif_t *ide_find_port_slot(const struct ide_port_info *); | ||
811 | |||
812 | static inline ide_hwif_t *ide_find_port(void) | ||
813 | { | ||
814 | return ide_find_port_slot(NULL); | ||
815 | } | ||
816 | |||
812 | extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs); | 817 | extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs); |
813 | int ide_end_dequeued_request(ide_drive_t *drive, struct request *rq, | 818 | int ide_end_dequeued_request(ide_drive_t *drive, struct request *rq, |
814 | int uptodate, int nr_sectors); | 819 | int uptodate, int nr_sectors); |
@@ -1027,8 +1032,8 @@ enum { | |||
1027 | IDE_HFLAG_SINGLE = (1 << 1), | 1032 | IDE_HFLAG_SINGLE = (1 << 1), |
1028 | /* don't use legacy PIO blacklist */ | 1033 | /* don't use legacy PIO blacklist */ |
1029 | IDE_HFLAG_PIO_NO_BLACKLIST = (1 << 2), | 1034 | IDE_HFLAG_PIO_NO_BLACKLIST = (1 << 2), |
1030 | /* don't use conservative PIO "downgrade" */ | 1035 | /* set for the second port of QD65xx */ |
1031 | IDE_HFLAG_PIO_NO_DOWNGRADE = (1 << 3), | 1036 | IDE_HFLAG_QD_2ND_PORT = (1 << 3), |
1032 | /* use PIO8/9 for prefetch off/on */ | 1037 | /* use PIO8/9 for prefetch off/on */ |
1033 | IDE_HFLAG_ABUSE_PREFETCH = (1 << 4), | 1038 | IDE_HFLAG_ABUSE_PREFETCH = (1 << 4), |
1034 | /* use PIO6/7 for fast-devsel off/on */ | 1039 | /* use PIO6/7 for fast-devsel off/on */ |
@@ -1050,8 +1055,8 @@ enum { | |||
1050 | IDE_HFLAG_VDMA = (1 << 11), | 1055 | IDE_HFLAG_VDMA = (1 << 11), |
1051 | /* ATAPI DMA is unsupported */ | 1056 | /* ATAPI DMA is unsupported */ |
1052 | IDE_HFLAG_NO_ATAPI_DMA = (1 << 12), | 1057 | IDE_HFLAG_NO_ATAPI_DMA = (1 << 12), |
1053 | /* set if host is a "bootable" controller */ | 1058 | /* set if host is a "non-bootable" controller */ |
1054 | IDE_HFLAG_BOOTABLE = (1 << 13), | 1059 | IDE_HFLAG_NON_BOOTABLE = (1 << 13), |
1055 | /* host doesn't support DMA */ | 1060 | /* host doesn't support DMA */ |
1056 | IDE_HFLAG_NO_DMA = (1 << 14), | 1061 | IDE_HFLAG_NO_DMA = (1 << 14), |
1057 | /* check if host is PCI IDE device before allowing DMA */ | 1062 | /* check if host is PCI IDE device before allowing DMA */ |
@@ -1079,8 +1084,6 @@ enum { | |||
1079 | /* unmask IRQs */ | 1084 | /* unmask IRQs */ |
1080 | IDE_HFLAG_UNMASK_IRQS = (1 << 25), | 1085 | IDE_HFLAG_UNMASK_IRQS = (1 << 25), |
1081 | IDE_HFLAG_ABUSE_SET_DMA_MODE = (1 << 26), | 1086 | IDE_HFLAG_ABUSE_SET_DMA_MODE = (1 << 26), |
1082 | /* host is CY82C693 */ | ||
1083 | IDE_HFLAG_CY82C693 = (1 << 27), | ||
1084 | /* force host out of "simplex" mode */ | 1087 | /* force host out of "simplex" mode */ |
1085 | IDE_HFLAG_CLEAR_SIMPLEX = (1 << 28), | 1088 | IDE_HFLAG_CLEAR_SIMPLEX = (1 << 28), |
1086 | /* DSC overlap is unsupported */ | 1089 | /* DSC overlap is unsupported */ |
@@ -1092,9 +1095,9 @@ enum { | |||
1092 | }; | 1095 | }; |
1093 | 1096 | ||
1094 | #ifdef CONFIG_BLK_DEV_OFFBOARD | 1097 | #ifdef CONFIG_BLK_DEV_OFFBOARD |
1095 | # define IDE_HFLAG_OFF_BOARD IDE_HFLAG_BOOTABLE | ||
1096 | #else | ||
1097 | # define IDE_HFLAG_OFF_BOARD 0 | 1098 | # define IDE_HFLAG_OFF_BOARD 0 |
1099 | #else | ||
1100 | # define IDE_HFLAG_OFF_BOARD IDE_HFLAG_NON_BOOTABLE | ||
1098 | #endif | 1101 | #endif |
1099 | 1102 | ||
1100 | struct ide_port_info { | 1103 | struct ide_port_info { |