diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-11 22:14:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-11 22:14:22 -0400 |
commit | 1ce48904285fe4b0298864f9153a8502ebeac35c (patch) | |
tree | ffe1e0c31cdea427b48ae4d4d59a96ff9d208f32 /include/linux | |
parent | 55982fd184a065b1c69279d29cbc01dbf424d2f4 (diff) | |
parent | 780513ecb80ea0934fc6833efc4f5ed9ab4ff9bb (diff) |
Merge branch 'block-2.6.24' of git://git.kernel.dk/data/git/linux-2.6-block
* 'block-2.6.24' of git://git.kernel.dk/data/git/linux-2.6-block: (37 commits)
[BLOCK] Fix failing compile with BLK_DEV_IO_TRACE=n
compat_ioctl: move floppy handlers to block/compat_ioctl.c
compat_ioctl: move cdrom handlers to block/compat_ioctl.c
compat_ioctl: move BLKPG handling to block/compat_ioctl.c
compat_ioctl: move hdio calls to block/compat_ioctl.c
compat_ioctl: handle blk_trace ioctls
compat_ioctl: add compat_blkdev_driver_ioctl()
compat_ioctl: move common block ioctls to compat_blkdev_ioctl
Sysace: Don't enable IRQ until after interrupt handler is registered
Sysace: sparse fixes
Sysace: Minor coding convention fixup
drivers/block/umem: use DRIVER_NAME where appropriate
drivers/block/umem: trim trailing whitespace
drivers/block/umem: minor cleanups
drivers/block/umem: use dev_printk()
drivers/block/umem: move private include away from include/linux
Sysace: Labels in C code should not be indented.
Sysace: Add of_platform_bus binding
Sysace: Move IRQ handler registration to occur after FSM is initialized
Sysace: minor rework and cleanup changes
...
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/bio.h | 6 | ||||
-rw-r--r-- | include/linux/blkdev.h | 25 | ||||
-rw-r--r-- | include/linux/blktrace_api.h | 12 | ||||
-rw-r--r-- | include/linux/pci_ids.h | 5 | ||||
-rw-r--r-- | include/linux/swap.h | 2 | ||||
-rw-r--r-- | include/linux/umem.h | 138 | ||||
-rw-r--r-- | include/linux/writeback.h | 1 |
7 files changed, 39 insertions, 150 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index 1ddef34f43c3..089a8bc55dd4 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -64,7 +64,7 @@ struct bio_vec { | |||
64 | 64 | ||
65 | struct bio_set; | 65 | struct bio_set; |
66 | struct bio; | 66 | struct bio; |
67 | typedef int (bio_end_io_t) (struct bio *, unsigned int, int); | 67 | typedef void (bio_end_io_t) (struct bio *, int); |
68 | typedef void (bio_destructor_t) (struct bio *); | 68 | typedef void (bio_destructor_t) (struct bio *); |
69 | 69 | ||
70 | /* | 70 | /* |
@@ -226,7 +226,7 @@ struct bio { | |||
226 | #define BIO_SEG_BOUNDARY(q, b1, b2) \ | 226 | #define BIO_SEG_BOUNDARY(q, b1, b2) \ |
227 | BIOVEC_SEG_BOUNDARY((q), __BVEC_END((b1)), __BVEC_START((b2))) | 227 | BIOVEC_SEG_BOUNDARY((q), __BVEC_END((b1)), __BVEC_START((b2))) |
228 | 228 | ||
229 | #define bio_io_error(bio, bytes) bio_endio((bio), (bytes), -EIO) | 229 | #define bio_io_error(bio) bio_endio((bio), -EIO) |
230 | 230 | ||
231 | /* | 231 | /* |
232 | * drivers should not use the __ version unless they _really_ want to | 232 | * drivers should not use the __ version unless they _really_ want to |
@@ -286,7 +286,7 @@ extern struct bio *bio_alloc_bioset(gfp_t, int, struct bio_set *); | |||
286 | extern void bio_put(struct bio *); | 286 | extern void bio_put(struct bio *); |
287 | extern void bio_free(struct bio *, struct bio_set *); | 287 | extern void bio_free(struct bio *, struct bio_set *); |
288 | 288 | ||
289 | extern void bio_endio(struct bio *, unsigned int, int); | 289 | extern void bio_endio(struct bio *, int); |
290 | struct request_queue; | 290 | struct request_queue; |
291 | extern int bio_phys_segments(struct request_queue *, struct bio *); | 291 | extern int bio_phys_segments(struct request_queue *, struct bio *); |
292 | extern int bio_hw_segments(struct request_queue *, struct bio *); | 292 | extern int bio_hw_segments(struct request_queue *, struct bio *); |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index b126c6f68e27..95be0ac57e76 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _LINUX_BLKDEV_H | 1 | #ifndef _LINUX_BLKDEV_H |
2 | #define _LINUX_BLKDEV_H | 2 | #define _LINUX_BLKDEV_H |
3 | 3 | ||
4 | #ifdef CONFIG_BLOCK | ||
5 | |||
4 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
5 | #include <linux/major.h> | 7 | #include <linux/major.h> |
6 | #include <linux/genhd.h> | 8 | #include <linux/genhd.h> |
@@ -32,8 +34,6 @@ | |||
32 | ) | 34 | ) |
33 | #endif | 35 | #endif |
34 | 36 | ||
35 | #ifdef CONFIG_BLOCK | ||
36 | |||
37 | struct scsi_ioctl_command; | 37 | struct scsi_ioctl_command; |
38 | 38 | ||
39 | struct request_queue; | 39 | struct request_queue; |
@@ -471,7 +471,6 @@ struct request_queue | |||
471 | int orderr, ordcolor; | 471 | int orderr, ordcolor; |
472 | struct request pre_flush_rq, bar_rq, post_flush_rq; | 472 | struct request pre_flush_rq, bar_rq, post_flush_rq; |
473 | struct request *orig_bar_rq; | 473 | struct request *orig_bar_rq; |
474 | unsigned int bi_size; | ||
475 | 474 | ||
476 | struct mutex sysfs_lock; | 475 | struct mutex sysfs_lock; |
477 | 476 | ||
@@ -637,10 +636,23 @@ static inline void blk_queue_bounce(struct request_queue *q, struct bio **bio) | |||
637 | } | 636 | } |
638 | #endif /* CONFIG_MMU */ | 637 | #endif /* CONFIG_MMU */ |
639 | 638 | ||
640 | #define rq_for_each_bio(_bio, rq) \ | 639 | struct req_iterator { |
640 | int i; | ||
641 | struct bio *bio; | ||
642 | }; | ||
643 | |||
644 | /* This should not be used directly - use rq_for_each_segment */ | ||
645 | #define __rq_for_each_bio(_bio, rq) \ | ||
641 | if ((rq->bio)) \ | 646 | if ((rq->bio)) \ |
642 | for (_bio = (rq)->bio; _bio; _bio = _bio->bi_next) | 647 | for (_bio = (rq)->bio; _bio; _bio = _bio->bi_next) |
643 | 648 | ||
649 | #define rq_for_each_segment(bvl, _rq, _iter) \ | ||
650 | __rq_for_each_bio(_iter.bio, _rq) \ | ||
651 | bio_for_each_segment(bvl, _iter.bio, _iter.i) | ||
652 | |||
653 | #define rq_iter_last(rq, _iter) \ | ||
654 | (_iter.bio->bi_next == NULL && _iter.i == _iter.bio->bi_vcnt-1) | ||
655 | |||
644 | extern int blk_register_queue(struct gendisk *disk); | 656 | extern int blk_register_queue(struct gendisk *disk); |
645 | extern void blk_unregister_queue(struct gendisk *disk); | 657 | extern void blk_unregister_queue(struct gendisk *disk); |
646 | extern void register_disk(struct gendisk *dev); | 658 | extern void register_disk(struct gendisk *dev); |
@@ -662,8 +674,8 @@ extern int sg_scsi_ioctl(struct file *, struct request_queue *, | |||
662 | /* | 674 | /* |
663 | * Temporary export, until SCSI gets fixed up. | 675 | * Temporary export, until SCSI gets fixed up. |
664 | */ | 676 | */ |
665 | extern int ll_back_merge_fn(struct request_queue *, struct request *, | 677 | extern int blk_rq_append_bio(struct request_queue *q, struct request *rq, |
666 | struct bio *); | 678 | struct bio *bio); |
667 | 679 | ||
668 | /* | 680 | /* |
669 | * A queue has just exitted congestion. Note this in the global counter of | 681 | * A queue has just exitted congestion. Note this in the global counter of |
@@ -810,7 +822,6 @@ static inline struct request *blk_map_queue_find_tag(struct blk_queue_tag *bqt, | |||
810 | return bqt->tag_index[tag]; | 822 | return bqt->tag_index[tag]; |
811 | } | 823 | } |
812 | 824 | ||
813 | extern void blk_rq_bio_prep(struct request_queue *, struct request *, struct bio *); | ||
814 | extern int blkdev_issue_flush(struct block_device *, sector_t *); | 825 | extern int blkdev_issue_flush(struct block_device *, sector_t *); |
815 | 826 | ||
816 | #define MAX_PHYS_SEGMENTS 128 | 827 | #define MAX_PHYS_SEGMENTS 128 |
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index 7b5d56b82b59..2e105a12fe29 100644 --- a/include/linux/blktrace_api.h +++ b/include/linux/blktrace_api.h | |||
@@ -142,10 +142,14 @@ struct blk_user_trace_setup { | |||
142 | u32 pid; | 142 | u32 pid; |
143 | }; | 143 | }; |
144 | 144 | ||
145 | #ifdef __KERNEL__ | ||
145 | #if defined(CONFIG_BLK_DEV_IO_TRACE) | 146 | #if defined(CONFIG_BLK_DEV_IO_TRACE) |
146 | extern int blk_trace_ioctl(struct block_device *, unsigned, char __user *); | 147 | extern int blk_trace_ioctl(struct block_device *, unsigned, char __user *); |
147 | extern void blk_trace_shutdown(struct request_queue *); | 148 | extern void blk_trace_shutdown(struct request_queue *); |
148 | extern void __blk_add_trace(struct blk_trace *, sector_t, int, int, u32, int, int, void *); | 149 | extern void __blk_add_trace(struct blk_trace *, sector_t, int, int, u32, int, int, void *); |
150 | extern int do_blk_trace_setup(struct request_queue *q, | ||
151 | struct block_device *bdev, struct blk_user_trace_setup *buts); | ||
152 | |||
149 | 153 | ||
150 | /** | 154 | /** |
151 | * blk_add_trace_rq - Add a trace for a request oriented action | 155 | * blk_add_trace_rq - Add a trace for a request oriented action |
@@ -286,6 +290,12 @@ static inline void blk_add_trace_remap(struct request_queue *q, struct bio *bio, | |||
286 | #define blk_add_trace_generic(q, rq, rw, what) do { } while (0) | 290 | #define blk_add_trace_generic(q, rq, rw, what) do { } while (0) |
287 | #define blk_add_trace_pdu_int(q, what, bio, pdu) do { } while (0) | 291 | #define blk_add_trace_pdu_int(q, what, bio, pdu) do { } while (0) |
288 | #define blk_add_trace_remap(q, bio, dev, f, t) do {} while (0) | 292 | #define blk_add_trace_remap(q, bio, dev, f, t) do {} while (0) |
293 | static inline int do_blk_trace_setup(struct request_queue *q, | ||
294 | struct block_device *bdev, | ||
295 | struct blk_user_trace_setup *buts) | ||
296 | { | ||
297 | return 0; | ||
298 | } | ||
289 | #endif /* CONFIG_BLK_DEV_IO_TRACE */ | 299 | #endif /* CONFIG_BLK_DEV_IO_TRACE */ |
290 | 300 | #endif /* __KERNEL__ */ | |
291 | #endif | 301 | #endif |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index c8636bb3e3a7..cfee06bca2d3 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1738,6 +1738,11 @@ | |||
1738 | 1738 | ||
1739 | #define PCI_VENDOR_ID_RADISYS 0x1331 | 1739 | #define PCI_VENDOR_ID_RADISYS 0x1331 |
1740 | 1740 | ||
1741 | #define PCI_VENDOR_ID_MICRO_MEMORY 0x1332 | ||
1742 | #define PCI_DEVICE_ID_MICRO_MEMORY_5415CN 0x5415 | ||
1743 | #define PCI_DEVICE_ID_MICRO_MEMORY_5425CN 0x5425 | ||
1744 | #define PCI_DEVICE_ID_MICRO_MEMORY_6155 0x6155 | ||
1745 | |||
1741 | #define PCI_VENDOR_ID_DOMEX 0x134a | 1746 | #define PCI_VENDOR_ID_DOMEX 0x134a |
1742 | #define PCI_DEVICE_ID_DOMEX_DMX3191D 0x0001 | 1747 | #define PCI_DEVICE_ID_DOMEX_DMX3191D 0x0001 |
1743 | 1748 | ||
diff --git a/include/linux/swap.h b/include/linux/swap.h index 665f85f2a3af..edf681a7fd8f 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -221,7 +221,7 @@ extern void swap_unplug_io_fn(struct backing_dev_info *, struct page *); | |||
221 | /* linux/mm/page_io.c */ | 221 | /* linux/mm/page_io.c */ |
222 | extern int swap_readpage(struct file *, struct page *); | 222 | extern int swap_readpage(struct file *, struct page *); |
223 | extern int swap_writepage(struct page *page, struct writeback_control *wbc); | 223 | extern int swap_writepage(struct page *page, struct writeback_control *wbc); |
224 | extern int end_swap_bio_read(struct bio *bio, unsigned int bytes_done, int err); | 224 | extern void end_swap_bio_read(struct bio *bio, int err); |
225 | 225 | ||
226 | /* linux/mm/swap_state.c */ | 226 | /* linux/mm/swap_state.c */ |
227 | extern struct address_space swapper_space; | 227 | extern struct address_space swapper_space; |
diff --git a/include/linux/umem.h b/include/linux/umem.h deleted file mode 100644 index f36ebfc32bf6..000000000000 --- a/include/linux/umem.h +++ /dev/null | |||
@@ -1,138 +0,0 @@ | |||
1 | |||
2 | /* | ||
3 | * This file contains defines for the | ||
4 | * Micro Memory MM5415 | ||
5 | * family PCI Memory Module with Battery Backup. | ||
6 | * | ||
7 | * Copyright Micro Memory INC 2001. All rights reserved. | ||
8 | * Release under the terms of the GNU GENERAL PUBLIC LICENSE version 2. | ||
9 | * See the file COPYING. | ||
10 | */ | ||
11 | |||
12 | #ifndef _DRIVERS_BLOCK_MM_H | ||
13 | #define _DRIVERS_BLOCK_MM_H | ||
14 | |||
15 | |||
16 | #define IRQ_TIMEOUT (1 * HZ) | ||
17 | |||
18 | /* CSR register definition */ | ||
19 | #define MEMCTRLSTATUS_MAGIC 0x00 | ||
20 | #define MM_MAGIC_VALUE (unsigned char)0x59 | ||
21 | |||
22 | #define MEMCTRLSTATUS_BATTERY 0x04 | ||
23 | #define BATTERY_1_DISABLED 0x01 | ||
24 | #define BATTERY_1_FAILURE 0x02 | ||
25 | #define BATTERY_2_DISABLED 0x04 | ||
26 | #define BATTERY_2_FAILURE 0x08 | ||
27 | |||
28 | #define MEMCTRLSTATUS_MEMORY 0x07 | ||
29 | #define MEM_128_MB 0xfe | ||
30 | #define MEM_256_MB 0xfc | ||
31 | #define MEM_512_MB 0xf8 | ||
32 | #define MEM_1_GB 0xf0 | ||
33 | #define MEM_2_GB 0xe0 | ||
34 | |||
35 | #define MEMCTRLCMD_LEDCTRL 0x08 | ||
36 | #define LED_REMOVE 2 | ||
37 | #define LED_FAULT 4 | ||
38 | #define LED_POWER 6 | ||
39 | #define LED_FLIP 255 | ||
40 | #define LED_OFF 0x00 | ||
41 | #define LED_ON 0x01 | ||
42 | #define LED_FLASH_3_5 0x02 | ||
43 | #define LED_FLASH_7_0 0x03 | ||
44 | #define LED_POWER_ON 0x00 | ||
45 | #define LED_POWER_OFF 0x01 | ||
46 | #define USER_BIT1 0x01 | ||
47 | #define USER_BIT2 0x02 | ||
48 | |||
49 | #define MEMORY_INITIALIZED USER_BIT1 | ||
50 | |||
51 | #define MEMCTRLCMD_ERRCTRL 0x0C | ||
52 | #define EDC_NONE_DEFAULT 0x00 | ||
53 | #define EDC_NONE 0x01 | ||
54 | #define EDC_STORE_READ 0x02 | ||
55 | #define EDC_STORE_CORRECT 0x03 | ||
56 | |||
57 | #define MEMCTRLCMD_ERRCNT 0x0D | ||
58 | #define MEMCTRLCMD_ERRSTATUS 0x0E | ||
59 | |||
60 | #define ERROR_DATA_LOG 0x20 | ||
61 | #define ERROR_ADDR_LOG 0x28 | ||
62 | #define ERROR_COUNT 0x3D | ||
63 | #define ERROR_SYNDROME 0x3E | ||
64 | #define ERROR_CHECK 0x3F | ||
65 | |||
66 | #define DMA_PCI_ADDR 0x40 | ||
67 | #define DMA_LOCAL_ADDR 0x48 | ||
68 | #define DMA_TRANSFER_SIZE 0x50 | ||
69 | #define DMA_DESCRIPTOR_ADDR 0x58 | ||
70 | #define DMA_SEMAPHORE_ADDR 0x60 | ||
71 | #define DMA_STATUS_CTRL 0x68 | ||
72 | #define DMASCR_GO 0x00001 | ||
73 | #define DMASCR_TRANSFER_READ 0x00002 | ||
74 | #define DMASCR_CHAIN_EN 0x00004 | ||
75 | #define DMASCR_SEM_EN 0x00010 | ||
76 | #define DMASCR_DMA_COMP_EN 0x00020 | ||
77 | #define DMASCR_CHAIN_COMP_EN 0x00040 | ||
78 | #define DMASCR_ERR_INT_EN 0x00080 | ||
79 | #define DMASCR_PARITY_INT_EN 0x00100 | ||
80 | #define DMASCR_ANY_ERR 0x00800 | ||
81 | #define DMASCR_MBE_ERR 0x01000 | ||
82 | #define DMASCR_PARITY_ERR_REP 0x02000 | ||
83 | #define DMASCR_PARITY_ERR_DET 0x04000 | ||
84 | #define DMASCR_SYSTEM_ERR_SIG 0x08000 | ||
85 | #define DMASCR_TARGET_ABT 0x10000 | ||
86 | #define DMASCR_MASTER_ABT 0x20000 | ||
87 | #define DMASCR_DMA_COMPLETE 0x40000 | ||
88 | #define DMASCR_CHAIN_COMPLETE 0x80000 | ||
89 | |||
90 | /* | ||
91 | 3.SOME PCs HAVE HOST BRIDGES WHICH APPARENTLY DO NOT CORRECTLY HANDLE | ||
92 | READ-LINE (0xE) OR READ-MULTIPLE (0xC) PCI COMMAND CODES DURING DMA | ||
93 | TRANSFERS. IN OTHER SYSTEMS THESE COMMAND CODES WILL CAUSE THE HOST BRIDGE | ||
94 | TO ALLOW LONGER BURSTS DURING DMA READ OPERATIONS. THE UPPER FOUR BITS | ||
95 | (31..28) OF THE DMA CSR HAVE BEEN MADE PROGRAMMABLE, SO THAT EITHER A 0x6, | ||
96 | AN 0xE OR A 0xC CAN BE WRITTEN TO THEM TO SET THE COMMAND CODE USED DURING | ||
97 | DMA READ OPERATIONS. | ||
98 | */ | ||
99 | #define DMASCR_READ 0x60000000 | ||
100 | #define DMASCR_READLINE 0xE0000000 | ||
101 | #define DMASCR_READMULTI 0xC0000000 | ||
102 | |||
103 | |||
104 | #define DMASCR_ERROR_MASK (DMASCR_MASTER_ABT | DMASCR_TARGET_ABT | DMASCR_SYSTEM_ERR_SIG | DMASCR_PARITY_ERR_DET | DMASCR_MBE_ERR | DMASCR_ANY_ERR) | ||
105 | #define DMASCR_HARD_ERROR (DMASCR_MASTER_ABT | DMASCR_TARGET_ABT | DMASCR_SYSTEM_ERR_SIG | DMASCR_PARITY_ERR_DET | DMASCR_MBE_ERR) | ||
106 | |||
107 | #define WINDOWMAP_WINNUM 0x7B | ||
108 | |||
109 | #define DMA_READ_FROM_HOST 0 | ||
110 | #define DMA_WRITE_TO_HOST 1 | ||
111 | |||
112 | struct mm_dma_desc { | ||
113 | __le64 pci_addr; | ||
114 | __le64 local_addr; | ||
115 | __le32 transfer_size; | ||
116 | u32 zero1; | ||
117 | __le64 next_desc_addr; | ||
118 | __le64 sem_addr; | ||
119 | __le32 control_bits; | ||
120 | u32 zero2; | ||
121 | |||
122 | dma_addr_t data_dma_handle; | ||
123 | |||
124 | /* Copy of the bits */ | ||
125 | __le64 sem_control_bits; | ||
126 | } __attribute__((aligned(8))); | ||
127 | |||
128 | #define PCI_VENDOR_ID_MICRO_MEMORY 0x1332 | ||
129 | #define PCI_DEVICE_ID_MICRO_MEMORY_5415CN 0x5415 | ||
130 | #define PCI_DEVICE_ID_MICRO_MEMORY_5425CN 0x5425 | ||
131 | #define PCI_DEVICE_ID_MICRO_MEMORY_6155 0x6155 | ||
132 | |||
133 | /* bits for card->flags */ | ||
134 | #define UM_FLAG_DMA_IN_REGS 1 | ||
135 | #define UM_FLAG_NO_BYTE_STATUS 2 | ||
136 | #define UM_FLAG_NO_BATTREG 4 | ||
137 | #define UM_FLAG_NO_BATT 8 | ||
138 | #endif | ||
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index b4af6bcb7b7a..c7c3337c3a88 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #define WRITEBACK_H | 5 | #define WRITEBACK_H |
6 | 6 | ||
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <linux/fs.h> | ||
8 | 9 | ||
9 | struct backing_dev_info; | 10 | struct backing_dev_info; |
10 | 11 | ||