diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/async.h | 36 | ||||
-rw-r--r-- | include/linux/libata.h | 4 | ||||
-rw-r--r-- | include/linux/usb_usual.h | 4 | ||||
-rw-r--r-- | include/linux/virtio.h | 1 | ||||
-rw-r--r-- | include/linux/virtio_scsi.h | 9 |
5 files changed, 49 insertions, 5 deletions
diff --git a/include/linux/async.h b/include/linux/async.h index 68a9530196f2..7a24fe9b44b4 100644 --- a/include/linux/async.h +++ b/include/linux/async.h | |||
@@ -9,19 +9,47 @@ | |||
9 | * as published by the Free Software Foundation; version 2 | 9 | * as published by the Free Software Foundation; version 2 |
10 | * of the License. | 10 | * of the License. |
11 | */ | 11 | */ |
12 | #ifndef __ASYNC_H__ | ||
13 | #define __ASYNC_H__ | ||
12 | 14 | ||
13 | #include <linux/types.h> | 15 | #include <linux/types.h> |
14 | #include <linux/list.h> | 16 | #include <linux/list.h> |
15 | 17 | ||
16 | typedef u64 async_cookie_t; | 18 | typedef u64 async_cookie_t; |
17 | typedef void (async_func_ptr) (void *data, async_cookie_t cookie); | 19 | typedef void (async_func_ptr) (void *data, async_cookie_t cookie); |
20 | struct async_domain { | ||
21 | struct list_head node; | ||
22 | struct list_head domain; | ||
23 | int count; | ||
24 | unsigned registered:1; | ||
25 | }; | ||
26 | |||
27 | /* | ||
28 | * domain participates in global async_synchronize_full | ||
29 | */ | ||
30 | #define ASYNC_DOMAIN(_name) \ | ||
31 | struct async_domain _name = { .node = LIST_HEAD_INIT(_name.node), \ | ||
32 | .domain = LIST_HEAD_INIT(_name.domain), \ | ||
33 | .count = 0, \ | ||
34 | .registered = 1 } | ||
35 | |||
36 | /* | ||
37 | * domain is free to go out of scope as soon as all pending work is | ||
38 | * complete, this domain does not participate in async_synchronize_full | ||
39 | */ | ||
40 | #define ASYNC_DOMAIN_EXCLUSIVE(_name) \ | ||
41 | struct async_domain _name = { .node = LIST_HEAD_INIT(_name.node), \ | ||
42 | .domain = LIST_HEAD_INIT(_name.domain), \ | ||
43 | .count = 0, \ | ||
44 | .registered = 0 } | ||
18 | 45 | ||
19 | extern async_cookie_t async_schedule(async_func_ptr *ptr, void *data); | 46 | extern async_cookie_t async_schedule(async_func_ptr *ptr, void *data); |
20 | extern async_cookie_t async_schedule_domain(async_func_ptr *ptr, void *data, | 47 | extern async_cookie_t async_schedule_domain(async_func_ptr *ptr, void *data, |
21 | struct list_head *list); | 48 | struct async_domain *domain); |
49 | void async_unregister_domain(struct async_domain *domain); | ||
22 | extern void async_synchronize_full(void); | 50 | extern void async_synchronize_full(void); |
23 | extern void async_synchronize_full_domain(struct list_head *list); | 51 | extern void async_synchronize_full_domain(struct async_domain *domain); |
24 | extern void async_synchronize_cookie(async_cookie_t cookie); | 52 | extern void async_synchronize_cookie(async_cookie_t cookie); |
25 | extern void async_synchronize_cookie_domain(async_cookie_t cookie, | 53 | extern void async_synchronize_cookie_domain(async_cookie_t cookie, |
26 | struct list_head *list); | 54 | struct async_domain *domain); |
27 | 55 | #endif | |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 6e887c742a27..53da442f892d 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -846,6 +846,8 @@ struct ata_port_operations { | |||
846 | void (*error_handler)(struct ata_port *ap); | 846 | void (*error_handler)(struct ata_port *ap); |
847 | void (*lost_interrupt)(struct ata_port *ap); | 847 | void (*lost_interrupt)(struct ata_port *ap); |
848 | void (*post_internal_cmd)(struct ata_queued_cmd *qc); | 848 | void (*post_internal_cmd)(struct ata_queued_cmd *qc); |
849 | void (*sched_eh)(struct ata_port *ap); | ||
850 | void (*end_eh)(struct ata_port *ap); | ||
849 | 851 | ||
850 | /* | 852 | /* |
851 | * Optional features | 853 | * Optional features |
@@ -1167,6 +1169,8 @@ extern void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset, | |||
1167 | ata_reset_fn_t softreset, ata_reset_fn_t hardreset, | 1169 | ata_reset_fn_t softreset, ata_reset_fn_t hardreset, |
1168 | ata_postreset_fn_t postreset); | 1170 | ata_postreset_fn_t postreset); |
1169 | extern void ata_std_error_handler(struct ata_port *ap); | 1171 | extern void ata_std_error_handler(struct ata_port *ap); |
1172 | extern void ata_std_sched_eh(struct ata_port *ap); | ||
1173 | extern void ata_std_end_eh(struct ata_port *ap); | ||
1170 | extern int ata_link_nr_enabled(struct ata_link *link); | 1174 | extern int ata_link_nr_enabled(struct ata_link *link); |
1171 | 1175 | ||
1172 | /* | 1176 | /* |
diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h index 17df3600bcef..e84e769aaddc 100644 --- a/include/linux/usb_usual.h +++ b/include/linux/usb_usual.h | |||
@@ -64,7 +64,9 @@ | |||
64 | US_FLAG(NO_READ_CAPACITY_16, 0x00080000) \ | 64 | US_FLAG(NO_READ_CAPACITY_16, 0x00080000) \ |
65 | /* cannot handle READ_CAPACITY_16 */ \ | 65 | /* cannot handle READ_CAPACITY_16 */ \ |
66 | US_FLAG(INITIAL_READ10, 0x00100000) \ | 66 | US_FLAG(INITIAL_READ10, 0x00100000) \ |
67 | /* Initial READ(10) (and others) must be retried */ | 67 | /* Initial READ(10) (and others) must be retried */ \ |
68 | US_FLAG(WRITE_CACHE, 0x00200000) \ | ||
69 | /* Write Cache status is not available */ | ||
68 | 70 | ||
69 | #define US_FLAG(name, value) US_FL_##name = value , | 71 | #define US_FLAG(name, value) US_FL_##name = value , |
70 | enum { US_DO_ALL_FLAGS }; | 72 | enum { US_DO_ALL_FLAGS }; |
diff --git a/include/linux/virtio.h b/include/linux/virtio.h index 8efd28ae5597..a1ba8bbd9fbe 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h | |||
@@ -92,6 +92,7 @@ struct virtio_driver { | |||
92 | const unsigned int *feature_table; | 92 | const unsigned int *feature_table; |
93 | unsigned int feature_table_size; | 93 | unsigned int feature_table_size; |
94 | int (*probe)(struct virtio_device *dev); | 94 | int (*probe)(struct virtio_device *dev); |
95 | void (*scan)(struct virtio_device *dev); | ||
95 | void (*remove)(struct virtio_device *dev); | 96 | void (*remove)(struct virtio_device *dev); |
96 | void (*config_changed)(struct virtio_device *dev); | 97 | void (*config_changed)(struct virtio_device *dev); |
97 | #ifdef CONFIG_PM | 98 | #ifdef CONFIG_PM |
diff --git a/include/linux/virtio_scsi.h b/include/linux/virtio_scsi.h index 8ddeafdc0546..dc8d305b0e05 100644 --- a/include/linux/virtio_scsi.h +++ b/include/linux/virtio_scsi.h | |||
@@ -69,6 +69,10 @@ struct virtio_scsi_config { | |||
69 | u32 max_lun; | 69 | u32 max_lun; |
70 | } __packed; | 70 | } __packed; |
71 | 71 | ||
72 | /* Feature Bits */ | ||
73 | #define VIRTIO_SCSI_F_INOUT 0 | ||
74 | #define VIRTIO_SCSI_F_HOTPLUG 1 | ||
75 | |||
72 | /* Response codes */ | 76 | /* Response codes */ |
73 | #define VIRTIO_SCSI_S_OK 0 | 77 | #define VIRTIO_SCSI_S_OK 0 |
74 | #define VIRTIO_SCSI_S_OVERRUN 1 | 78 | #define VIRTIO_SCSI_S_OVERRUN 1 |
@@ -105,6 +109,11 @@ struct virtio_scsi_config { | |||
105 | #define VIRTIO_SCSI_T_TRANSPORT_RESET 1 | 109 | #define VIRTIO_SCSI_T_TRANSPORT_RESET 1 |
106 | #define VIRTIO_SCSI_T_ASYNC_NOTIFY 2 | 110 | #define VIRTIO_SCSI_T_ASYNC_NOTIFY 2 |
107 | 111 | ||
112 | /* Reasons of transport reset event */ | ||
113 | #define VIRTIO_SCSI_EVT_RESET_HARD 0 | ||
114 | #define VIRTIO_SCSI_EVT_RESET_RESCAN 1 | ||
115 | #define VIRTIO_SCSI_EVT_RESET_REMOVED 2 | ||
116 | |||
108 | #define VIRTIO_SCSI_S_SIMPLE 0 | 117 | #define VIRTIO_SCSI_S_SIMPLE 0 |
109 | #define VIRTIO_SCSI_S_ORDERED 1 | 118 | #define VIRTIO_SCSI_S_ORDERED 1 |
110 | #define VIRTIO_SCSI_S_HEAD 2 | 119 | #define VIRTIO_SCSI_S_HEAD 2 |