diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-04-30 18:33:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-04-30 18:33:50 -0400 |
commit | e7a7c9ab415874f4ad78a0352ca0ec6711092017 (patch) | |
tree | db86f0bf794a33cc4cb6f3cdb06b9d8fae001b9d /include | |
parent | fec6c20b570bcf541e581fc97f2e0cbdb9725b98 (diff) | |
parent | 93f90e5186053611fe93d889e99ee2852f4da250 (diff) |
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley:
"This is a set of SAS and SATA fixes; there are one or two longstanding
bug fixes, but most of this is regression fixes."
* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
[SCSI] libfc: update mfs boundry checking
[SCSI] Revert "[SCSI] libsas: fix sas port naming"
[SCSI] libsas: fix false positive 'device attached' conditions
[SCSI] libsas, libata: fix start of life for a sas ata_port
[SCSI] libsas: fix ata_eh clobbering ex_phys via smp_ata_check_ready
[SCSI] libsas: unify domain_device sas_rphy lifetimes
[SCSI] libsas: fix sas_get_port_device regression
[SCSI] libsas: fix sas_find_bcast_phy() in the presence of 'vacant' phys
[SCSI] libsas: introduce sas_work to fix sas_drain_work vs sas_queue_work
[SCSI] libata: Pass correct DMA device to scsi host
[SCSI] scsi_lib: use correct DMA device in __scsi_alloc_queue
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/libata.h | 3 | ||||
-rw-r--r-- | include/scsi/libsas.h | 40 | ||||
-rw-r--r-- | include/scsi/sas_ata.h | 4 |
3 files changed, 40 insertions, 7 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 42378d637ffb..e926df7b54c9 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -996,7 +996,8 @@ extern int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *dev, | |||
996 | extern void ata_sas_port_destroy(struct ata_port *); | 996 | extern void ata_sas_port_destroy(struct ata_port *); |
997 | extern struct ata_port *ata_sas_port_alloc(struct ata_host *, | 997 | extern struct ata_port *ata_sas_port_alloc(struct ata_host *, |
998 | struct ata_port_info *, struct Scsi_Host *); | 998 | struct ata_port_info *, struct Scsi_Host *); |
999 | extern int ata_sas_async_port_init(struct ata_port *); | 999 | extern void ata_sas_async_probe(struct ata_port *ap); |
1000 | extern int ata_sas_sync_probe(struct ata_port *ap); | ||
1000 | extern int ata_sas_port_init(struct ata_port *); | 1001 | extern int ata_sas_port_init(struct ata_port *); |
1001 | extern int ata_sas_port_start(struct ata_port *ap); | 1002 | extern int ata_sas_port_start(struct ata_port *ap); |
1002 | extern void ata_sas_port_stop(struct ata_port *ap); | 1003 | extern void ata_sas_port_stop(struct ata_port *ap); |
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 5f5ed1b8b41b..f4f1c96dca72 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h | |||
@@ -217,11 +217,29 @@ struct domain_device { | |||
217 | struct kref kref; | 217 | struct kref kref; |
218 | }; | 218 | }; |
219 | 219 | ||
220 | struct sas_discovery_event { | 220 | struct sas_work { |
221 | struct list_head drain_node; | ||
221 | struct work_struct work; | 222 | struct work_struct work; |
223 | }; | ||
224 | |||
225 | static inline void INIT_SAS_WORK(struct sas_work *sw, void (*fn)(struct work_struct *)) | ||
226 | { | ||
227 | INIT_WORK(&sw->work, fn); | ||
228 | INIT_LIST_HEAD(&sw->drain_node); | ||
229 | } | ||
230 | |||
231 | struct sas_discovery_event { | ||
232 | struct sas_work work; | ||
222 | struct asd_sas_port *port; | 233 | struct asd_sas_port *port; |
223 | }; | 234 | }; |
224 | 235 | ||
236 | static inline struct sas_discovery_event *to_sas_discovery_event(struct work_struct *work) | ||
237 | { | ||
238 | struct sas_discovery_event *ev = container_of(work, typeof(*ev), work.work); | ||
239 | |||
240 | return ev; | ||
241 | } | ||
242 | |||
225 | struct sas_discovery { | 243 | struct sas_discovery { |
226 | struct sas_discovery_event disc_work[DISC_NUM_EVENTS]; | 244 | struct sas_discovery_event disc_work[DISC_NUM_EVENTS]; |
227 | unsigned long pending; | 245 | unsigned long pending; |
@@ -244,7 +262,7 @@ struct asd_sas_port { | |||
244 | struct list_head destroy_list; | 262 | struct list_head destroy_list; |
245 | enum sas_linkrate linkrate; | 263 | enum sas_linkrate linkrate; |
246 | 264 | ||
247 | struct work_struct work; | 265 | struct sas_work work; |
248 | 266 | ||
249 | /* public: */ | 267 | /* public: */ |
250 | int id; | 268 | int id; |
@@ -270,10 +288,17 @@ struct asd_sas_port { | |||
270 | }; | 288 | }; |
271 | 289 | ||
272 | struct asd_sas_event { | 290 | struct asd_sas_event { |
273 | struct work_struct work; | 291 | struct sas_work work; |
274 | struct asd_sas_phy *phy; | 292 | struct asd_sas_phy *phy; |
275 | }; | 293 | }; |
276 | 294 | ||
295 | static inline struct asd_sas_event *to_asd_sas_event(struct work_struct *work) | ||
296 | { | ||
297 | struct asd_sas_event *ev = container_of(work, typeof(*ev), work.work); | ||
298 | |||
299 | return ev; | ||
300 | } | ||
301 | |||
277 | /* The phy pretty much is controlled by the LLDD. | 302 | /* The phy pretty much is controlled by the LLDD. |
278 | * The class only reads those fields. | 303 | * The class only reads those fields. |
279 | */ | 304 | */ |
@@ -333,10 +358,17 @@ struct scsi_core { | |||
333 | }; | 358 | }; |
334 | 359 | ||
335 | struct sas_ha_event { | 360 | struct sas_ha_event { |
336 | struct work_struct work; | 361 | struct sas_work work; |
337 | struct sas_ha_struct *ha; | 362 | struct sas_ha_struct *ha; |
338 | }; | 363 | }; |
339 | 364 | ||
365 | static inline struct sas_ha_event *to_sas_ha_event(struct work_struct *work) | ||
366 | { | ||
367 | struct sas_ha_event *ev = container_of(work, typeof(*ev), work.work); | ||
368 | |||
369 | return ev; | ||
370 | } | ||
371 | |||
340 | enum sas_ha_state { | 372 | enum sas_ha_state { |
341 | SAS_HA_REGISTERED, | 373 | SAS_HA_REGISTERED, |
342 | SAS_HA_DRAINING, | 374 | SAS_HA_DRAINING, |
diff --git a/include/scsi/sas_ata.h b/include/scsi/sas_ata.h index cdccd2eb7b6c..77670e823ed8 100644 --- a/include/scsi/sas_ata.h +++ b/include/scsi/sas_ata.h | |||
@@ -37,7 +37,7 @@ static inline int dev_is_sata(struct domain_device *dev) | |||
37 | } | 37 | } |
38 | 38 | ||
39 | int sas_get_ata_info(struct domain_device *dev, struct ex_phy *phy); | 39 | int sas_get_ata_info(struct domain_device *dev, struct ex_phy *phy); |
40 | int sas_ata_init_host_and_port(struct domain_device *found_dev); | 40 | int sas_ata_init(struct domain_device *dev); |
41 | void sas_ata_task_abort(struct sas_task *task); | 41 | void sas_ata_task_abort(struct sas_task *task); |
42 | void sas_ata_strategy_handler(struct Scsi_Host *shost); | 42 | void sas_ata_strategy_handler(struct Scsi_Host *shost); |
43 | void sas_ata_eh(struct Scsi_Host *shost, struct list_head *work_q, | 43 | void sas_ata_eh(struct Scsi_Host *shost, struct list_head *work_q, |
@@ -52,7 +52,7 @@ static inline int dev_is_sata(struct domain_device *dev) | |||
52 | { | 52 | { |
53 | return 0; | 53 | return 0; |
54 | } | 54 | } |
55 | static inline int sas_ata_init_host_and_port(struct domain_device *found_dev) | 55 | static inline int sas_ata_init(struct domain_device *dev) |
56 | { | 56 | { |
57 | return 0; | 57 | return 0; |
58 | } | 58 | } |