diff options
Diffstat (limited to 'include/linux')
32 files changed, 183 insertions, 119 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 7d076d97b2f7..1df2ac30a4d2 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -12,7 +12,6 @@ header-y += netfilter_bridge/ | |||
12 | header-y += netfilter_ipv4/ | 12 | header-y += netfilter_ipv4/ |
13 | header-y += netfilter_ipv6/ | 13 | header-y += netfilter_ipv6/ |
14 | 14 | ||
15 | header-y += affs_fs.h | ||
16 | header-y += affs_hardblocks.h | 15 | header-y += affs_hardblocks.h |
17 | header-y += aio_abi.h | 16 | header-y += aio_abi.h |
18 | header-y += a.out.h | 17 | header-y += a.out.h |
@@ -67,7 +66,6 @@ header-y += genetlink.h | |||
67 | header-y += gen_stats.h | 66 | header-y += gen_stats.h |
68 | header-y += gigaset_dev.h | 67 | header-y += gigaset_dev.h |
69 | header-y += hdsmart.h | 68 | header-y += hdsmart.h |
70 | header-y += hpfs_fs.h | ||
71 | header-y += hysdn_if.h | 69 | header-y += hysdn_if.h |
72 | header-y += i2c-dev.h | 70 | header-y += i2c-dev.h |
73 | header-y += i8k.h | 71 | header-y += i8k.h |
@@ -103,6 +101,7 @@ header-y += ixjuser.h | |||
103 | header-y += jffs2.h | 101 | header-y += jffs2.h |
104 | header-y += keyctl.h | 102 | header-y += keyctl.h |
105 | header-y += limits.h | 103 | header-y += limits.h |
104 | header-y += magic.h | ||
106 | header-y += major.h | 105 | header-y += major.h |
107 | header-y += matroxfb.h | 106 | header-y += matroxfb.h |
108 | header-y += meye.h | 107 | header-y += meye.h |
@@ -116,7 +115,6 @@ header-y += netrom.h | |||
116 | header-y += nfs2.h | 115 | header-y += nfs2.h |
117 | header-y += nfs4_mount.h | 116 | header-y += nfs4_mount.h |
118 | header-y += nfs_mount.h | 117 | header-y += nfs_mount.h |
119 | header-y += openprom_fs.h | ||
120 | header-y += param.h | 118 | header-y += param.h |
121 | header-y += pci_ids.h | 119 | header-y += pci_ids.h |
122 | header-y += pci_regs.h | 120 | header-y += pci_regs.h |
@@ -143,7 +141,6 @@ header-y += snmp.h | |||
143 | header-y += sockios.h | 141 | header-y += sockios.h |
144 | header-y += som.h | 142 | header-y += som.h |
145 | header-y += sound.h | 143 | header-y += sound.h |
146 | header-y += stddef.h | ||
147 | header-y += synclink.h | 144 | header-y += synclink.h |
148 | header-y += telephony.h | 145 | header-y += telephony.h |
149 | header-y += termios.h | 146 | header-y += termios.h |
@@ -269,7 +266,6 @@ unifdef-y += netfilter_decnet.h | |||
269 | unifdef-y += netfilter.h | 266 | unifdef-y += netfilter.h |
270 | unifdef-y += netfilter_ipv4.h | 267 | unifdef-y += netfilter_ipv4.h |
271 | unifdef-y += netfilter_ipv6.h | 268 | unifdef-y += netfilter_ipv6.h |
272 | unifdef-y += netfilter_logging.h | ||
273 | unifdef-y += net.h | 269 | unifdef-y += net.h |
274 | unifdef-y += netlink.h | 270 | unifdef-y += netlink.h |
275 | unifdef-y += nfs3.h | 271 | unifdef-y += nfs3.h |
@@ -318,6 +314,7 @@ unifdef-y += sonet.h | |||
318 | unifdef-y += sonypi.h | 314 | unifdef-y += sonypi.h |
319 | unifdef-y += soundcard.h | 315 | unifdef-y += soundcard.h |
320 | unifdef-y += stat.h | 316 | unifdef-y += stat.h |
317 | unifdef-y += stddef.h | ||
321 | unifdef-y += sysctl.h | 318 | unifdef-y += sysctl.h |
322 | unifdef-y += tcp.h | 319 | unifdef-y += tcp.h |
323 | unifdef-y += time.h | 320 | unifdef-y += time.h |
diff --git a/include/linux/adfs_fs.h b/include/linux/adfs_fs.h index 4a5d50c2bdbf..ef788c2085a1 100644 --- a/include/linux/adfs_fs.h +++ b/include/linux/adfs_fs.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _ADFS_FS_H | 2 | #define _ADFS_FS_H |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/magic.h> | ||
5 | 6 | ||
6 | /* | 7 | /* |
7 | * Disc Record at disc address 0xc00 | 8 | * Disc Record at disc address 0xc00 |
@@ -38,7 +39,6 @@ struct adfs_discrecord { | |||
38 | #define ADFS_DR_OFFSET (0x1c0) | 39 | #define ADFS_DR_OFFSET (0x1c0) |
39 | #define ADFS_DR_SIZE 60 | 40 | #define ADFS_DR_SIZE 60 |
40 | #define ADFS_DR_SIZE_BITS (ADFS_DR_SIZE << 3) | 41 | #define ADFS_DR_SIZE_BITS (ADFS_DR_SIZE << 3) |
41 | #define ADFS_SUPER_MAGIC 0xadf5 | ||
42 | 42 | ||
43 | #ifdef __KERNEL__ | 43 | #ifdef __KERNEL__ |
44 | #include <linux/adfs_fs_i.h> | 44 | #include <linux/adfs_fs_i.h> |
diff --git a/include/linux/affs_fs.h b/include/linux/affs_fs.h deleted file mode 100644 index c57b5ee87d55..000000000000 --- a/include/linux/affs_fs.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #ifndef _AFFS_FS_H | ||
2 | #define _AFFS_FS_H | ||
3 | /* | ||
4 | * The affs filesystem constants/structures | ||
5 | */ | ||
6 | #define AFFS_SUPER_MAGIC 0xadff | ||
7 | #endif | ||
diff --git a/include/linux/ata.h b/include/linux/ata.h index 3671af869696..d89441907024 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -40,6 +40,8 @@ enum { | |||
40 | ATA_MAX_DEVICES = 2, /* per bus/port */ | 40 | ATA_MAX_DEVICES = 2, /* per bus/port */ |
41 | ATA_MAX_PRD = 256, /* we could make these 256/256 */ | 41 | ATA_MAX_PRD = 256, /* we could make these 256/256 */ |
42 | ATA_SECT_SIZE = 512, | 42 | ATA_SECT_SIZE = 512, |
43 | ATA_MAX_SECTORS = 256, | ||
44 | ATA_MAX_SECTORS_LBA48 = 65535,/* TODO: 65536? */ | ||
43 | 45 | ||
44 | ATA_ID_WORDS = 256, | 46 | ATA_ID_WORDS = 256, |
45 | ATA_ID_SERNO_OFS = 10, | 47 | ATA_ID_SERNO_OFS = 10, |
@@ -168,12 +170,16 @@ enum { | |||
168 | XFER_UDMA_2 = 0x42, | 170 | XFER_UDMA_2 = 0x42, |
169 | XFER_UDMA_1 = 0x41, | 171 | XFER_UDMA_1 = 0x41, |
170 | XFER_UDMA_0 = 0x40, | 172 | XFER_UDMA_0 = 0x40, |
173 | XFER_MW_DMA_4 = 0x24, /* CFA only */ | ||
174 | XFER_MW_DMA_3 = 0x23, /* CFA only */ | ||
171 | XFER_MW_DMA_2 = 0x22, | 175 | XFER_MW_DMA_2 = 0x22, |
172 | XFER_MW_DMA_1 = 0x21, | 176 | XFER_MW_DMA_1 = 0x21, |
173 | XFER_MW_DMA_0 = 0x20, | 177 | XFER_MW_DMA_0 = 0x20, |
174 | XFER_SW_DMA_2 = 0x12, | 178 | XFER_SW_DMA_2 = 0x12, |
175 | XFER_SW_DMA_1 = 0x11, | 179 | XFER_SW_DMA_1 = 0x11, |
176 | XFER_SW_DMA_0 = 0x10, | 180 | XFER_SW_DMA_0 = 0x10, |
181 | XFER_PIO_6 = 0x0E, /* CFA only */ | ||
182 | XFER_PIO_5 = 0x0D, /* CFA only */ | ||
177 | XFER_PIO_4 = 0x0C, | 183 | XFER_PIO_4 = 0x0C, |
178 | XFER_PIO_3 = 0x0B, | 184 | XFER_PIO_3 = 0x0B, |
179 | XFER_PIO_2 = 0x0A, | 185 | XFER_PIO_2 = 0x0A, |
@@ -272,7 +278,6 @@ struct ata_taskfile { | |||
272 | }; | 278 | }; |
273 | 279 | ||
274 | #define ata_id_is_ata(id) (((id)[0] & (1 << 15)) == 0) | 280 | #define ata_id_is_ata(id) (((id)[0] & (1 << 15)) == 0) |
275 | #define ata_id_is_cfa(id) ((id)[0] == 0x848A) | ||
276 | #define ata_id_is_sata(id) ((id)[93] == 0) | 281 | #define ata_id_is_sata(id) ((id)[93] == 0) |
277 | #define ata_id_rahead_enabled(id) ((id)[85] & (1 << 6)) | 282 | #define ata_id_rahead_enabled(id) ((id)[85] & (1 << 6)) |
278 | #define ata_id_wcache_enabled(id) ((id)[85] & (1 << 5)) | 283 | #define ata_id_wcache_enabled(id) ((id)[85] & (1 << 5)) |
@@ -304,6 +309,9 @@ static inline unsigned int ata_id_major_version(const u16 *id) | |||
304 | { | 309 | { |
305 | unsigned int mver; | 310 | unsigned int mver; |
306 | 311 | ||
312 | if (id[ATA_ID_MAJOR_VER] == 0xFFFF) | ||
313 | return 0; | ||
314 | |||
307 | for (mver = 14; mver >= 1; mver--) | 315 | for (mver = 14; mver >= 1; mver--) |
308 | if (id[ATA_ID_MAJOR_VER] & (1 << mver)) | 316 | if (id[ATA_ID_MAJOR_VER] & (1 << mver)) |
309 | break; | 317 | break; |
@@ -312,8 +320,8 @@ static inline unsigned int ata_id_major_version(const u16 *id) | |||
312 | 320 | ||
313 | static inline int ata_id_current_chs_valid(const u16 *id) | 321 | static inline int ata_id_current_chs_valid(const u16 *id) |
314 | { | 322 | { |
315 | /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command | 323 | /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command |
316 | has not been issued to the device then the values of | 324 | has not been issued to the device then the values of |
317 | id[54] to id[56] are vendor specific. */ | 325 | id[54] to id[56] are vendor specific. */ |
318 | return (id[53] & 0x01) && /* Current translation valid */ | 326 | return (id[53] & 0x01) && /* Current translation valid */ |
319 | id[54] && /* cylinders in current translation */ | 327 | id[54] && /* cylinders in current translation */ |
@@ -322,6 +330,18 @@ static inline int ata_id_current_chs_valid(const u16 *id) | |||
322 | id[56]; /* sectors in current translation */ | 330 | id[56]; /* sectors in current translation */ |
323 | } | 331 | } |
324 | 332 | ||
333 | static inline int ata_id_is_cfa(const u16 *id) | ||
334 | { | ||
335 | u16 v = id[0]; | ||
336 | if (v == 0x848A) /* Standard CF */ | ||
337 | return 1; | ||
338 | /* Could be CF hiding as standard ATA */ | ||
339 | if (ata_id_major_version(id) >= 3 && id[82] != 0xFFFF && | ||
340 | (id[82] & ( 1 << 2))) | ||
341 | return 1; | ||
342 | return 0; | ||
343 | } | ||
344 | |||
325 | static inline int atapi_cdb_len(const u16 *dev_id) | 345 | static inline int atapi_cdb_len(const u16 *dev_id) |
326 | { | 346 | { |
327 | u16 tmp = dev_id[0] & 0x3; | 347 | u16 tmp = dev_id[0] & 0x3; |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 96c9040c00a8..c773ee545ebd 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -746,6 +746,8 @@ extern void blk_queue_free_tags(request_queue_t *); | |||
746 | extern int blk_queue_resize_tags(request_queue_t *, int); | 746 | extern int blk_queue_resize_tags(request_queue_t *, int); |
747 | extern void blk_queue_invalidate_tags(request_queue_t *); | 747 | extern void blk_queue_invalidate_tags(request_queue_t *); |
748 | extern long blk_congestion_wait(int rw, long timeout); | 748 | extern long blk_congestion_wait(int rw, long timeout); |
749 | extern struct blk_queue_tag *blk_init_tags(int); | ||
750 | extern void blk_free_tags(struct blk_queue_tag *); | ||
749 | extern void blk_congestion_end(int rw); | 751 | extern void blk_congestion_end(int rw); |
750 | 752 | ||
751 | extern void blk_rq_bio_prep(request_queue_t *, struct request *, struct bio *); | 753 | extern void blk_rq_bio_prep(request_queue_t *, struct request *, struct bio *); |
diff --git a/include/linux/coda_psdev.h b/include/linux/coda_psdev.h index 98f6c52c152b..b541bb3d1f4b 100644 --- a/include/linux/coda_psdev.h +++ b/include/linux/coda_psdev.h | |||
@@ -1,11 +1,11 @@ | |||
1 | #ifndef __CODA_PSDEV_H | 1 | #ifndef __CODA_PSDEV_H |
2 | #define __CODA_PSDEV_H | 2 | #define __CODA_PSDEV_H |
3 | 3 | ||
4 | #include <linux/magic.h> | ||
5 | |||
4 | #define CODA_PSDEV_MAJOR 67 | 6 | #define CODA_PSDEV_MAJOR 67 |
5 | #define MAX_CODADEVS 5 /* how many do we allow */ | 7 | #define MAX_CODADEVS 5 /* how many do we allow */ |
6 | 8 | ||
7 | #define CODA_SUPER_MAGIC 0x73757245 | ||
8 | |||
9 | struct kstatfs; | 9 | struct kstatfs; |
10 | 10 | ||
11 | struct coda_sb_info | 11 | struct coda_sb_info |
diff --git a/include/linux/efs_fs_sb.h b/include/linux/efs_fs_sb.h index c76088baef28..ff1945e37790 100644 --- a/include/linux/efs_fs_sb.h +++ b/include/linux/efs_fs_sb.h | |||
@@ -9,8 +9,7 @@ | |||
9 | #ifndef __EFS_FS_SB_H__ | 9 | #ifndef __EFS_FS_SB_H__ |
10 | #define __EFS_FS_SB_H__ | 10 | #define __EFS_FS_SB_H__ |
11 | 11 | ||
12 | /* statfs() magic number for EFS */ | 12 | #include <linux/magic.h> |
13 | #define EFS_SUPER_MAGIC 0x414A53 | ||
14 | 13 | ||
15 | /* EFS superblock magic numbers */ | 14 | /* EFS superblock magic numbers */ |
16 | #define EFS_MAGIC 0x072959 | 15 | #define EFS_MAGIC 0x072959 |
diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h index facf34e98954..33a1aa107329 100644 --- a/include/linux/ext2_fs.h +++ b/include/linux/ext2_fs.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #define _LINUX_EXT2_FS_H | 17 | #define _LINUX_EXT2_FS_H |
18 | 18 | ||
19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
20 | #include <linux/magic.h> | ||
20 | 21 | ||
21 | /* | 22 | /* |
22 | * The second extended filesystem constants/structures | 23 | * The second extended filesystem constants/structures |
@@ -63,11 +64,6 @@ | |||
63 | /* First non-reserved inode for old ext2 filesystems */ | 64 | /* First non-reserved inode for old ext2 filesystems */ |
64 | #define EXT2_GOOD_OLD_FIRST_INO 11 | 65 | #define EXT2_GOOD_OLD_FIRST_INO 11 |
65 | 66 | ||
66 | /* | ||
67 | * The second extended file system magic number | ||
68 | */ | ||
69 | #define EXT2_SUPER_MAGIC 0xEF53 | ||
70 | |||
71 | #ifdef __KERNEL__ | 67 | #ifdef __KERNEL__ |
72 | #include <linux/ext2_fs_sb.h> | 68 | #include <linux/ext2_fs_sb.h> |
73 | static inline struct ext2_sb_info *EXT2_SB(struct super_block *sb) | 69 | static inline struct ext2_sb_info *EXT2_SB(struct super_block *sb) |
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 9f9cce7bd86d..0eed918b3816 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #define _LINUX_EXT3_FS_H | 17 | #define _LINUX_EXT3_FS_H |
18 | 18 | ||
19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
20 | #include <linux/magic.h> | ||
20 | 21 | ||
21 | /* | 22 | /* |
22 | * The second extended filesystem constants/structures | 23 | * The second extended filesystem constants/structures |
@@ -67,11 +68,6 @@ | |||
67 | #define EXT3_GOOD_OLD_FIRST_INO 11 | 68 | #define EXT3_GOOD_OLD_FIRST_INO 11 |
68 | 69 | ||
69 | /* | 70 | /* |
70 | * The second extended file system magic number | ||
71 | */ | ||
72 | #define EXT3_SUPER_MAGIC 0xEF53 | ||
73 | |||
74 | /* | ||
75 | * Maximal count of links to a file | 71 | * Maximal count of links to a file |
76 | */ | 72 | */ |
77 | #define EXT3_LINK_MAX 32000 | 73 | #define EXT3_LINK_MAX 32000 |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 555bc195c420..1d3e601ece73 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -92,9 +92,10 @@ extern int dir_notify_enable; | |||
92 | #define FS_REQUIRES_DEV 1 | 92 | #define FS_REQUIRES_DEV 1 |
93 | #define FS_BINARY_MOUNTDATA 2 | 93 | #define FS_BINARY_MOUNTDATA 2 |
94 | #define FS_REVAL_DOT 16384 /* Check the paths ".", ".." for staleness */ | 94 | #define FS_REVAL_DOT 16384 /* Check the paths ".", ".." for staleness */ |
95 | #define FS_ODD_RENAME 32768 /* Temporary stuff; will go away as soon | 95 | #define FS_RENAME_DOES_D_MOVE 32768 /* FS will handle d_move() |
96 | * as nfs_rename() will be cleaned up | 96 | * during rename() internally. |
97 | */ | 97 | */ |
98 | |||
98 | /* | 99 | /* |
99 | * These are the fs-independent mount-flags: up to 32 flags are supported | 100 | * These are the fs-independent mount-flags: up to 32 flags are supported |
100 | */ | 101 | */ |
diff --git a/include/linux/hpfs_fs.h b/include/linux/hpfs_fs.h deleted file mode 100644 index a5028dd94d31..000000000000 --- a/include/linux/hpfs_fs.h +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | #ifndef _LINUX_HPFS_FS_H | ||
2 | #define _LINUX_HPFS_FS_H | ||
3 | |||
4 | /* HPFS magic number (word 0 of block 16) */ | ||
5 | |||
6 | #define HPFS_SUPER_MAGIC 0xf995e849 | ||
7 | |||
8 | #endif | ||
diff --git a/include/linux/iso_fs.h b/include/linux/iso_fs.h index 47967878bfef..4688ac4284e2 100644 --- a/include/linux/iso_fs.h +++ b/include/linux/iso_fs.h | |||
@@ -2,6 +2,8 @@ | |||
2 | #define _ISOFS_FS_H | 2 | #define _ISOFS_FS_H |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/magic.h> | ||
6 | |||
5 | /* | 7 | /* |
6 | * The isofs filesystem constants/structures | 8 | * The isofs filesystem constants/structures |
7 | */ | 9 | */ |
@@ -160,6 +162,4 @@ struct iso_directory_record { | |||
160 | #define ISOFS_BUFFER_SIZE(INODE) ((INODE)->i_sb->s_blocksize) | 162 | #define ISOFS_BUFFER_SIZE(INODE) ((INODE)->i_sb->s_blocksize) |
161 | #define ISOFS_BUFFER_BITS(INODE) ((INODE)->i_sb->s_blocksize_bits) | 163 | #define ISOFS_BUFFER_BITS(INODE) ((INODE)->i_sb->s_blocksize_bits) |
162 | 164 | ||
163 | #define ISOFS_SUPER_MAGIC 0x9660 | 165 | #endif /* _ISOFS_FS_H */ |
164 | |||
165 | #endif | ||
diff --git a/include/linux/jffs2.h b/include/linux/jffs2.h index c9c760700bc3..840631fa5ff1 100644 --- a/include/linux/jffs2.h +++ b/include/linux/jffs2.h | |||
@@ -15,12 +15,12 @@ | |||
15 | #ifndef __LINUX_JFFS2_H__ | 15 | #ifndef __LINUX_JFFS2_H__ |
16 | #define __LINUX_JFFS2_H__ | 16 | #define __LINUX_JFFS2_H__ |
17 | 17 | ||
18 | #include <linux/magic.h> | ||
19 | |||
18 | /* You must include something which defines the C99 uintXX_t types. | 20 | /* You must include something which defines the C99 uintXX_t types. |
19 | We don't do it from here because this file is used in too many | 21 | We don't do it from here because this file is used in too many |
20 | different environments. */ | 22 | different environments. */ |
21 | 23 | ||
22 | #define JFFS2_SUPER_MAGIC 0x72b6 | ||
23 | |||
24 | /* Values we may expect to find in the 'magic' field */ | 24 | /* Values we may expect to find in the 'magic' field */ |
25 | #define JFFS2_OLD_MAGIC_BITMASK 0x1984 | 25 | #define JFFS2_OLD_MAGIC_BITMASK 0x1984 |
26 | #define JFFS2_MAGIC_BITMASK 0x1985 | 26 | #define JFFS2_MAGIC_BITMASK 0x1985 |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 66c3100c2b94..1ef3d3901b47 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -36,6 +36,8 @@ | |||
36 | #include <linux/workqueue.h> | 36 | #include <linux/workqueue.h> |
37 | #include <scsi/scsi_host.h> | 37 | #include <scsi/scsi_host.h> |
38 | 38 | ||
39 | #include <asm/libata-portmap.h> | ||
40 | |||
39 | /* | 41 | /* |
40 | * compile-time options: to be removed as soon as all the drivers are | 42 | * compile-time options: to be removed as soon as all the drivers are |
41 | * converted to the new debugging mechanism | 43 | * converted to the new debugging mechanism |
@@ -44,7 +46,7 @@ | |||
44 | #undef ATA_VERBOSE_DEBUG /* yet more debugging output */ | 46 | #undef ATA_VERBOSE_DEBUG /* yet more debugging output */ |
45 | #undef ATA_IRQ_TRAP /* define to ack screaming irqs */ | 47 | #undef ATA_IRQ_TRAP /* define to ack screaming irqs */ |
46 | #undef ATA_NDEBUG /* define to disable quick runtime checks */ | 48 | #undef ATA_NDEBUG /* define to disable quick runtime checks */ |
47 | #undef ATA_ENABLE_PATA /* define to enable PATA support in some | 49 | #define ATA_ENABLE_PATA /* define to enable PATA support in some |
48 | * low-level drivers */ | 50 | * low-level drivers */ |
49 | 51 | ||
50 | 52 | ||
@@ -112,8 +114,6 @@ enum { | |||
112 | /* tag ATA_MAX_QUEUE - 1 is reserved for internal commands */ | 114 | /* tag ATA_MAX_QUEUE - 1 is reserved for internal commands */ |
113 | ATA_MAX_QUEUE = 32, | 115 | ATA_MAX_QUEUE = 32, |
114 | ATA_TAG_INTERNAL = ATA_MAX_QUEUE - 1, | 116 | ATA_TAG_INTERNAL = ATA_MAX_QUEUE - 1, |
115 | ATA_MAX_SECTORS = 200, /* FIXME */ | ||
116 | ATA_MAX_SECTORS_LBA48 = 65535, | ||
117 | ATA_MAX_BUS = 2, | 117 | ATA_MAX_BUS = 2, |
118 | ATA_DEF_BUSY_WAIT = 10000, | 118 | ATA_DEF_BUSY_WAIT = 10000, |
119 | ATA_SHORT_PAUSE = (HZ >> 6) + 1, | 119 | ATA_SHORT_PAUSE = (HZ >> 6) + 1, |
@@ -197,8 +197,8 @@ 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 */ |
204 | ATA_TMOUT_BOOT_QUICK = 7 * HZ, /* heuristic */ | 204 | ATA_TMOUT_BOOT_QUICK = 7 * HZ, /* heuristic */ |
@@ -225,8 +225,8 @@ enum { | |||
225 | /* encoding various smaller bitmaps into a single | 225 | /* encoding various smaller bitmaps into a single |
226 | * unsigned int bitmap | 226 | * unsigned int bitmap |
227 | */ | 227 | */ |
228 | ATA_BITS_PIO = 5, | 228 | ATA_BITS_PIO = 7, |
229 | ATA_BITS_MWDMA = 3, | 229 | ATA_BITS_MWDMA = 5, |
230 | ATA_BITS_UDMA = 8, | 230 | ATA_BITS_UDMA = 8, |
231 | 231 | ||
232 | ATA_SHIFT_PIO = 0, | 232 | ATA_SHIFT_PIO = 0, |
@@ -289,6 +289,11 @@ enum { | |||
289 | * most devices. | 289 | * most devices. |
290 | */ | 290 | */ |
291 | ATA_SPINUP_WAIT = 8000, | 291 | ATA_SPINUP_WAIT = 8000, |
292 | |||
293 | /* Horkage types. May be set by libata or controller on drives | ||
294 | (some horkage may be drive/controller pair dependant */ | ||
295 | |||
296 | ATA_HORKAGE_DIAGNOSTIC = (1 << 0), /* Failed boot diag */ | ||
292 | }; | 297 | }; |
293 | 298 | ||
294 | enum hsm_task_states { | 299 | enum hsm_task_states { |
@@ -350,23 +355,32 @@ struct ata_probe_ent { | |||
350 | struct scsi_host_template *sht; | 355 | struct scsi_host_template *sht; |
351 | struct ata_ioports port[ATA_MAX_PORTS]; | 356 | struct ata_ioports port[ATA_MAX_PORTS]; |
352 | unsigned int n_ports; | 357 | unsigned int n_ports; |
353 | unsigned int hard_port_no; | 358 | unsigned int dummy_port_mask; |
354 | unsigned int pio_mask; | 359 | unsigned int pio_mask; |
355 | unsigned int mwdma_mask; | 360 | unsigned int mwdma_mask; |
356 | unsigned int udma_mask; | 361 | unsigned int udma_mask; |
357 | unsigned int legacy_mode; | ||
358 | unsigned long irq; | 362 | unsigned long irq; |
363 | unsigned long irq2; | ||
359 | unsigned int irq_flags; | 364 | unsigned int irq_flags; |
360 | unsigned long host_flags; | 365 | unsigned long port_flags; |
361 | unsigned long host_set_flags; | 366 | unsigned long _host_flags; |
362 | void __iomem *mmio_base; | 367 | void __iomem *mmio_base; |
363 | void *private_data; | 368 | void *private_data; |
369 | |||
370 | /* port_info for the secondary port. Together with irq2, it's | ||
371 | * used to implement non-uniform secondary port. Currently, | ||
372 | * the only user is ata_piix combined mode. This workaround | ||
373 | * will be removed together with ata_probe_ent when init model | ||
374 | * is updated. | ||
375 | */ | ||
376 | const struct ata_port_info *pinfo2; | ||
364 | }; | 377 | }; |
365 | 378 | ||
366 | struct ata_host_set { | 379 | struct ata_host { |
367 | spinlock_t lock; | 380 | spinlock_t lock; |
368 | struct device *dev; | 381 | struct device *dev; |
369 | unsigned long irq; | 382 | unsigned long irq; |
383 | unsigned long irq2; | ||
370 | void __iomem *mmio_base; | 384 | void __iomem *mmio_base; |
371 | unsigned int n_ports; | 385 | unsigned int n_ports; |
372 | void *private_data; | 386 | void *private_data; |
@@ -374,7 +388,6 @@ struct ata_host_set { | |||
374 | unsigned long flags; | 388 | unsigned long flags; |
375 | int simplex_claimed; /* Keep seperate in case we | 389 | int simplex_claimed; /* Keep seperate in case we |
376 | ever need to do this locked */ | 390 | ever need to do this locked */ |
377 | struct ata_host_set *next; /* for legacy mode */ | ||
378 | struct ata_port *ports[0]; | 391 | struct ata_port *ports[0]; |
379 | }; | 392 | }; |
380 | 393 | ||
@@ -420,7 +433,7 @@ struct ata_queued_cmd { | |||
420 | void *private_data; | 433 | void *private_data; |
421 | }; | 434 | }; |
422 | 435 | ||
423 | struct ata_host_stats { | 436 | struct ata_port_stats { |
424 | unsigned long unhandled_irq; | 437 | unsigned long unhandled_irq; |
425 | unsigned long idle_irq; | 438 | unsigned long idle_irq; |
426 | unsigned long rw_reqbuf; | 439 | unsigned long rw_reqbuf; |
@@ -468,6 +481,7 @@ struct ata_device { | |||
468 | 481 | ||
469 | /* error history */ | 482 | /* error history */ |
470 | struct ata_ering ering; | 483 | struct ata_ering ering; |
484 | unsigned int horkage; /* List of broken features */ | ||
471 | }; | 485 | }; |
472 | 486 | ||
473 | /* Offset into struct ata_device. Fields above it are maintained | 487 | /* Offset into struct ata_device. Fields above it are maintained |
@@ -498,14 +512,13 @@ struct ata_eh_context { | |||
498 | }; | 512 | }; |
499 | 513 | ||
500 | struct ata_port { | 514 | struct ata_port { |
501 | struct Scsi_Host *host; /* our co-allocated scsi host */ | 515 | struct Scsi_Host *scsi_host; /* our co-allocated scsi host */ |
502 | const struct ata_port_operations *ops; | 516 | const struct ata_port_operations *ops; |
503 | spinlock_t *lock; | 517 | spinlock_t *lock; |
504 | unsigned long flags; /* ATA_FLAG_xxx */ | 518 | unsigned long flags; /* ATA_FLAG_xxx */ |
505 | unsigned int pflags; /* ATA_PFLAG_xxx */ | 519 | unsigned int pflags; /* ATA_PFLAG_xxx */ |
506 | unsigned int id; /* unique id req'd by scsi midlyr */ | 520 | unsigned int id; /* unique id req'd by scsi midlyr */ |
507 | unsigned int port_no; /* unique port #; from zero */ | 521 | unsigned int port_no; /* unique port #; from zero */ |
508 | unsigned int hard_port_no; /* hardware port #; from zero */ | ||
509 | 522 | ||
510 | struct ata_prd *prd; /* our SG list */ | 523 | struct ata_prd *prd; /* our SG list */ |
511 | dma_addr_t prd_dma; /* and its DMA mapping */ | 524 | dma_addr_t prd_dma; /* and its DMA mapping */ |
@@ -524,7 +537,7 @@ struct ata_port { | |||
524 | unsigned int hw_sata_spd_limit; | 537 | unsigned int hw_sata_spd_limit; |
525 | unsigned int sata_spd_limit; /* SATA PHY speed limit */ | 538 | unsigned int sata_spd_limit; /* SATA PHY speed limit */ |
526 | 539 | ||
527 | /* record runtime error info, protected by host_set lock */ | 540 | /* record runtime error info, protected by host lock */ |
528 | struct ata_eh_info eh_info; | 541 | struct ata_eh_info eh_info; |
529 | /* EH context owned by EH */ | 542 | /* EH context owned by EH */ |
530 | struct ata_eh_context eh_context; | 543 | struct ata_eh_context eh_context; |
@@ -538,8 +551,8 @@ struct ata_port { | |||
538 | unsigned int active_tag; | 551 | unsigned int active_tag; |
539 | u32 sactive; | 552 | u32 sactive; |
540 | 553 | ||
541 | struct ata_host_stats stats; | 554 | struct ata_port_stats stats; |
542 | struct ata_host_set *host_set; | 555 | struct ata_host *host; |
543 | struct device *dev; | 556 | struct device *dev; |
544 | 557 | ||
545 | struct work_struct port_task; | 558 | struct work_struct port_task; |
@@ -615,7 +628,7 @@ struct ata_port_operations { | |||
615 | int (*port_start) (struct ata_port *ap); | 628 | int (*port_start) (struct ata_port *ap); |
616 | void (*port_stop) (struct ata_port *ap); | 629 | void (*port_stop) (struct ata_port *ap); |
617 | 630 | ||
618 | void (*host_stop) (struct ata_host_set *host_set); | 631 | void (*host_stop) (struct ata_host *host); |
619 | 632 | ||
620 | void (*bmdma_stop) (struct ata_queued_cmd *qc); | 633 | void (*bmdma_stop) (struct ata_queued_cmd *qc); |
621 | u8 (*bmdma_status) (struct ata_port *ap); | 634 | u8 (*bmdma_status) (struct ata_port *ap); |
@@ -623,7 +636,7 @@ struct ata_port_operations { | |||
623 | 636 | ||
624 | struct ata_port_info { | 637 | struct ata_port_info { |
625 | struct scsi_host_template *sht; | 638 | struct scsi_host_template *sht; |
626 | unsigned long host_flags; | 639 | unsigned long flags; |
627 | unsigned long pio_mask; | 640 | unsigned long pio_mask; |
628 | unsigned long mwdma_mask; | 641 | unsigned long mwdma_mask; |
629 | unsigned long udma_mask; | 642 | unsigned long udma_mask; |
@@ -649,6 +662,8 @@ extern const unsigned long sata_deb_timing_normal[]; | |||
649 | extern const unsigned long sata_deb_timing_hotplug[]; | 662 | extern const unsigned long sata_deb_timing_hotplug[]; |
650 | extern const unsigned long sata_deb_timing_long[]; | 663 | extern const unsigned long sata_deb_timing_long[]; |
651 | 664 | ||
665 | extern const struct ata_port_operations ata_dummy_port_ops; | ||
666 | |||
652 | static inline const unsigned long * | 667 | static inline const unsigned long * |
653 | sata_ehc_deb_timing(struct ata_eh_context *ehc) | 668 | sata_ehc_deb_timing(struct ata_eh_context *ehc) |
654 | { | 669 | { |
@@ -658,6 +673,11 @@ sata_ehc_deb_timing(struct ata_eh_context *ehc) | |||
658 | return sata_deb_timing_normal; | 673 | return sata_deb_timing_normal; |
659 | } | 674 | } |
660 | 675 | ||
676 | static inline int ata_port_is_dummy(struct ata_port *ap) | ||
677 | { | ||
678 | return ap->ops == &ata_dummy_port_ops; | ||
679 | } | ||
680 | |||
661 | extern void ata_port_probe(struct ata_port *); | 681 | extern void ata_port_probe(struct ata_port *); |
662 | extern void __sata_phy_reset(struct ata_port *ap); | 682 | extern void __sata_phy_reset(struct ata_port *ap); |
663 | extern void sata_phy_reset(struct ata_port *ap); | 683 | extern void sata_phy_reset(struct ata_port *ap); |
@@ -676,19 +696,30 @@ extern void ata_std_ports(struct ata_ioports *ioaddr); | |||
676 | extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info, | 696 | extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info, |
677 | unsigned int n_ports); | 697 | unsigned int n_ports); |
678 | extern void ata_pci_remove_one (struct pci_dev *pdev); | 698 | extern void ata_pci_remove_one (struct pci_dev *pdev); |
679 | extern void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t state); | 699 | extern void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t mesg); |
680 | extern void ata_pci_device_do_resume(struct pci_dev *pdev); | 700 | extern void ata_pci_device_do_resume(struct pci_dev *pdev); |
681 | extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t state); | 701 | extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg); |
682 | extern int ata_pci_device_resume(struct pci_dev *pdev); | 702 | extern int ata_pci_device_resume(struct pci_dev *pdev); |
683 | extern int ata_pci_clear_simplex(struct pci_dev *pdev); | 703 | extern int ata_pci_clear_simplex(struct pci_dev *pdev); |
684 | #endif /* CONFIG_PCI */ | 704 | #endif /* CONFIG_PCI */ |
685 | extern int ata_device_add(const struct ata_probe_ent *ent); | 705 | extern int ata_device_add(const struct ata_probe_ent *ent); |
686 | extern void ata_port_detach(struct ata_port *ap); | 706 | extern void ata_port_detach(struct ata_port *ap); |
687 | extern void ata_host_set_remove(struct ata_host_set *host_set); | 707 | extern void ata_host_init(struct ata_host *, struct device *, |
708 | unsigned long, const struct ata_port_operations *); | ||
709 | extern void ata_host_remove(struct ata_host *host); | ||
688 | extern int ata_scsi_detect(struct scsi_host_template *sht); | 710 | extern int ata_scsi_detect(struct scsi_host_template *sht); |
689 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); | 711 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); |
690 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); | 712 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); |
691 | extern int ata_scsi_release(struct Scsi_Host *host); | 713 | extern int ata_scsi_release(struct Scsi_Host *host); |
714 | extern void ata_sas_port_destroy(struct ata_port *); | ||
715 | extern struct ata_port *ata_sas_port_alloc(struct ata_host *, | ||
716 | struct ata_port_info *, struct Scsi_Host *); | ||
717 | extern int ata_sas_port_init(struct ata_port *); | ||
718 | extern int ata_sas_port_start(struct ata_port *ap); | ||
719 | extern void ata_sas_port_stop(struct ata_port *ap); | ||
720 | extern int ata_sas_slave_configure(struct scsi_device *, struct ata_port *); | ||
721 | extern int ata_sas_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *), | ||
722 | struct ata_port *ap); | ||
692 | extern unsigned int ata_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc); | 723 | extern unsigned int ata_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc); |
693 | extern int sata_scr_valid(struct ata_port *ap); | 724 | extern int sata_scr_valid(struct ata_port *ap); |
694 | extern int sata_scr_read(struct ata_port *ap, int reg, u32 *val); | 725 | extern int sata_scr_read(struct ata_port *ap, int reg, u32 *val); |
@@ -697,10 +728,9 @@ extern int sata_scr_write_flush(struct ata_port *ap, int reg, u32 val); | |||
697 | extern int ata_port_online(struct ata_port *ap); | 728 | extern int ata_port_online(struct ata_port *ap); |
698 | extern int ata_port_offline(struct ata_port *ap); | 729 | extern int ata_port_offline(struct ata_port *ap); |
699 | extern int ata_scsi_device_resume(struct scsi_device *); | 730 | extern int ata_scsi_device_resume(struct scsi_device *); |
700 | extern int ata_scsi_device_suspend(struct scsi_device *, pm_message_t state); | 731 | extern int ata_scsi_device_suspend(struct scsi_device *, pm_message_t mesg); |
701 | extern int ata_host_set_suspend(struct ata_host_set *host_set, | 732 | extern int ata_host_suspend(struct ata_host *host, pm_message_t mesg); |
702 | pm_message_t mesg); | 733 | extern void ata_host_resume(struct ata_host *host); |
703 | extern void ata_host_set_resume(struct ata_host_set *host_set); | ||
704 | extern int ata_ratelimit(void); | 734 | extern int ata_ratelimit(void); |
705 | extern unsigned int ata_busy_sleep(struct ata_port *ap, | 735 | extern unsigned int ata_busy_sleep(struct ata_port *ap, |
706 | unsigned long timeout_pat, | 736 | unsigned long timeout_pat, |
@@ -725,7 +755,7 @@ extern u8 ata_altstatus(struct ata_port *ap); | |||
725 | extern void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf); | 755 | extern void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf); |
726 | extern int ata_port_start (struct ata_port *ap); | 756 | extern int ata_port_start (struct ata_port *ap); |
727 | extern void ata_port_stop (struct ata_port *ap); | 757 | extern void ata_port_stop (struct ata_port *ap); |
728 | extern void ata_host_stop (struct ata_host_set *host_set); | 758 | extern void ata_host_stop (struct ata_host *host); |
729 | extern irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs); | 759 | extern irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs); |
730 | extern void ata_mmio_data_xfer(struct ata_device *adev, unsigned char *buf, | 760 | extern void ata_mmio_data_xfer(struct ata_device *adev, unsigned char *buf, |
731 | unsigned int buflen, int write_data); | 761 | unsigned int buflen, int write_data); |
@@ -811,7 +841,7 @@ struct pci_bits { | |||
811 | unsigned long val; | 841 | unsigned long val; |
812 | }; | 842 | }; |
813 | 843 | ||
814 | extern void ata_pci_host_stop (struct ata_host_set *host_set); | 844 | extern void ata_pci_host_stop (struct ata_host *host); |
815 | extern struct ata_probe_ent * | 845 | extern struct ata_probe_ent * |
816 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask); | 846 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask); |
817 | extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); | 847 | extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); |
diff --git a/include/linux/magic.h b/include/linux/magic.h new file mode 100644 index 000000000000..22036dd2ba36 --- /dev/null +++ b/include/linux/magic.h | |||
@@ -0,0 +1,37 @@ | |||
1 | #ifndef __LINUX_MAGIC_H__ | ||
2 | #define __LINUX_MAGIC_H__ | ||
3 | |||
4 | #define ADFS_SUPER_MAGIC 0xadf5 | ||
5 | #define AFFS_SUPER_MAGIC 0xadff | ||
6 | #define AUTOFS_SUPER_MAGIC 0x0187 | ||
7 | #define CODA_SUPER_MAGIC 0x73757245 | ||
8 | #define EFS_SUPER_MAGIC 0x414A53 | ||
9 | #define EXT2_SUPER_MAGIC 0xEF53 | ||
10 | #define EXT3_SUPER_MAGIC 0xEF53 | ||
11 | #define HPFS_SUPER_MAGIC 0xf995e849 | ||
12 | #define ISOFS_SUPER_MAGIC 0x9660 | ||
13 | #define JFFS2_SUPER_MAGIC 0x72b6 | ||
14 | |||
15 | #define MINIX_SUPER_MAGIC 0x137F /* original minix fs */ | ||
16 | #define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */ | ||
17 | #define MINIX2_SUPER_MAGIC 0x2468 /* minix V2 fs */ | ||
18 | #define MINIX2_SUPER_MAGIC2 0x2478 /* minix V2 fs, 30 char names */ | ||
19 | |||
20 | #define MSDOS_SUPER_MAGIC 0x4d44 /* MD */ | ||
21 | #define NCP_SUPER_MAGIC 0x564c /* Guess, what 0x564c is :-) */ | ||
22 | #define NFS_SUPER_MAGIC 0x6969 | ||
23 | #define OPENPROM_SUPER_MAGIC 0x9fa1 | ||
24 | #define PROC_SUPER_MAGIC 0x9fa0 | ||
25 | #define QNX4_SUPER_MAGIC 0x002f /* qnx4 fs detection */ | ||
26 | |||
27 | #define REISERFS_SUPER_MAGIC 0x52654973 /* used by gcc */ | ||
28 | /* used by file system utilities that | ||
29 | look at the superblock, etc. */ | ||
30 | #define REISERFS_SUPER_MAGIC_STRING "ReIsErFs" | ||
31 | #define REISER2FS_SUPER_MAGIC_STRING "ReIsEr2Fs" | ||
32 | #define REISER2FS_JR_SUPER_MAGIC_STRING "ReIsEr3Fs" | ||
33 | |||
34 | #define SMB_SUPER_MAGIC 0x517B | ||
35 | #define USBDEVICE_SUPER_MAGIC 0x9fa2 | ||
36 | |||
37 | #endif /* __LINUX_MAGIC_H__ */ | ||
diff --git a/include/linux/minix_fs.h b/include/linux/minix_fs.h index 1ecc3cc8cef5..916e8f72c63d 100644 --- a/include/linux/minix_fs.h +++ b/include/linux/minix_fs.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _LINUX_MINIX_FS_H | 1 | #ifndef _LINUX_MINIX_FS_H |
2 | #define _LINUX_MINIX_FS_H | 2 | #define _LINUX_MINIX_FS_H |
3 | 3 | ||
4 | #include <linux/magic.h> | ||
5 | |||
4 | /* | 6 | /* |
5 | * The minix filesystem constants/structures | 7 | * The minix filesystem constants/structures |
6 | */ | 8 | */ |
@@ -19,10 +21,6 @@ | |||
19 | 21 | ||
20 | #define MINIX_I_MAP_SLOTS 8 | 22 | #define MINIX_I_MAP_SLOTS 8 |
21 | #define MINIX_Z_MAP_SLOTS 64 | 23 | #define MINIX_Z_MAP_SLOTS 64 |
22 | #define MINIX_SUPER_MAGIC 0x137F /* original minix fs */ | ||
23 | #define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */ | ||
24 | #define MINIX2_SUPER_MAGIC 0x2468 /* minix V2 fs */ | ||
25 | #define MINIX2_SUPER_MAGIC2 0x2478 /* minix V2 fs, 30 char names */ | ||
26 | #define MINIX_VALID_FS 0x0001 /* Clean fs. */ | 24 | #define MINIX_VALID_FS 0x0001 /* Clean fs. */ |
27 | #define MINIX_ERROR_FS 0x0002 /* fs has errors. */ | 25 | #define MINIX_ERROR_FS 0x0002 /* fs has errors. */ |
28 | 26 | ||
diff --git a/include/linux/module.h b/include/linux/module.h index 0dfb794c52d3..d4486cc2e7fe 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -156,6 +156,11 @@ extern struct module __this_module; | |||
156 | */ | 156 | */ |
157 | #define MODULE_VERSION(_version) MODULE_INFO(version, _version) | 157 | #define MODULE_VERSION(_version) MODULE_INFO(version, _version) |
158 | 158 | ||
159 | /* Optional firmware file (or files) needed by the module | ||
160 | * format is simply firmware file name. Multiple firmware | ||
161 | * files require multiple MODULE_FIRMWARE() specifiers */ | ||
162 | #define MODULE_FIRMWARE(_firmware) MODULE_INFO(firmware, _firmware) | ||
163 | |||
159 | /* Given an address, look for it in the exception tables */ | 164 | /* Given an address, look for it in the exception tables */ |
160 | const struct exception_table_entry *search_exception_tables(unsigned long add); | 165 | const struct exception_table_entry *search_exception_tables(unsigned long add); |
161 | 166 | ||
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index d9035c73e5d1..bae62d62dc3e 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _LINUX_MSDOS_FS_H | 1 | #ifndef _LINUX_MSDOS_FS_H |
2 | #define _LINUX_MSDOS_FS_H | 2 | #define _LINUX_MSDOS_FS_H |
3 | 3 | ||
4 | #include <linux/magic.h> | ||
5 | |||
4 | /* | 6 | /* |
5 | * The MS-DOS filesystem constants/structures | 7 | * The MS-DOS filesystem constants/structures |
6 | */ | 8 | */ |
@@ -18,8 +20,6 @@ | |||
18 | #define CT_LE_L(v) cpu_to_le32(v) | 20 | #define CT_LE_L(v) cpu_to_le32(v) |
19 | 21 | ||
20 | 22 | ||
21 | #define MSDOS_SUPER_MAGIC 0x4d44 /* MD */ | ||
22 | |||
23 | #define MSDOS_ROOT_INO 1 /* == MINIX_ROOT_INO */ | 23 | #define MSDOS_ROOT_INO 1 /* == MINIX_ROOT_INO */ |
24 | #define MSDOS_DIR_BITS 5 /* log2(sizeof(struct msdos_dir_entry)) */ | 24 | #define MSDOS_DIR_BITS 5 /* log2(sizeof(struct msdos_dir_entry)) */ |
25 | 25 | ||
diff --git a/include/linux/ncp_fs.h b/include/linux/ncp_fs.h index b208f0cd556b..02e352be717e 100644 --- a/include/linux/ncp_fs.h +++ b/include/linux/ncp_fs.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/fs.h> | 11 | #include <linux/fs.h> |
12 | #include <linux/in.h> | 12 | #include <linux/in.h> |
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | #include <linux/magic.h> | ||
14 | 15 | ||
15 | #include <linux/ipx.h> | 16 | #include <linux/ipx.h> |
16 | #include <linux/ncp_no.h> | 17 | #include <linux/ncp_no.h> |
@@ -185,10 +186,6 @@ struct ncp_entry_info { | |||
185 | __u8 file_handle[6]; | 186 | __u8 file_handle[6]; |
186 | }; | 187 | }; |
187 | 188 | ||
188 | /* Guess, what 0x564c is :-) */ | ||
189 | #define NCP_SUPER_MAGIC 0x564c | ||
190 | |||
191 | |||
192 | static inline struct ncp_server *NCP_SBP(struct super_block *sb) | 189 | static inline struct ncp_server *NCP_SBP(struct super_block *sb) |
193 | { | 190 | { |
194 | return sb->s_fs_info; | 191 | return sb->s_fs_info; |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 4f2c2b6beb5e..43289127b458 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -342,7 +342,7 @@ struct net_device | |||
342 | /* Instance data managed by the core of Wireless Extensions. */ | 342 | /* Instance data managed by the core of Wireless Extensions. */ |
343 | struct iw_public_data * wireless_data; | 343 | struct iw_public_data * wireless_data; |
344 | 344 | ||
345 | struct ethtool_ops *ethtool_ops; | 345 | const struct ethtool_ops *ethtool_ops; |
346 | 346 | ||
347 | /* | 347 | /* |
348 | * This marks the end of the "visible" part of the structure. All | 348 | * This marks the end of the "visible" part of the structure. All |
diff --git a/include/linux/netfilter/Kbuild b/include/linux/netfilter/Kbuild index 9a285cecf249..312bd2ffee33 100644 --- a/include/linux/netfilter/Kbuild +++ b/include/linux/netfilter/Kbuild | |||
@@ -10,6 +10,8 @@ header-y += xt_connmark.h | |||
10 | header-y += xt_CONNMARK.h | 10 | header-y += xt_CONNMARK.h |
11 | header-y += xt_conntrack.h | 11 | header-y += xt_conntrack.h |
12 | header-y += xt_dccp.h | 12 | header-y += xt_dccp.h |
13 | header-y += xt_dscp.h | ||
14 | header-y += xt_DSCP.h | ||
13 | header-y += xt_esp.h | 15 | header-y += xt_esp.h |
14 | header-y += xt_helper.h | 16 | header-y += xt_helper.h |
15 | header-y += xt_length.h | 17 | header-y += xt_length.h |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 739a98eebe2c..04319a76103a 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -390,13 +390,13 @@ extern int xt_compat_match_offset(struct xt_match *match); | |||
390 | extern void xt_compat_match_from_user(struct xt_entry_match *m, | 390 | extern void xt_compat_match_from_user(struct xt_entry_match *m, |
391 | void **dstptr, int *size); | 391 | void **dstptr, int *size); |
392 | extern int xt_compat_match_to_user(struct xt_entry_match *m, | 392 | extern int xt_compat_match_to_user(struct xt_entry_match *m, |
393 | void * __user *dstptr, int *size); | 393 | void __user **dstptr, int *size); |
394 | 394 | ||
395 | extern int xt_compat_target_offset(struct xt_target *target); | 395 | extern int xt_compat_target_offset(struct xt_target *target); |
396 | extern void xt_compat_target_from_user(struct xt_entry_target *t, | 396 | extern void xt_compat_target_from_user(struct xt_entry_target *t, |
397 | void **dstptr, int *size); | 397 | void **dstptr, int *size); |
398 | extern int xt_compat_target_to_user(struct xt_entry_target *t, | 398 | extern int xt_compat_target_to_user(struct xt_entry_target *t, |
399 | void * __user *dstptr, int *size); | 399 | void __user **dstptr, int *size); |
400 | 400 | ||
401 | #endif /* CONFIG_COMPAT */ | 401 | #endif /* CONFIG_COMPAT */ |
402 | #endif /* __KERNEL__ */ | 402 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 855b44668caa..66411622e06e 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -21,6 +21,8 @@ | |||
21 | #define NETLINK_DNRTMSG 14 /* DECnet routing messages */ | 21 | #define NETLINK_DNRTMSG 14 /* DECnet routing messages */ |
22 | #define NETLINK_KOBJECT_UEVENT 15 /* Kernel messages to userspace */ | 22 | #define NETLINK_KOBJECT_UEVENT 15 /* Kernel messages to userspace */ |
23 | #define NETLINK_GENERIC 16 | 23 | #define NETLINK_GENERIC 16 |
24 | /* leave room for NETLINK_DM (DM Events) */ | ||
25 | #define NETLINK_SCSITRANSPORT 18 /* SCSI Transports */ | ||
24 | 26 | ||
25 | #define MAX_LINKS 32 | 27 | #define MAX_LINKS 32 |
26 | 28 | ||
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 3b5b04193fee..36f5bcf513b0 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -9,6 +9,8 @@ | |||
9 | #ifndef _LINUX_NFS_FS_H | 9 | #ifndef _LINUX_NFS_FS_H |
10 | #define _LINUX_NFS_FS_H | 10 | #define _LINUX_NFS_FS_H |
11 | 11 | ||
12 | #include <linux/magic.h> | ||
13 | |||
12 | /* | 14 | /* |
13 | * Enable debugging support for nfs client. | 15 | * Enable debugging support for nfs client. |
14 | * Requires RPC_DEBUG. | 16 | * Requires RPC_DEBUG. |
@@ -22,11 +24,6 @@ | |||
22 | #define NFS_MAX_TCP_TIMEOUT (600*HZ) | 24 | #define NFS_MAX_TCP_TIMEOUT (600*HZ) |
23 | 25 | ||
24 | /* | 26 | /* |
25 | * superblock magic number for NFS | ||
26 | */ | ||
27 | #define NFS_SUPER_MAGIC 0x6969 | ||
28 | |||
29 | /* | ||
30 | * When flushing a cluster of dirty pages, there can be different | 27 | * When flushing a cluster of dirty pages, there can be different |
31 | * strategies: | 28 | * strategies: |
32 | */ | 29 | */ |
diff --git a/include/linux/openprom_fs.h b/include/linux/openprom_fs.h deleted file mode 100644 index a837aab8217e..000000000000 --- a/include/linux/openprom_fs.h +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | #ifndef _LINUX_OPENPROM_FS_H | ||
2 | #define _LINUX_OPENPROM_FS_H | ||
3 | |||
4 | /* | ||
5 | * The openprom filesystem constants/structures | ||
6 | */ | ||
7 | |||
8 | #define OPENPROM_SUPER_MAGIC 0x9fa1 | ||
9 | |||
10 | #endif /* _LINUX_OPENPROM_FS_H */ | ||
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 7a249155ee4e..6a1e09834559 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -2010,6 +2010,23 @@ | |||
2010 | #define PCI_DEVICE_ID_ALTIMA_AC9100 0x03ea | 2010 | #define PCI_DEVICE_ID_ALTIMA_AC9100 0x03ea |
2011 | #define PCI_DEVICE_ID_ALTIMA_AC1003 0x03eb | 2011 | #define PCI_DEVICE_ID_ALTIMA_AC1003 0x03eb |
2012 | 2012 | ||
2013 | #define PCI_VENDOR_ID_ARECA 0x17d3 | ||
2014 | #define PCI_DEVICE_ID_ARECA_1110 0x1110 | ||
2015 | #define PCI_DEVICE_ID_ARECA_1120 0x1120 | ||
2016 | #define PCI_DEVICE_ID_ARECA_1130 0x1130 | ||
2017 | #define PCI_DEVICE_ID_ARECA_1160 0x1160 | ||
2018 | #define PCI_DEVICE_ID_ARECA_1170 0x1170 | ||
2019 | #define PCI_DEVICE_ID_ARECA_1210 0x1210 | ||
2020 | #define PCI_DEVICE_ID_ARECA_1220 0x1220 | ||
2021 | #define PCI_DEVICE_ID_ARECA_1230 0x1230 | ||
2022 | #define PCI_DEVICE_ID_ARECA_1260 0x1260 | ||
2023 | #define PCI_DEVICE_ID_ARECA_1270 0x1270 | ||
2024 | #define PCI_DEVICE_ID_ARECA_1280 0x1280 | ||
2025 | #define PCI_DEVICE_ID_ARECA_1380 0x1380 | ||
2026 | #define PCI_DEVICE_ID_ARECA_1381 0x1381 | ||
2027 | #define PCI_DEVICE_ID_ARECA_1680 0x1680 | ||
2028 | #define PCI_DEVICE_ID_ARECA_1681 0x1681 | ||
2029 | |||
2013 | #define PCI_VENDOR_ID_S2IO 0x17d5 | 2030 | #define PCI_VENDOR_ID_S2IO 0x17d5 |
2014 | #define PCI_DEVICE_ID_S2IO_WIN 0x5731 | 2031 | #define PCI_DEVICE_ID_S2IO_WIN 0x5731 |
2015 | #define PCI_DEVICE_ID_S2IO_UNI 0x5831 | 2032 | #define PCI_DEVICE_ID_S2IO_UNI 0x5831 |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 17e75783e3a5..3435ca38dd14 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/slab.h> | 4 | #include <linux/slab.h> |
5 | #include <linux/fs.h> | 5 | #include <linux/fs.h> |
6 | #include <linux/spinlock.h> | 6 | #include <linux/spinlock.h> |
7 | #include <linux/magic.h> | ||
7 | #include <asm/atomic.h> | 8 | #include <asm/atomic.h> |
8 | 9 | ||
9 | /* | 10 | /* |
@@ -24,8 +25,6 @@ enum { | |||
24 | PROC_ROOT_INO = 1, | 25 | PROC_ROOT_INO = 1, |
25 | }; | 26 | }; |
26 | 27 | ||
27 | #define PROC_SUPER_MAGIC 0x9fa0 | ||
28 | |||
29 | /* | 28 | /* |
30 | * This is not completely implemented yet. The idea is to | 29 | * This is not completely implemented yet. The idea is to |
31 | * create an in-memory tree (like the actual /proc filesystem | 30 | * create an in-memory tree (like the actual /proc filesystem |
diff --git a/include/linux/qnx4_fs.h b/include/linux/qnx4_fs.h index 27f49c85d5d6..0c7ac444fd35 100644 --- a/include/linux/qnx4_fs.h +++ b/include/linux/qnx4_fs.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #define _LINUX_QNX4_FS_H | 11 | #define _LINUX_QNX4_FS_H |
12 | 12 | ||
13 | #include <linux/qnxtypes.h> | 13 | #include <linux/qnxtypes.h> |
14 | #include <linux/magic.h> | ||
14 | 15 | ||
15 | #define QNX4_ROOT_INO 1 | 16 | #define QNX4_ROOT_INO 1 |
16 | 17 | ||
@@ -25,7 +26,6 @@ | |||
25 | 26 | ||
26 | #define QNX4_I_MAP_SLOTS 8 | 27 | #define QNX4_I_MAP_SLOTS 8 |
27 | #define QNX4_Z_MAP_SLOTS 64 | 28 | #define QNX4_Z_MAP_SLOTS 64 |
28 | #define QNX4_SUPER_MAGIC 0x002f /* qnx4 fs detection */ | ||
29 | #define QNX4_VALID_FS 0x0001 /* Clean fs. */ | 29 | #define QNX4_VALID_FS 0x0001 /* Clean fs. */ |
30 | #define QNX4_ERROR_FS 0x0002 /* fs has errors. */ | 30 | #define QNX4_ERROR_FS 0x0002 /* fs has errors. */ |
31 | #define QNX4_BLOCK_SIZE 0x200 /* blocksize of 512 bytes */ | 31 | #define QNX4_BLOCK_SIZE 0x200 /* blocksize of 512 bytes */ |
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index daa2d83cefe8..28493ffaafe7 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -12,6 +12,8 @@ | |||
12 | #define _LINUX_REISER_FS_H | 12 | #define _LINUX_REISER_FS_H |
13 | 13 | ||
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include <linux/magic.h> | ||
16 | |||
15 | #ifdef __KERNEL__ | 17 | #ifdef __KERNEL__ |
16 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
17 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
@@ -227,14 +229,6 @@ struct reiserfs_super_block { | |||
227 | ((!is_reiserfs_jr(SB_DISK_SUPER_BLOCK(s)) ? \ | 229 | ((!is_reiserfs_jr(SB_DISK_SUPER_BLOCK(s)) ? \ |
228 | SB_ONDISK_JOURNAL_SIZE(s) + 1 : SB_ONDISK_RESERVED_FOR_JOURNAL(s))) | 230 | SB_ONDISK_JOURNAL_SIZE(s) + 1 : SB_ONDISK_RESERVED_FOR_JOURNAL(s))) |
229 | 231 | ||
230 | /* used by gcc */ | ||
231 | #define REISERFS_SUPER_MAGIC 0x52654973 | ||
232 | /* used by file system utilities that | ||
233 | look at the superblock, etc. */ | ||
234 | #define REISERFS_SUPER_MAGIC_STRING "ReIsErFs" | ||
235 | #define REISER2FS_SUPER_MAGIC_STRING "ReIsEr2Fs" | ||
236 | #define REISER2FS_JR_SUPER_MAGIC_STRING "ReIsEr3Fs" | ||
237 | |||
238 | int is_reiserfs_3_5(struct reiserfs_super_block *rs); | 232 | int is_reiserfs_3_5(struct reiserfs_super_block *rs); |
239 | int is_reiserfs_3_6(struct reiserfs_super_block *rs); | 233 | int is_reiserfs_3_6(struct reiserfs_super_block *rs); |
240 | int is_reiserfs_jr(struct reiserfs_super_block *rs); | 234 | int is_reiserfs_jr(struct reiserfs_super_block *rs); |
diff --git a/include/linux/smb.h b/include/linux/smb.h index b0162208c963..6df3b1501559 100644 --- a/include/linux/smb.h +++ b/include/linux/smb.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #define _LINUX_SMB_H | 10 | #define _LINUX_SMB_H |
11 | 11 | ||
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/magic.h> | ||
13 | 14 | ||
14 | enum smb_protocol { | 15 | enum smb_protocol { |
15 | SMB_PROTOCOL_NONE, | 16 | SMB_PROTOCOL_NONE, |
@@ -101,8 +102,6 @@ enum smb_conn_state { | |||
101 | CONN_RETRYING /* Currently trying to reconnect */ | 102 | CONN_RETRYING /* Currently trying to reconnect */ |
102 | }; | 103 | }; |
103 | 104 | ||
104 | #define SMB_SUPER_MAGIC 0x517B | ||
105 | |||
106 | #define SMB_HEADER_LEN 37 /* includes everything up to, but not | 105 | #define SMB_HEADER_LEN 37 /* includes everything up to, but not |
107 | * including smb_bcc */ | 106 | * including smb_bcc */ |
108 | 107 | ||
diff --git a/include/linux/stddef.h b/include/linux/stddef.h index b3a2cadf90f2..ea65dfb60cd8 100644 --- a/include/linux/stddef.h +++ b/include/linux/stddef.h | |||
@@ -10,11 +10,13 @@ | |||
10 | #define NULL ((void *)0) | 10 | #define NULL ((void *)0) |
11 | #endif | 11 | #endif |
12 | 12 | ||
13 | #ifdef __KERNEL__ | ||
13 | #undef offsetof | 14 | #undef offsetof |
14 | #ifdef __compiler_offsetof | 15 | #ifdef __compiler_offsetof |
15 | #define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER) | 16 | #define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER) |
16 | #else | 17 | #else |
17 | #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) | 18 | #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) |
18 | #endif | 19 | #endif |
20 | #endif /* __KERNEL__ */ | ||
19 | 21 | ||
20 | #endif | 22 | #endif |
diff --git a/include/linux/usbdevice_fs.h b/include/linux/usbdevice_fs.h index 7b7aadb69092..617d8a1c59ae 100644 --- a/include/linux/usbdevice_fs.h +++ b/include/linux/usbdevice_fs.h | |||
@@ -32,11 +32,10 @@ | |||
32 | #define _LINUX_USBDEVICE_FS_H | 32 | #define _LINUX_USBDEVICE_FS_H |
33 | 33 | ||
34 | #include <linux/types.h> | 34 | #include <linux/types.h> |
35 | #include <linux/magic.h> | ||
35 | 36 | ||
36 | /* --------------------------------------------------------------------- */ | 37 | /* --------------------------------------------------------------------- */ |
37 | 38 | ||
38 | #define USBDEVICE_SUPER_MAGIC 0x9fa2 | ||
39 | |||
40 | /* usbdevfs ioctl codes */ | 39 | /* usbdevfs ioctl codes */ |
41 | 40 | ||
42 | struct usbdevfs_ctrltransfer { | 41 | struct usbdevfs_ctrltransfer { |