diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-powerpc/commproc.h | 2 | ||||
-rw-r--r-- | include/asm-sh/cache.h | 3 | ||||
-rw-r--r-- | include/asm-sh/irq.h | 2 | ||||
-rw-r--r-- | include/asm-sh/page.h | 1 | ||||
-rw-r--r-- | include/asm-sh/pgtable.h | 2 | ||||
-rw-r--r-- | include/asm-sh/processor.h | 2 | ||||
-rw-r--r-- | include/asm-sh/setup.h | 14 | ||||
-rw-r--r-- | include/asm-sh64/dma-mapping.h | 5 | ||||
-rw-r--r-- | include/asm-sh64/pci.h | 9 | ||||
-rw-r--r-- | include/asm-sh64/scatterlist.h | 9 | ||||
-rw-r--r-- | include/asm-x86/irqflags_32.h | 21 | ||||
-rw-r--r-- | include/asm-x86/irqflags_64.h | 20 | ||||
-rw-r--r-- | include/asm-x86/lguest_hcall.h | 3 | ||||
-rw-r--r-- | include/linux/ata.h | 6 | ||||
-rw-r--r-- | include/linux/device-mapper.h | 1 | ||||
-rw-r--r-- | include/linux/futex.h | 4 | ||||
-rw-r--r-- | include/linux/scatterlist.h | 60 | ||||
-rw-r--r-- | include/net/esp.h | 2 | ||||
-rw-r--r-- | include/rdma/ib_verbs.h | 2 | ||||
-rw-r--r-- | include/scsi/libsas.h | 2 | ||||
-rw-r--r-- | include/scsi/scsi_device.h | 25 |
21 files changed, 136 insertions, 59 deletions
diff --git a/include/asm-powerpc/commproc.h b/include/asm-powerpc/commproc.h index 0307c84a5c..a2328b8add 100644 --- a/include/asm-powerpc/commproc.h +++ b/include/asm-powerpc/commproc.h | |||
@@ -91,7 +91,7 @@ extern uint m8xx_cpm_hostalloc(uint size); | |||
91 | extern int m8xx_cpm_hostfree(uint start); | 91 | extern int m8xx_cpm_hostfree(uint start); |
92 | extern void m8xx_cpm_hostdump(void); | 92 | extern void m8xx_cpm_hostdump(void); |
93 | 93 | ||
94 | extern void cpm_load_patch(volatile immap_t *immr); | 94 | extern void cpm_load_patch(cpm8xx_t *cp); |
95 | 95 | ||
96 | /* Buffer descriptors used by many of the CPM protocols. | 96 | /* Buffer descriptors used by many of the CPM protocols. |
97 | */ | 97 | */ |
diff --git a/include/asm-sh/cache.h b/include/asm-sh/cache.h index 7a18649d1c..01e5cf51ba 100644 --- a/include/asm-sh/cache.h +++ b/include/asm-sh/cache.h | |||
@@ -18,9 +18,8 @@ | |||
18 | #define SH_CACHE_ASSOC 8 | 18 | #define SH_CACHE_ASSOC 8 |
19 | 19 | ||
20 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) | 20 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) |
21 | #define SMP_CACHE_BYTES L1_CACHE_BYTES | ||
22 | 21 | ||
23 | #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) | 22 | #define __read_mostly __attribute__((__section__(".data.read_mostly"))) |
24 | 23 | ||
25 | #ifndef __ASSEMBLY__ | 24 | #ifndef __ASSEMBLY__ |
26 | struct cache_info { | 25 | struct cache_info { |
diff --git a/include/asm-sh/irq.h b/include/asm-sh/irq.h index c61d902b8b..11850f65c9 100644 --- a/include/asm-sh/irq.h +++ b/include/asm-sh/irq.h | |||
@@ -41,7 +41,7 @@ static inline int generic_irq_demux(int irq) | |||
41 | #define irq_canonicalize(irq) (irq) | 41 | #define irq_canonicalize(irq) (irq) |
42 | #define irq_demux(irq) sh_mv.mv_irq_demux(irq) | 42 | #define irq_demux(irq) sh_mv.mv_irq_demux(irq) |
43 | 43 | ||
44 | #ifdef CONFIG_4KSTACKS | 44 | #ifdef CONFIG_IRQSTACKS |
45 | extern void irq_ctx_init(int cpu); | 45 | extern void irq_ctx_init(int cpu); |
46 | extern void irq_ctx_exit(int cpu); | 46 | extern void irq_ctx_exit(int cpu); |
47 | # define __ARCH_HAS_DO_SOFTIRQ | 47 | # define __ARCH_HAS_DO_SOFTIRQ |
diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h index cb3d46c59e..3aa8b07da4 100644 --- a/include/asm-sh/page.h +++ b/include/asm-sh/page.h | |||
@@ -128,7 +128,6 @@ typedef struct { unsigned long pgd; } pgd_t; | |||
128 | #define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET)) | 128 | #define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET)) |
129 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) | 129 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) |
130 | 130 | ||
131 | #define phys_to_page(phys) (pfn_to_page(phys >> PAGE_SHIFT)) | ||
132 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) | 131 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) |
133 | 132 | ||
134 | /* PFN start number, because of __MEMORY_START */ | 133 | /* PFN start number, because of __MEMORY_START */ |
diff --git a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h index cf0dd2b648..0b1d7c6656 100644 --- a/include/asm-sh/pgtable.h +++ b/include/asm-sh/pgtable.h | |||
@@ -399,7 +399,7 @@ static inline void set_pte(pte_t *ptep, pte_t pte) | |||
399 | #define pmd_bad(x) (pmd_val(x) & ~PAGE_MASK) | 399 | #define pmd_bad(x) (pmd_val(x) & ~PAGE_MASK) |
400 | 400 | ||
401 | #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) | 401 | #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) |
402 | #define pte_page(x) phys_to_page(pte_val(x)&PTE_PHYS_MASK) | 402 | #define pte_page(x) pfn_to_page(pte_pfn(x)) |
403 | 403 | ||
404 | /* | 404 | /* |
405 | * The following only work if pte_present() is true. | 405 | * The following only work if pte_present() is true. |
diff --git a/include/asm-sh/processor.h b/include/asm-sh/processor.h index 4f2922a197..ab0028db64 100644 --- a/include/asm-sh/processor.h +++ b/include/asm-sh/processor.h | |||
@@ -71,7 +71,7 @@ struct sh_cpuinfo { | |||
71 | struct cache_info scache; /* Secondary cache */ | 71 | struct cache_info scache; /* Secondary cache */ |
72 | 72 | ||
73 | unsigned long flags; | 73 | unsigned long flags; |
74 | } __attribute__ ((aligned(SMP_CACHE_BYTES))); | 74 | } __attribute__ ((aligned(L1_CACHE_BYTES))); |
75 | 75 | ||
76 | extern struct sh_cpuinfo cpu_data[]; | 76 | extern struct sh_cpuinfo cpu_data[]; |
77 | #define boot_cpu_data cpu_data[0] | 77 | #define boot_cpu_data cpu_data[0] |
diff --git a/include/asm-sh/setup.h b/include/asm-sh/setup.h index 586a9711a7..55a2bd328d 100644 --- a/include/asm-sh/setup.h +++ b/include/asm-sh/setup.h | |||
@@ -5,6 +5,20 @@ | |||
5 | 5 | ||
6 | #ifdef __KERNEL__ | 6 | #ifdef __KERNEL__ |
7 | 7 | ||
8 | /* | ||
9 | * This is set up by the setup-routine at boot-time | ||
10 | */ | ||
11 | #define PARAM ((unsigned char *)empty_zero_page) | ||
12 | |||
13 | #define MOUNT_ROOT_RDONLY (*(unsigned long *) (PARAM+0x000)) | ||
14 | #define RAMDISK_FLAGS (*(unsigned long *) (PARAM+0x004)) | ||
15 | #define ORIG_ROOT_DEV (*(unsigned long *) (PARAM+0x008)) | ||
16 | #define LOADER_TYPE (*(unsigned long *) (PARAM+0x00c)) | ||
17 | #define INITRD_START (*(unsigned long *) (PARAM+0x010)) | ||
18 | #define INITRD_SIZE (*(unsigned long *) (PARAM+0x014)) | ||
19 | /* ... */ | ||
20 | #define COMMAND_LINE ((char *) (PARAM+0x100)) | ||
21 | |||
8 | int setup_early_printk(char *); | 22 | int setup_early_printk(char *); |
9 | void sh_mv_setup(void); | 23 | void sh_mv_setup(void); |
10 | 24 | ||
diff --git a/include/asm-sh64/dma-mapping.h b/include/asm-sh64/dma-mapping.h index 1438b763a5..18f8dd642a 100644 --- a/include/asm-sh64/dma-mapping.h +++ b/include/asm-sh64/dma-mapping.h | |||
@@ -42,8 +42,9 @@ static inline void dma_free_coherent(struct device *dev, size_t size, | |||
42 | static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size, | 42 | static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size, |
43 | enum dma_data_direction dir) | 43 | enum dma_data_direction dir) |
44 | { | 44 | { |
45 | unsigned long s = (unsigned long) vaddr & L1_CACHE_ALIGN_MASK; | 45 | unsigned long start = (unsigned long) vaddr; |
46 | unsigned long e = (vaddr + size) & L1_CACHE_ALIGN_MASK; | 46 | unsigned long s = start & L1_CACHE_ALIGN_MASK; |
47 | unsigned long e = (start + size) & L1_CACHE_ALIGN_MASK; | ||
47 | 48 | ||
48 | for (; s <= e; s += L1_CACHE_BYTES) | 49 | for (; s <= e; s += L1_CACHE_BYTES) |
49 | asm volatile ("ocbp %0, 0" : : "r" (s)); | 50 | asm volatile ("ocbp %0, 0" : : "r" (s)); |
diff --git a/include/asm-sh64/pci.h b/include/asm-sh64/pci.h index 57a67cf7a5..18055dbbb4 100644 --- a/include/asm-sh64/pci.h +++ b/include/asm-sh64/pci.h | |||
@@ -72,15 +72,6 @@ static inline void pcibios_penalize_isa_irq(int irq, int active) | |||
72 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) | 72 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) |
73 | #endif | 73 | #endif |
74 | 74 | ||
75 | /* These macros should be used after a pci_map_sg call has been done | ||
76 | * to get bus addresses of each of the SG entries and their lengths. | ||
77 | * You should only work with the number of sg entries pci_map_sg | ||
78 | * returns, or alternatively stop on the first sg_dma_len(sg) which | ||
79 | * is 0. | ||
80 | */ | ||
81 | #define sg_dma_address(sg) ((sg)->dma_address) | ||
82 | #define sg_dma_len(sg) ((sg)->length) | ||
83 | |||
84 | #ifdef CONFIG_PCI | 75 | #ifdef CONFIG_PCI |
85 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, | 76 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, |
86 | enum pci_dma_burst_strategy *strat, | 77 | enum pci_dma_burst_strategy *strat, |
diff --git a/include/asm-sh64/scatterlist.h b/include/asm-sh64/scatterlist.h index 5109251970..7f729bbfce 100644 --- a/include/asm-sh64/scatterlist.h +++ b/include/asm-sh64/scatterlist.h | |||
@@ -23,6 +23,15 @@ struct scatterlist { | |||
23 | unsigned int length; | 23 | unsigned int length; |
24 | }; | 24 | }; |
25 | 25 | ||
26 | /* These macros should be used after a pci_map_sg call has been done | ||
27 | * to get bus addresses of each of the SG entries and their lengths. | ||
28 | * You should only work with the number of sg entries pci_map_sg | ||
29 | * returns, or alternatively stop on the first sg_dma_len(sg) which | ||
30 | * is 0. | ||
31 | */ | ||
32 | #define sg_dma_address(sg) ((sg)->dma_address) | ||
33 | #define sg_dma_len(sg) ((sg)->length) | ||
34 | |||
26 | #define ISA_DMA_THRESHOLD (0xffffffff) | 35 | #define ISA_DMA_THRESHOLD (0xffffffff) |
27 | 36 | ||
28 | #endif /* !__ASM_SH64_SCATTERLIST_H */ | 37 | #endif /* !__ASM_SH64_SCATTERLIST_H */ |
diff --git a/include/asm-x86/irqflags_32.h b/include/asm-x86/irqflags_32.h index d058b04e00..4c7720089c 100644 --- a/include/asm-x86/irqflags_32.h +++ b/include/asm-x86/irqflags_32.h | |||
@@ -129,6 +129,27 @@ static inline int raw_irqs_disabled(void) | |||
129 | 129 | ||
130 | return raw_irqs_disabled_flags(flags); | 130 | return raw_irqs_disabled_flags(flags); |
131 | } | 131 | } |
132 | |||
133 | /* | ||
134 | * makes the traced hardirq state match with the machine state | ||
135 | * | ||
136 | * should be a rarely used function, only in places where its | ||
137 | * otherwise impossible to know the irq state, like in traps. | ||
138 | */ | ||
139 | static inline void trace_hardirqs_fixup_flags(unsigned long flags) | ||
140 | { | ||
141 | if (raw_irqs_disabled_flags(flags)) | ||
142 | trace_hardirqs_off(); | ||
143 | else | ||
144 | trace_hardirqs_on(); | ||
145 | } | ||
146 | |||
147 | static inline void trace_hardirqs_fixup(void) | ||
148 | { | ||
149 | unsigned long flags = __raw_local_save_flags(); | ||
150 | |||
151 | trace_hardirqs_fixup_flags(flags); | ||
152 | } | ||
132 | #endif /* __ASSEMBLY__ */ | 153 | #endif /* __ASSEMBLY__ */ |
133 | 154 | ||
134 | /* | 155 | /* |
diff --git a/include/asm-x86/irqflags_64.h b/include/asm-x86/irqflags_64.h index 5341ea1f81..bb9163bb29 100644 --- a/include/asm-x86/irqflags_64.h +++ b/include/asm-x86/irqflags_64.h | |||
@@ -112,6 +112,26 @@ static inline int raw_irqs_disabled(void) | |||
112 | } | 112 | } |
113 | 113 | ||
114 | /* | 114 | /* |
115 | * makes the traced hardirq state match with the machine state | ||
116 | * | ||
117 | * should be a rarely used function, only in places where its | ||
118 | * otherwise impossible to know the irq state, like in traps. | ||
119 | */ | ||
120 | static inline void trace_hardirqs_fixup_flags(unsigned long flags) | ||
121 | { | ||
122 | if (raw_irqs_disabled_flags(flags)) | ||
123 | trace_hardirqs_off(); | ||
124 | else | ||
125 | trace_hardirqs_on(); | ||
126 | } | ||
127 | |||
128 | static inline void trace_hardirqs_fixup(void) | ||
129 | { | ||
130 | unsigned long flags = __raw_local_save_flags(); | ||
131 | |||
132 | trace_hardirqs_fixup_flags(flags); | ||
133 | } | ||
134 | /* | ||
115 | * Used in the idle loop; sti takes one instruction cycle | 135 | * Used in the idle loop; sti takes one instruction cycle |
116 | * to complete: | 136 | * to complete: |
117 | */ | 137 | */ |
diff --git a/include/asm-x86/lguest_hcall.h b/include/asm-x86/lguest_hcall.h index 9c5092b6aa..2091779e91 100644 --- a/include/asm-x86/lguest_hcall.h +++ b/include/asm-x86/lguest_hcall.h | |||
@@ -54,9 +54,6 @@ hcall(unsigned long call, | |||
54 | } | 54 | } |
55 | /*:*/ | 55 | /*:*/ |
56 | 56 | ||
57 | void async_hcall(unsigned long call, | ||
58 | unsigned long arg1, unsigned long arg2, unsigned long arg3); | ||
59 | |||
60 | /* Can't use our min() macro here: needs to be a constant */ | 57 | /* Can't use our min() macro here: needs to be a constant */ |
61 | #define LGUEST_IRQS (NR_IRQS < 32 ? NR_IRQS: 32) | 58 | #define LGUEST_IRQS (NR_IRQS < 32 ? NR_IRQS: 32) |
62 | 59 | ||
diff --git a/include/linux/ata.h b/include/linux/ata.h index 128dc7ad49..61535e7283 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -43,6 +43,7 @@ enum { | |||
43 | ATA_MAX_SECTORS_128 = 128, | 43 | ATA_MAX_SECTORS_128 = 128, |
44 | ATA_MAX_SECTORS = 256, | 44 | ATA_MAX_SECTORS = 256, |
45 | ATA_MAX_SECTORS_LBA48 = 65535,/* TODO: 65536? */ | 45 | ATA_MAX_SECTORS_LBA48 = 65535,/* TODO: 65536? */ |
46 | ATA_MAX_SECTORS_TAPE = 65535, | ||
46 | 47 | ||
47 | ATA_ID_WORDS = 256, | 48 | ATA_ID_WORDS = 256, |
48 | ATA_ID_SERNO = 10, | 49 | ATA_ID_SERNO = 10, |
@@ -544,6 +545,11 @@ static inline int atapi_cdb_len(const u16 *dev_id) | |||
544 | } | 545 | } |
545 | } | 546 | } |
546 | 547 | ||
548 | static inline int atapi_command_packet_set(const u16 *dev_id) | ||
549 | { | ||
550 | return (dev_id[0] >> 8) & 0x1f; | ||
551 | } | ||
552 | |||
547 | static inline int is_atapi_taskfile(const struct ata_taskfile *tf) | 553 | static inline int is_atapi_taskfile(const struct ata_taskfile *tf) |
548 | { | 554 | { |
549 | return (tf->protocol == ATA_PROT_ATAPI) || | 555 | return (tf->protocol == ATA_PROT_ATAPI) || |
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index 37c66d1254..b8b7c51389 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
@@ -116,6 +116,7 @@ struct io_restrictions { | |||
116 | unsigned short hardsect_size; | 116 | unsigned short hardsect_size; |
117 | unsigned int max_segment_size; | 117 | unsigned int max_segment_size; |
118 | unsigned long seg_boundary_mask; | 118 | unsigned long seg_boundary_mask; |
119 | unsigned long bounce_pfn; | ||
119 | unsigned char no_cluster; /* inverted so that 0 is default */ | 120 | unsigned char no_cluster; /* inverted so that 0 is default */ |
120 | }; | 121 | }; |
121 | 122 | ||
diff --git a/include/linux/futex.h b/include/linux/futex.h index 99650353ad..92d420fe03 100644 --- a/include/linux/futex.h +++ b/include/linux/futex.h | |||
@@ -149,10 +149,6 @@ union futex_key { | |||
149 | int offset; | 149 | int offset; |
150 | } both; | 150 | } both; |
151 | }; | 151 | }; |
152 | int get_futex_key(u32 __user *uaddr, struct rw_semaphore *shared, | ||
153 | union futex_key *key); | ||
154 | void get_futex_key_refs(union futex_key *key); | ||
155 | void drop_futex_key_refs(union futex_key *key); | ||
156 | 152 | ||
157 | #ifdef CONFIG_FUTEX | 153 | #ifdef CONFIG_FUTEX |
158 | extern void exit_robust_list(struct task_struct *curr); | 154 | extern void exit_robust_list(struct task_struct *curr); |
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h index 32326c293d..2597350441 100644 --- a/include/linux/scatterlist.h +++ b/include/linux/scatterlist.h | |||
@@ -188,43 +188,23 @@ static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents, | |||
188 | 188 | ||
189 | /** | 189 | /** |
190 | * sg_mark_end - Mark the end of the scatterlist | 190 | * sg_mark_end - Mark the end of the scatterlist |
191 | * @sgl: Scatterlist | 191 | * @sg: SG entryScatterlist |
192 | * @nents: Number of entries in sgl | ||
193 | * | 192 | * |
194 | * Description: | 193 | * Description: |
195 | * Marks the last entry as the termination point for sg_next() | 194 | * Marks the passed in sg entry as the termination point for the sg |
195 | * table. A call to sg_next() on this entry will return NULL. | ||
196 | * | 196 | * |
197 | **/ | 197 | **/ |
198 | static inline void sg_mark_end(struct scatterlist *sgl, unsigned int nents) | 198 | static inline void sg_mark_end(struct scatterlist *sg) |
199 | { | 199 | { |
200 | sgl[nents - 1].page_link = 0x02; | ||
201 | } | ||
202 | |||
203 | static inline void __sg_mark_end(struct scatterlist *sg) | ||
204 | { | ||
205 | sg->page_link |= 0x02; | ||
206 | } | ||
207 | |||
208 | /** | ||
209 | * sg_init_one - Initialize a single entry sg list | ||
210 | * @sg: SG entry | ||
211 | * @buf: Virtual address for IO | ||
212 | * @buflen: IO length | ||
213 | * | ||
214 | * Notes: | ||
215 | * This should not be used on a single entry that is part of a larger | ||
216 | * table. Use sg_init_table() for that. | ||
217 | * | ||
218 | **/ | ||
219 | static inline void sg_init_one(struct scatterlist *sg, const void *buf, | ||
220 | unsigned int buflen) | ||
221 | { | ||
222 | memset(sg, 0, sizeof(*sg)); | ||
223 | #ifdef CONFIG_DEBUG_SG | 200 | #ifdef CONFIG_DEBUG_SG |
224 | sg->sg_magic = SG_MAGIC; | 201 | BUG_ON(sg->sg_magic != SG_MAGIC); |
225 | #endif | 202 | #endif |
226 | sg_mark_end(sg, 1); | 203 | /* |
227 | sg_set_buf(sg, buf, buflen); | 204 | * Set termination bit, clear potential chain bit |
205 | */ | ||
206 | sg->page_link |= 0x02; | ||
207 | sg->page_link &= ~0x01; | ||
228 | } | 208 | } |
229 | 209 | ||
230 | /** | 210 | /** |
@@ -240,7 +220,6 @@ static inline void sg_init_one(struct scatterlist *sg, const void *buf, | |||
240 | static inline void sg_init_table(struct scatterlist *sgl, unsigned int nents) | 220 | static inline void sg_init_table(struct scatterlist *sgl, unsigned int nents) |
241 | { | 221 | { |
242 | memset(sgl, 0, sizeof(*sgl) * nents); | 222 | memset(sgl, 0, sizeof(*sgl) * nents); |
243 | sg_mark_end(sgl, nents); | ||
244 | #ifdef CONFIG_DEBUG_SG | 223 | #ifdef CONFIG_DEBUG_SG |
245 | { | 224 | { |
246 | unsigned int i; | 225 | unsigned int i; |
@@ -248,6 +227,25 @@ static inline void sg_init_table(struct scatterlist *sgl, unsigned int nents) | |||
248 | sgl[i].sg_magic = SG_MAGIC; | 227 | sgl[i].sg_magic = SG_MAGIC; |
249 | } | 228 | } |
250 | #endif | 229 | #endif |
230 | sg_mark_end(&sgl[nents - 1]); | ||
231 | } | ||
232 | |||
233 | /** | ||
234 | * sg_init_one - Initialize a single entry sg list | ||
235 | * @sg: SG entry | ||
236 | * @buf: Virtual address for IO | ||
237 | * @buflen: IO length | ||
238 | * | ||
239 | * Notes: | ||
240 | * This should not be used on a single entry that is part of a larger | ||
241 | * table. Use sg_init_table() for that. | ||
242 | * | ||
243 | **/ | ||
244 | static inline void sg_init_one(struct scatterlist *sg, const void *buf, | ||
245 | unsigned int buflen) | ||
246 | { | ||
247 | sg_init_table(sg, 1); | ||
248 | sg_set_buf(sg, buf, buflen); | ||
251 | } | 249 | } |
252 | 250 | ||
253 | /** | 251 | /** |
diff --git a/include/net/esp.h b/include/net/esp.h index c1bc529809..c05f529bff 100644 --- a/include/net/esp.h +++ b/include/net/esp.h | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/crypto.h> | 4 | #include <linux/crypto.h> |
5 | #include <net/xfrm.h> | 5 | #include <net/xfrm.h> |
6 | #include <asm/scatterlist.h> | 6 | #include <linux/scatterlist.h> |
7 | 7 | ||
8 | #define ESP_NUM_FAST_SG 4 | 8 | #define ESP_NUM_FAST_SG 4 |
9 | 9 | ||
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 4bea182d71..11f39606e7 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
@@ -48,9 +48,9 @@ | |||
48 | #include <linux/kref.h> | 48 | #include <linux/kref.h> |
49 | #include <linux/list.h> | 49 | #include <linux/list.h> |
50 | #include <linux/rwsem.h> | 50 | #include <linux/rwsem.h> |
51 | #include <linux/scatterlist.h> | ||
51 | 52 | ||
52 | #include <asm/atomic.h> | 53 | #include <asm/atomic.h> |
53 | #include <asm/scatterlist.h> | ||
54 | #include <asm/uaccess.h> | 54 | #include <asm/uaccess.h> |
55 | 55 | ||
56 | union ib_gid { | 56 | union ib_gid { |
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 8dda2d66b5..a466c2cb89 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h | |||
@@ -36,7 +36,7 @@ | |||
36 | #include <scsi/scsi_device.h> | 36 | #include <scsi/scsi_device.h> |
37 | #include <scsi/scsi_cmnd.h> | 37 | #include <scsi/scsi_cmnd.h> |
38 | #include <scsi/scsi_transport_sas.h> | 38 | #include <scsi/scsi_transport_sas.h> |
39 | #include <asm/scatterlist.h> | 39 | #include <linux/scatterlist.h> |
40 | 40 | ||
41 | struct block_device; | 41 | struct block_device; |
42 | 42 | ||
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index d5057bc338..66e9058357 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -46,6 +46,22 @@ enum scsi_device_state { | |||
46 | * to the scsi lld. */ | 46 | * to the scsi lld. */ |
47 | }; | 47 | }; |
48 | 48 | ||
49 | enum scsi_device_event { | ||
50 | SDEV_EVT_MEDIA_CHANGE = 1, /* media has changed */ | ||
51 | |||
52 | SDEV_EVT_LAST = SDEV_EVT_MEDIA_CHANGE, | ||
53 | SDEV_EVT_MAXBITS = SDEV_EVT_LAST + 1 | ||
54 | }; | ||
55 | |||
56 | struct scsi_event { | ||
57 | enum scsi_device_event evt_type; | ||
58 | struct list_head node; | ||
59 | |||
60 | /* put union of data structures, for non-simple event types, | ||
61 | * here | ||
62 | */ | ||
63 | }; | ||
64 | |||
49 | struct scsi_device { | 65 | struct scsi_device { |
50 | struct Scsi_Host *host; | 66 | struct Scsi_Host *host; |
51 | struct request_queue *request_queue; | 67 | struct request_queue *request_queue; |
@@ -127,6 +143,10 @@ struct scsi_device { | |||
127 | unsigned guess_capacity:1; /* READ_CAPACITY might be too high by 1 */ | 143 | unsigned guess_capacity:1; /* READ_CAPACITY might be too high by 1 */ |
128 | unsigned retry_hwerror:1; /* Retry HARDWARE_ERROR */ | 144 | unsigned retry_hwerror:1; /* Retry HARDWARE_ERROR */ |
129 | 145 | ||
146 | DECLARE_BITMAP(supported_events, SDEV_EVT_MAXBITS); /* supported events */ | ||
147 | struct list_head event_list; /* asserted events */ | ||
148 | struct work_struct event_work; | ||
149 | |||
130 | unsigned int device_blocked; /* Device returned QUEUE_FULL. */ | 150 | unsigned int device_blocked; /* Device returned QUEUE_FULL. */ |
131 | 151 | ||
132 | unsigned int max_device_blocked; /* what device_blocked counts down from */ | 152 | unsigned int max_device_blocked; /* what device_blocked counts down from */ |
@@ -275,6 +295,11 @@ extern int scsi_test_unit_ready(struct scsi_device *sdev, int timeout, | |||
275 | int retries); | 295 | int retries); |
276 | extern int scsi_device_set_state(struct scsi_device *sdev, | 296 | extern int scsi_device_set_state(struct scsi_device *sdev, |
277 | enum scsi_device_state state); | 297 | enum scsi_device_state state); |
298 | extern struct scsi_event *sdev_evt_alloc(enum scsi_device_event evt_type, | ||
299 | gfp_t gfpflags); | ||
300 | extern void sdev_evt_send(struct scsi_device *sdev, struct scsi_event *evt); | ||
301 | extern void sdev_evt_send_simple(struct scsi_device *sdev, | ||
302 | enum scsi_device_event evt_type, gfp_t gfpflags); | ||
278 | extern int scsi_device_quiesce(struct scsi_device *sdev); | 303 | extern int scsi_device_quiesce(struct scsi_device *sdev); |
279 | extern void scsi_device_resume(struct scsi_device *sdev); | 304 | extern void scsi_device_resume(struct scsi_device *sdev); |
280 | extern void scsi_target_quiesce(struct scsi_target *); | 305 | extern void scsi_target_quiesce(struct scsi_target *); |