diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-24 21:11:22 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-24 21:11:22 -0400 |
| commit | bdc0077af574800d24318b6945cf2344e8dbb050 (patch) | |
| tree | efbcb8f2d8c2f1e42130e983405e49f2b95246f7 /include/linux | |
| parent | 801b03653fc04de2cc5bc83c06de504d41345b63 (diff) | |
| parent | e96eb23d82b4246cce4eeb14a7eedbbdcf37b3d4 (diff) | |
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull first round of SCSI updates from James Bottomley:
"The most important feature of this patch set is the new async
infrastructure that makes sure async_synchronize_full() synchronizes
all domains and allows us to remove all the hacks (like having
scsi_complete_async_scans() in the device base code) and means that
the async infrastructure will "just work" in future.
The rest is assorted driver updates (aacraid, bnx2fc, virto-scsi,
megaraid, bfa, lpfc, qla2xxx, qla4xxx) plus a lot of infrastructure
work in sas and FC.
Signed-off-by: James Bottomley <JBottomley@Parallels.com>"
* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (97 commits)
[SCSI] Revert "[SCSI] fix async probe regression"
[SCSI] cleanup usages of scsi_complete_async_scans
[SCSI] queue async scan work to an async_schedule domain
[SCSI] async: make async_synchronize_full() flush all work regardless of domain
[SCSI] async: introduce 'async_domain' type
[SCSI] bfa: Fix to set correct return error codes and misc cleanup.
[SCSI] aacraid: Series 7 Async. (performance) mode support
[SCSI] aha152x: Allow use on 64bit systems
[SCSI] virtio-scsi: Add vdrv->scan for post VIRTIO_CONFIG_S_DRIVER_OK LUN scanning
[SCSI] bfa: squelch lockdep complaint with a spin_lock_init
[SCSI] qla2xxx: remove unnecessary reads of PCI_CAP_ID_EXP
[SCSI] qla4xxx: remove unnecessary read of PCI_CAP_ID_EXP
[SCSI] ufs: fix incorrect return value about SUCCESS and FAILED
[SCSI] ufs: reverse the ufshcd_is_device_present logic
[SCSI] ufs: use module_pci_driver
[SCSI] usb-storage: update usb devices for write cache quirk in quirk list.
[SCSI] usb-storage: add support for write cache quirk
[SCSI] set to WCE if usb cache quirk is present.
[SCSI] virtio-scsi: hotplug support for virtio-scsi
[SCSI] virtio-scsi: split scatterlist per target
...
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 |
