aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/device.h3
-rw-r--r--include/linux/err.h4
-rw-r--r--include/linux/if_tr.h39
-rw-r--r--include/linux/libata.h7
-rw-r--r--include/linux/mmc/protocol.h27
-rw-r--r--include/linux/net.h1
-rw-r--r--include/linux/netdevice.h2
-rw-r--r--include/linux/pci_ids.h1
-rw-r--r--include/linux/serial_core.h19
-rw-r--r--include/linux/spinlock.h8
-rw-r--r--include/linux/vmalloc.h1
-rw-r--r--include/linux/wait.h4
12 files changed, 79 insertions, 37 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index cf470459fa69..df94c0de53f2 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -273,9 +273,6 @@ struct device {
273 BIOS data relevant to device) */ 273 BIOS data relevant to device) */
274 struct dev_pm_info power; 274 struct dev_pm_info power;
275 275
276 u32 detach_state; /* State to enter when device is
277 detached from its driver. */
278
279 u64 *dma_mask; /* dma mask (if dma'able device) */ 276 u64 *dma_mask; /* dma mask (if dma'able device) */
280 u64 coherent_dma_mask;/* Like dma_mask, but for 277 u64 coherent_dma_mask;/* Like dma_mask, but for
281 alloc_coherent mappings as 278 alloc_coherent mappings as
diff --git a/include/linux/err.h b/include/linux/err.h
index 17c55df13615..ff71d2af5da3 100644
--- a/include/linux/err.h
+++ b/include/linux/err.h
@@ -13,6 +13,8 @@
13 * This should be a per-architecture thing, to allow different 13 * This should be a per-architecture thing, to allow different
14 * error and pointer decisions. 14 * error and pointer decisions.
15 */ 15 */
16#define IS_ERR_VALUE(x) unlikely((x) > (unsigned long)-1000L)
17
16static inline void *ERR_PTR(long error) 18static inline void *ERR_PTR(long error)
17{ 19{
18 return (void *) error; 20 return (void *) error;
@@ -25,7 +27,7 @@ static inline long PTR_ERR(const void *ptr)
25 27
26static inline long IS_ERR(const void *ptr) 28static inline long IS_ERR(const void *ptr)
27{ 29{
28 return unlikely((unsigned long)ptr > (unsigned long)-1000L); 30 return IS_ERR_VALUE((unsigned long)ptr);
29} 31}
30 32
31#endif /* _LINUX_ERR_H */ 33#endif /* _LINUX_ERR_H */
diff --git a/include/linux/if_tr.h b/include/linux/if_tr.h
index 4fd451f81ccb..a2b01e1e72f2 100644
--- a/include/linux/if_tr.h
+++ b/include/linux/if_tr.h
@@ -9,7 +9,7 @@
9 * 9 *
10 * Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> 10 * Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
11 * Donald Becker, <becker@super.org> 11 * Donald Becker, <becker@super.org>
12 * Peter De Schrijver, <stud11@cc4.kuleuven.ac.be> 12 * Peter De Schrijver, <stud11@cc4.kuleuven.ac.be>
13 * 13 *
14 * This program is free software; you can redistribute it and/or 14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License 15 * modify it under the terms of the GNU General Public License
@@ -19,24 +19,16 @@
19#ifndef _LINUX_IF_TR_H 19#ifndef _LINUX_IF_TR_H
20#define _LINUX_IF_TR_H 20#define _LINUX_IF_TR_H
21 21
22
23/* IEEE 802.5 Token-Ring magic constants. The frame sizes omit the preamble 22/* IEEE 802.5 Token-Ring magic constants. The frame sizes omit the preamble
24 and FCS/CRC (frame check sequence). */ 23 and FCS/CRC (frame check sequence). */
25#define TR_ALEN 6 /* Octets in one ethernet addr */ 24#define TR_ALEN 6 /* Octets in one token-ring addr */
26#define TR_HLEN (sizeof(struct trh_hdr)+sizeof(struct trllc)) 25#define TR_HLEN (sizeof(struct trh_hdr)+sizeof(struct trllc))
27#define AC 0x10 26#define AC 0x10
28#define LLC_FRAME 0x40 27#define LLC_FRAME 0x40
29#if 0
30#define ETH_HLEN 14 /* Total octets in header. */
31#define ETH_ZLEN 60 /* Min. octets in frame sans FCS */
32#define ETH_DATA_LEN 1500 /* Max. octets in payload */
33#define ETH_FRAME_LEN 1514 /* Max. octets in frame sans FCS */
34#endif
35
36 28
37/* LLC and SNAP constants */ 29/* LLC and SNAP constants */
38#define EXTENDED_SAP 0xAA 30#define EXTENDED_SAP 0xAA
39#define UI_CMD 0x03 31#define UI_CMD 0x03
40 32
41/* This is an Token-Ring frame header. */ 33/* This is an Token-Ring frame header. */
42struct trh_hdr { 34struct trh_hdr {
@@ -96,14 +88,13 @@ struct tr_statistics {
96}; 88};
97 89
98/* source routing stuff */ 90/* source routing stuff */
99 91#define TR_RII 0x80
100#define TR_RII 0x80 92#define TR_RCF_DIR_BIT 0x80
101#define TR_RCF_DIR_BIT 0x80 93#define TR_RCF_LEN_MASK 0x1f00
102#define TR_RCF_LEN_MASK 0x1f00 94#define TR_RCF_BROADCAST 0x8000 /* all-routes broadcast */
103#define TR_RCF_BROADCAST 0x8000 /* all-routes broadcast */ 95#define TR_RCF_LIMITED_BROADCAST 0xC000 /* single-route broadcast */
104#define TR_RCF_LIMITED_BROADCAST 0xC000 /* single-route broadcast */ 96#define TR_RCF_FRAME2K 0x20
105#define TR_RCF_FRAME2K 0x20 97#define TR_RCF_BROADCAST_MASK 0xC000
106#define TR_RCF_BROADCAST_MASK 0xC000 98#define TR_MAXRIFLEN 18
107#define TR_MAXRIFLEN 18
108 99
109#endif /* _LINUX_IF_TR_H */ 100#endif /* _LINUX_IF_TR_H */
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 505160ab472b..1f7e2039a04e 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -584,6 +584,13 @@ static inline void scr_write(struct ata_port *ap, unsigned int reg, u32 val)
584 ap->ops->scr_write(ap, reg, val); 584 ap->ops->scr_write(ap, reg, val);
585} 585}
586 586
587static inline void scr_write_flush(struct ata_port *ap, unsigned int reg,
588 u32 val)
589{
590 ap->ops->scr_write(ap, reg, val);
591 (void) ap->ops->scr_read(ap, reg);
592}
593
587static inline unsigned int sata_dev_present(struct ata_port *ap) 594static inline unsigned int sata_dev_present(struct ata_port *ap)
588{ 595{
589 return ((scr_read(ap, SCR_STATUS) & 0xf) == 0x3) ? 1 : 0; 596 return ((scr_read(ap, SCR_STATUS) & 0xf) == 0x3) ? 1 : 0;
diff --git a/include/linux/mmc/protocol.h b/include/linux/mmc/protocol.h
index 7b904c5102f6..896342817b97 100644
--- a/include/linux/mmc/protocol.h
+++ b/include/linux/mmc/protocol.h
@@ -195,6 +195,33 @@ struct _mmc_csd {
195#define MMC_VDD_35_36 0x00800000 /* VDD voltage 3.5 ~ 3.6 */ 195#define MMC_VDD_35_36 0x00800000 /* VDD voltage 3.5 ~ 3.6 */
196#define MMC_CARD_BUSY 0x80000000 /* Card Power up status bit */ 196#define MMC_CARD_BUSY 0x80000000 /* Card Power up status bit */
197 197
198/*
199 * Card Command Classes (CCC)
200 */
201#define CCC_BASIC (1<<0) /* (0) Basic protocol functions */
202 /* (CMD0,1,2,3,4,7,9,10,12,13,15) */
203#define CCC_STREAM_READ (1<<1) /* (1) Stream read commands */
204 /* (CMD11) */
205#define CCC_BLOCK_READ (1<<2) /* (2) Block read commands */
206 /* (CMD16,17,18) */
207#define CCC_STREAM_WRITE (1<<3) /* (3) Stream write commands */
208 /* (CMD20) */
209#define CCC_BLOCK_WRITE (1<<4) /* (4) Block write commands */
210 /* (CMD16,24,25,26,27) */
211#define CCC_ERASE (1<<5) /* (5) Ability to erase blocks */
212 /* (CMD32,33,34,35,36,37,38,39) */
213#define CCC_WRITE_PROT (1<<6) /* (6) Able to write protect blocks */
214 /* (CMD28,29,30) */
215#define CCC_LOCK_CARD (1<<7) /* (7) Able to lock down card */
216 /* (CMD16,CMD42) */
217#define CCC_APP_SPEC (1<<8) /* (8) Application specific */
218 /* (CMD55,56,57,ACMD*) */
219#define CCC_IO_MODE (1<<9) /* (9) I/O mode */
220 /* (CMD5,39,40,52,53) */
221#define CCC_SWITCH (1<<10) /* (10) High speed switch */
222 /* (CMD6,34,35,36,37,50) */
223 /* (11) Reserved */
224 /* (CMD?) */
198 225
199/* 226/*
200 * CSD field definitions 227 * CSD field definitions
diff --git a/include/linux/net.h b/include/linux/net.h
index 6d997ff3f103..20cb226b2268 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -101,7 +101,6 @@ enum sock_type {
101 * @sk: internal networking protocol agnostic socket representation 101 * @sk: internal networking protocol agnostic socket representation
102 * @wait: wait queue for several uses 102 * @wait: wait queue for several uses
103 * @type: socket type (%SOCK_STREAM, etc) 103 * @type: socket type (%SOCK_STREAM, etc)
104 * @passcred: credentials (used only in Unix Sockets (aka PF_LOCAL))
105 */ 104 */
106struct socket { 105struct socket {
107 socket_state state; 106 socket_state state;
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index ac11d73be4ce..b25bd02720d3 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -503,7 +503,7 @@ static inline void *netdev_priv(struct net_device *dev)
503#define SET_NETDEV_DEV(net, pdev) ((net)->class_dev.dev = (pdev)) 503#define SET_NETDEV_DEV(net, pdev) ((net)->class_dev.dev = (pdev))
504 504
505struct packet_type { 505struct packet_type {
506 unsigned short type; /* This is really htons(ether_type). */ 506 __be16 type; /* This is really htons(ether_type). */
507 struct net_device *dev; /* NULL is wildcarded here */ 507 struct net_device *dev; /* NULL is wildcarded here */
508 int (*func) (struct sk_buff *, struct net_device *, 508 int (*func) (struct sk_buff *, struct net_device *,
509 struct packet_type *); 509 struct packet_type *);
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index ae27792b5aa4..7b9720e35361 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2064,6 +2064,7 @@
2064 2064
2065#define PCI_VENDOR_ID_BROADCOM 0x14e4 2065#define PCI_VENDOR_ID_BROADCOM 0x14e4
2066#define PCI_DEVICE_ID_TIGON3_5752 0x1600 2066#define PCI_DEVICE_ID_TIGON3_5752 0x1600
2067#define PCI_DEVICE_ID_TIGON3_5752M 0x1601
2067#define PCI_DEVICE_ID_TIGON3_5700 0x1644 2068#define PCI_DEVICE_ID_TIGON3_5700 0x1644
2068#define PCI_DEVICE_ID_TIGON3_5701 0x1645 2069#define PCI_DEVICE_ID_TIGON3_5701 0x1645
2069#define PCI_DEVICE_ID_TIGON3_5702 0x1646 2070#define PCI_DEVICE_ID_TIGON3_5702 0x1646
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index c3fb5984f250..d6025af7efac 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -479,6 +479,25 @@ uart_handle_cts_change(struct uart_port *port, unsigned int status)
479 } 479 }
480} 480}
481 481
482#include <linux/tty_flip.h>
483
484static inline void
485uart_insert_char(struct uart_port *port, unsigned int status,
486 unsigned int overrun, unsigned int ch, unsigned int flag)
487{
488 struct tty_struct *tty = port->info->tty;
489
490 if ((status & port->ignore_status_mask & ~overrun) == 0)
491 tty_insert_flip_char(tty, ch, flag);
492
493 /*
494 * Overrun is special. Since it's reported immediately,
495 * it doesn't affect the current character.
496 */
497 if (status & ~port->ignore_status_mask & overrun)
498 tty_insert_flip_char(tty, 0, TTY_OVERRUN);
499}
500
482/* 501/*
483 * UART_ENABLE_MS - determine if port should enable modem status irqs 502 * UART_ENABLE_MS - determine if port should enable modem status irqs
484 */ 503 */
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h
index e895f3eaf53a..d6ba068719b6 100644
--- a/include/linux/spinlock.h
+++ b/include/linux/spinlock.h
@@ -248,7 +248,7 @@ typedef struct {
248 248
249#define _spin_trylock_bh(lock) ({preempt_disable(); local_bh_disable(); \ 249#define _spin_trylock_bh(lock) ({preempt_disable(); local_bh_disable(); \
250 _raw_spin_trylock(lock) ? \ 250 _raw_spin_trylock(lock) ? \
251 1 : ({preempt_enable(); local_bh_enable(); 0;});}) 251 1 : ({preempt_enable_no_resched(); local_bh_enable(); 0;});})
252 252
253#define _spin_lock(lock) \ 253#define _spin_lock(lock) \
254do { \ 254do { \
@@ -383,7 +383,7 @@ do { \
383#define _spin_unlock_bh(lock) \ 383#define _spin_unlock_bh(lock) \
384do { \ 384do { \
385 _raw_spin_unlock(lock); \ 385 _raw_spin_unlock(lock); \
386 preempt_enable(); \ 386 preempt_enable_no_resched(); \
387 local_bh_enable(); \ 387 local_bh_enable(); \
388 __release(lock); \ 388 __release(lock); \
389} while (0) 389} while (0)
@@ -391,7 +391,7 @@ do { \
391#define _write_unlock_bh(lock) \ 391#define _write_unlock_bh(lock) \
392do { \ 392do { \
393 _raw_write_unlock(lock); \ 393 _raw_write_unlock(lock); \
394 preempt_enable(); \ 394 preempt_enable_no_resched(); \
395 local_bh_enable(); \ 395 local_bh_enable(); \
396 __release(lock); \ 396 __release(lock); \
397} while (0) 397} while (0)
@@ -423,8 +423,8 @@ do { \
423#define _read_unlock_bh(lock) \ 423#define _read_unlock_bh(lock) \
424do { \ 424do { \
425 _raw_read_unlock(lock); \ 425 _raw_read_unlock(lock); \
426 preempt_enable_no_resched(); \
426 local_bh_enable(); \ 427 local_bh_enable(); \
427 preempt_enable(); \
428 __release(lock); \ 428 __release(lock); \
429} while (0) 429} while (0)
430 430
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
index 3a358c895188..6409d9cf5965 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -41,6 +41,7 @@ extern struct vm_struct *get_vm_area(unsigned long size, unsigned long flags);
41extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, 41extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags,
42 unsigned long start, unsigned long end); 42 unsigned long start, unsigned long end);
43extern struct vm_struct *remove_vm_area(void *addr); 43extern struct vm_struct *remove_vm_area(void *addr);
44extern struct vm_struct *__remove_vm_area(void *addr);
44extern int map_vm_area(struct vm_struct *area, pgprot_t prot, 45extern int map_vm_area(struct vm_struct *area, pgprot_t prot,
45 struct page ***pages); 46 struct page ***pages);
46extern void unmap_vm_area(struct vm_struct *area); 47extern void unmap_vm_area(struct vm_struct *area);
diff --git a/include/linux/wait.h b/include/linux/wait.h
index 17c874a8eb3f..c9486c3efb4a 100644
--- a/include/linux/wait.h
+++ b/include/linux/wait.h
@@ -386,9 +386,7 @@ int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
386 wait_queue_t name = { \ 386 wait_queue_t name = { \
387 .task = current, \ 387 .task = current, \
388 .func = autoremove_wake_function, \ 388 .func = autoremove_wake_function, \
389 .task_list = { .next = &(name).task_list, \ 389 .task_list = LIST_HEAD_INIT((name).task_list), \
390 .prev = &(name).task_list, \
391 }, \
392 } 390 }
393 391
394#define DEFINE_WAIT_BIT(name, word, bit) \ 392#define DEFINE_WAIT_BIT(name, word, bit) \