diff options
Diffstat (limited to 'drivers/scsi/isci/host.h')
-rw-r--r-- | drivers/scsi/isci/host.h | 93 |
1 files changed, 45 insertions, 48 deletions
diff --git a/drivers/scsi/isci/host.h b/drivers/scsi/isci/host.h index 013f672a8fd7..d87f21de1807 100644 --- a/drivers/scsi/isci/host.h +++ b/drivers/scsi/isci/host.h | |||
@@ -69,12 +69,12 @@ struct scu_task_context; | |||
69 | 69 | ||
70 | 70 | ||
71 | /** | 71 | /** |
72 | * struct scic_power_control - | 72 | * struct sci_power_control - |
73 | * | 73 | * |
74 | * This structure defines the fields for managing power control for direct | 74 | * This structure defines the fields for managing power control for direct |
75 | * attached disk devices. | 75 | * attached disk devices. |
76 | */ | 76 | */ |
77 | struct scic_power_control { | 77 | struct sci_power_control { |
78 | /** | 78 | /** |
79 | * This field is set when the power control timer is running and cleared when | 79 | * This field is set when the power control timer is running and cleared when |
80 | * it is not. | 80 | * it is not. |
@@ -99,18 +99,18 @@ struct scic_power_control { | |||
99 | 99 | ||
100 | /** | 100 | /** |
101 | * This field is an array of phys that we are waiting on. The phys are direct | 101 | * This field is an array of phys that we are waiting on. The phys are direct |
102 | * mapped into requesters via struct scic_sds_phy.phy_index | 102 | * mapped into requesters via struct sci_phy.phy_index |
103 | */ | 103 | */ |
104 | struct isci_phy *requesters[SCI_MAX_PHYS]; | 104 | struct isci_phy *requesters[SCI_MAX_PHYS]; |
105 | 105 | ||
106 | }; | 106 | }; |
107 | 107 | ||
108 | struct scic_sds_port_configuration_agent; | 108 | struct sci_port_configuration_agent; |
109 | typedef void (*port_config_fn)(struct isci_host *, | 109 | typedef void (*port_config_fn)(struct isci_host *, |
110 | struct scic_sds_port_configuration_agent *, | 110 | struct sci_port_configuration_agent *, |
111 | struct isci_port *, struct isci_phy *); | 111 | struct isci_port *, struct isci_phy *); |
112 | 112 | ||
113 | struct scic_sds_port_configuration_agent { | 113 | struct sci_port_configuration_agent { |
114 | u16 phy_configured_mask; | 114 | u16 phy_configured_mask; |
115 | u16 phy_ready_mask; | 115 | u16 phy_ready_mask; |
116 | struct { | 116 | struct { |
@@ -149,13 +149,13 @@ struct isci_host { | |||
149 | /* XXX can we time this externally */ | 149 | /* XXX can we time this externally */ |
150 | struct sci_timer timer; | 150 | struct sci_timer timer; |
151 | /* XXX drop reference module params directly */ | 151 | /* XXX drop reference module params directly */ |
152 | union scic_user_parameters user_parameters; | 152 | struct sci_user_parameters user_parameters; |
153 | /* XXX no need to be a union */ | 153 | /* XXX no need to be a union */ |
154 | union scic_oem_parameters oem_parameters; | 154 | struct sci_oem_params oem_parameters; |
155 | struct scic_sds_port_configuration_agent port_agent; | 155 | struct sci_port_configuration_agent port_agent; |
156 | struct isci_remote_device *device_table[SCI_MAX_REMOTE_DEVICES]; | 156 | struct isci_remote_device *device_table[SCI_MAX_REMOTE_DEVICES]; |
157 | struct scic_remote_node_table available_remote_nodes; | 157 | struct sci_remote_node_table available_remote_nodes; |
158 | struct scic_power_control power_control; | 158 | struct sci_power_control power_control; |
159 | u8 io_request_sequence[SCI_MAX_IO_REQUESTS]; | 159 | u8 io_request_sequence[SCI_MAX_IO_REQUESTS]; |
160 | struct scu_task_context *task_context_table; | 160 | struct scu_task_context *task_context_table; |
161 | dma_addr_t task_context_dma; | 161 | dma_addr_t task_context_dma; |
@@ -165,7 +165,7 @@ struct isci_host { | |||
165 | u32 logical_port_entries; | 165 | u32 logical_port_entries; |
166 | u32 remote_node_entries; | 166 | u32 remote_node_entries; |
167 | u32 task_context_entries; | 167 | u32 task_context_entries; |
168 | struct scic_sds_unsolicited_frame_control uf_control; | 168 | struct sci_unsolicited_frame_control uf_control; |
169 | 169 | ||
170 | /* phy startup */ | 170 | /* phy startup */ |
171 | struct sci_timer phy_timer; | 171 | struct sci_timer phy_timer; |
@@ -206,10 +206,10 @@ struct isci_host { | |||
206 | }; | 206 | }; |
207 | 207 | ||
208 | /** | 208 | /** |
209 | * enum scic_sds_controller_states - This enumeration depicts all the states | 209 | * enum sci_controller_states - This enumeration depicts all the states |
210 | * for the common controller state machine. | 210 | * for the common controller state machine. |
211 | */ | 211 | */ |
212 | enum scic_sds_controller_states { | 212 | enum sci_controller_states { |
213 | /** | 213 | /** |
214 | * Simply the initial state for the base controller state machine. | 214 | * Simply the initial state for the base controller state machine. |
215 | */ | 215 | */ |
@@ -360,14 +360,14 @@ static inline struct isci_host *dev_to_ihost(struct domain_device *dev) | |||
360 | } | 360 | } |
361 | 361 | ||
362 | /** | 362 | /** |
363 | * scic_sds_controller_get_protocol_engine_group() - | 363 | * sci_controller_get_protocol_engine_group() - |
364 | * | 364 | * |
365 | * This macro returns the protocol engine group for this controller object. | 365 | * This macro returns the protocol engine group for this controller object. |
366 | * Presently we only support protocol engine group 0 so just return that | 366 | * Presently we only support protocol engine group 0 so just return that |
367 | */ | 367 | */ |
368 | #define scic_sds_controller_get_protocol_engine_group(controller) 0 | 368 | #define sci_controller_get_protocol_engine_group(controller) 0 |
369 | 369 | ||
370 | /* see scic_controller_io_tag_allocate|free for how seq and tci are built */ | 370 | /* see sci_controller_io_tag_allocate|free for how seq and tci are built */ |
371 | #define ISCI_TAG(seq, tci) (((u16) (seq)) << 12 | tci) | 371 | #define ISCI_TAG(seq, tci) (((u16) (seq)) << 12 | tci) |
372 | 372 | ||
373 | /* these are returned by the hardware, so sanitize them */ | 373 | /* these are returned by the hardware, so sanitize them */ |
@@ -375,7 +375,7 @@ static inline struct isci_host *dev_to_ihost(struct domain_device *dev) | |||
375 | #define ISCI_TAG_TCI(tag) ((tag) & (SCI_MAX_IO_REQUESTS-1)) | 375 | #define ISCI_TAG_TCI(tag) ((tag) & (SCI_MAX_IO_REQUESTS-1)) |
376 | 376 | ||
377 | /* expander attached sata devices require 3 rnc slots */ | 377 | /* expander attached sata devices require 3 rnc slots */ |
378 | static inline int scic_sds_remote_device_node_count(struct isci_remote_device *idev) | 378 | static inline int sci_remote_device_node_count(struct isci_remote_device *idev) |
379 | { | 379 | { |
380 | struct domain_device *dev = idev->domain_dev; | 380 | struct domain_device *dev = idev->domain_dev; |
381 | 381 | ||
@@ -386,23 +386,23 @@ static inline int scic_sds_remote_device_node_count(struct isci_remote_device *i | |||
386 | } | 386 | } |
387 | 387 | ||
388 | /** | 388 | /** |
389 | * scic_sds_controller_set_invalid_phy() - | 389 | * sci_controller_set_invalid_phy() - |
390 | * | 390 | * |
391 | * This macro will set the bit in the invalid phy mask for this controller | 391 | * This macro will set the bit in the invalid phy mask for this controller |
392 | * object. This is used to control messages reported for invalid link up | 392 | * object. This is used to control messages reported for invalid link up |
393 | * notifications. | 393 | * notifications. |
394 | */ | 394 | */ |
395 | #define scic_sds_controller_set_invalid_phy(controller, phy) \ | 395 | #define sci_controller_set_invalid_phy(controller, phy) \ |
396 | ((controller)->invalid_phy_mask |= (1 << (phy)->phy_index)) | 396 | ((controller)->invalid_phy_mask |= (1 << (phy)->phy_index)) |
397 | 397 | ||
398 | /** | 398 | /** |
399 | * scic_sds_controller_clear_invalid_phy() - | 399 | * sci_controller_clear_invalid_phy() - |
400 | * | 400 | * |
401 | * This macro will clear the bit in the invalid phy mask for this controller | 401 | * This macro will clear the bit in the invalid phy mask for this controller |
402 | * object. This is used to control messages reported for invalid link up | 402 | * object. This is used to control messages reported for invalid link up |
403 | * notifications. | 403 | * notifications. |
404 | */ | 404 | */ |
405 | #define scic_sds_controller_clear_invalid_phy(controller, phy) \ | 405 | #define sci_controller_clear_invalid_phy(controller, phy) \ |
406 | ((controller)->invalid_phy_mask &= ~(1 << (phy)->phy_index)) | 406 | ((controller)->invalid_phy_mask &= ~(1 << (phy)->phy_index)) |
407 | 407 | ||
408 | static inline struct device *sciphy_to_dev(struct isci_phy *iphy) | 408 | static inline struct device *sciphy_to_dev(struct isci_phy *iphy) |
@@ -460,56 +460,53 @@ static inline bool is_c0(void) | |||
460 | return isci_si_rev > ISCI_SI_REVB0; | 460 | return isci_si_rev > ISCI_SI_REVB0; |
461 | } | 461 | } |
462 | 462 | ||
463 | void scic_sds_controller_post_request(struct isci_host *ihost, | 463 | void sci_controller_post_request(struct isci_host *ihost, |
464 | u32 request); | 464 | u32 request); |
465 | void scic_sds_controller_release_frame(struct isci_host *ihost, | 465 | void sci_controller_release_frame(struct isci_host *ihost, |
466 | u32 frame_index); | 466 | u32 frame_index); |
467 | void scic_sds_controller_copy_sata_response(void *response_buffer, | 467 | void sci_controller_copy_sata_response(void *response_buffer, |
468 | void *frame_header, | 468 | void *frame_header, |
469 | void *frame_buffer); | 469 | void *frame_buffer); |
470 | enum sci_status scic_sds_controller_allocate_remote_node_context(struct isci_host *ihost, | 470 | enum sci_status sci_controller_allocate_remote_node_context(struct isci_host *ihost, |
471 | struct isci_remote_device *idev, | 471 | struct isci_remote_device *idev, |
472 | u16 *node_id); | 472 | u16 *node_id); |
473 | void scic_sds_controller_free_remote_node_context( | 473 | void sci_controller_free_remote_node_context( |
474 | struct isci_host *ihost, | 474 | struct isci_host *ihost, |
475 | struct isci_remote_device *idev, | 475 | struct isci_remote_device *idev, |
476 | u16 node_id); | 476 | u16 node_id); |
477 | union scu_remote_node_context *scic_sds_controller_get_remote_node_context_buffer( | ||
478 | struct isci_host *ihost, | ||
479 | u16 node_id); | ||
480 | 477 | ||
481 | struct isci_request *scic_request_by_tag(struct isci_host *ihost, | 478 | struct isci_request *sci_request_by_tag(struct isci_host *ihost, |
482 | u16 io_tag); | 479 | u16 io_tag); |
483 | 480 | ||
484 | void scic_sds_controller_power_control_queue_insert( | 481 | void sci_controller_power_control_queue_insert( |
485 | struct isci_host *ihost, | 482 | struct isci_host *ihost, |
486 | struct isci_phy *iphy); | 483 | struct isci_phy *iphy); |
487 | 484 | ||
488 | void scic_sds_controller_power_control_queue_remove( | 485 | void sci_controller_power_control_queue_remove( |
489 | struct isci_host *ihost, | 486 | struct isci_host *ihost, |
490 | struct isci_phy *iphy); | 487 | struct isci_phy *iphy); |
491 | 488 | ||
492 | void scic_sds_controller_link_up( | 489 | void sci_controller_link_up( |
493 | struct isci_host *ihost, | 490 | struct isci_host *ihost, |
494 | struct isci_port *iport, | 491 | struct isci_port *iport, |
495 | struct isci_phy *iphy); | 492 | struct isci_phy *iphy); |
496 | 493 | ||
497 | void scic_sds_controller_link_down( | 494 | void sci_controller_link_down( |
498 | struct isci_host *ihost, | 495 | struct isci_host *ihost, |
499 | struct isci_port *iport, | 496 | struct isci_port *iport, |
500 | struct isci_phy *iphy); | 497 | struct isci_phy *iphy); |
501 | 498 | ||
502 | void scic_sds_controller_remote_device_stopped( | 499 | void sci_controller_remote_device_stopped( |
503 | struct isci_host *ihost, | 500 | struct isci_host *ihost, |
504 | struct isci_remote_device *idev); | 501 | struct isci_remote_device *idev); |
505 | 502 | ||
506 | void scic_sds_controller_copy_task_context( | 503 | void sci_controller_copy_task_context( |
507 | struct isci_host *ihost, | 504 | struct isci_host *ihost, |
508 | struct isci_request *ireq); | 505 | struct isci_request *ireq); |
509 | 506 | ||
510 | void scic_sds_controller_register_setup(struct isci_host *ihost); | 507 | void sci_controller_register_setup(struct isci_host *ihost); |
511 | 508 | ||
512 | enum sci_status scic_controller_continue_io(struct isci_request *ireq); | 509 | enum sci_status sci_controller_continue_io(struct isci_request *ireq); |
513 | int isci_host_scan_finished(struct Scsi_Host *, unsigned long); | 510 | int isci_host_scan_finished(struct Scsi_Host *, unsigned long); |
514 | void isci_host_scan_start(struct Scsi_Host *); | 511 | void isci_host_scan_start(struct Scsi_Host *); |
515 | u16 isci_alloc_tag(struct isci_host *ihost); | 512 | u16 isci_alloc_tag(struct isci_host *ihost); |
@@ -536,33 +533,33 @@ void isci_host_remote_device_start_complete( | |||
536 | struct isci_remote_device *, | 533 | struct isci_remote_device *, |
537 | enum sci_status); | 534 | enum sci_status); |
538 | 535 | ||
539 | void scic_controller_disable_interrupts( | 536 | void sci_controller_disable_interrupts( |
540 | struct isci_host *ihost); | 537 | struct isci_host *ihost); |
541 | 538 | ||
542 | enum sci_status scic_controller_start_io( | 539 | enum sci_status sci_controller_start_io( |
543 | struct isci_host *ihost, | 540 | struct isci_host *ihost, |
544 | struct isci_remote_device *idev, | 541 | struct isci_remote_device *idev, |
545 | struct isci_request *ireq); | 542 | struct isci_request *ireq); |
546 | 543 | ||
547 | enum sci_task_status scic_controller_start_task( | 544 | enum sci_task_status sci_controller_start_task( |
548 | struct isci_host *ihost, | 545 | struct isci_host *ihost, |
549 | struct isci_remote_device *idev, | 546 | struct isci_remote_device *idev, |
550 | struct isci_request *ireq); | 547 | struct isci_request *ireq); |
551 | 548 | ||
552 | enum sci_status scic_controller_terminate_request( | 549 | enum sci_status sci_controller_terminate_request( |
553 | struct isci_host *ihost, | 550 | struct isci_host *ihost, |
554 | struct isci_remote_device *idev, | 551 | struct isci_remote_device *idev, |
555 | struct isci_request *ireq); | 552 | struct isci_request *ireq); |
556 | 553 | ||
557 | enum sci_status scic_controller_complete_io( | 554 | enum sci_status sci_controller_complete_io( |
558 | struct isci_host *ihost, | 555 | struct isci_host *ihost, |
559 | struct isci_remote_device *idev, | 556 | struct isci_remote_device *idev, |
560 | struct isci_request *ireq); | 557 | struct isci_request *ireq); |
561 | 558 | ||
562 | void scic_sds_port_configuration_agent_construct( | 559 | void sci_port_configuration_agent_construct( |
563 | struct scic_sds_port_configuration_agent *port_agent); | 560 | struct sci_port_configuration_agent *port_agent); |
564 | 561 | ||
565 | enum sci_status scic_sds_port_configuration_agent_initialize( | 562 | enum sci_status sci_port_configuration_agent_initialize( |
566 | struct isci_host *ihost, | 563 | struct isci_host *ihost, |
567 | struct scic_sds_port_configuration_agent *port_agent); | 564 | struct sci_port_configuration_agent *port_agent); |
568 | #endif | 565 | #endif |