aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/host.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-06-30 22:14:33 -0400
committerDan Williams <dan.j.williams@intel.com>2011-07-03 07:04:52 -0400
commit89a7301f21fb00e753089671eb9e4132aab8ea08 (patch)
treeafa8bac0a36d0d5626997d8995f6c9194aef3a0f /drivers/scsi/isci/host.h
parentd9dcb4ba791de2a06b19ac47cd61601cf3d4e208 (diff)
isci: retire scic_sds_ and scic_ prefixes
The distinction between scic_sds_ scic_ and sci_ are no longer relevant so just unify the prefixes on sci_. The distinction between isci_ and sci_ is historically significant, and useful for comparing the old 'core' to the current Linux driver. 'sci_' represents the former core as well as the routines that are closer to the hardware and protocol than their 'isci_' brethren. sci == sas controller interface. Also unwind the 'sds1' out of the parameter structs. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/host.h')
-rw-r--r--drivers/scsi/isci/host.h93
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 */
77struct scic_power_control { 77struct 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
108struct scic_sds_port_configuration_agent; 108struct sci_port_configuration_agent;
109typedef void (*port_config_fn)(struct isci_host *, 109typedef 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
113struct scic_sds_port_configuration_agent { 113struct 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 */
212enum scic_sds_controller_states { 212enum 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 */
378static inline int scic_sds_remote_device_node_count(struct isci_remote_device *idev) 378static 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
408static inline struct device *sciphy_to_dev(struct isci_phy *iphy) 408static 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
463void scic_sds_controller_post_request(struct isci_host *ihost, 463void sci_controller_post_request(struct isci_host *ihost,
464 u32 request); 464 u32 request);
465void scic_sds_controller_release_frame(struct isci_host *ihost, 465void sci_controller_release_frame(struct isci_host *ihost,
466 u32 frame_index); 466 u32 frame_index);
467void scic_sds_controller_copy_sata_response(void *response_buffer, 467void sci_controller_copy_sata_response(void *response_buffer,
468 void *frame_header, 468 void *frame_header,
469 void *frame_buffer); 469 void *frame_buffer);
470enum sci_status scic_sds_controller_allocate_remote_node_context(struct isci_host *ihost, 470enum 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);
473void scic_sds_controller_free_remote_node_context( 473void 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);
477union scu_remote_node_context *scic_sds_controller_get_remote_node_context_buffer(
478 struct isci_host *ihost,
479 u16 node_id);
480 477
481struct isci_request *scic_request_by_tag(struct isci_host *ihost, 478struct isci_request *sci_request_by_tag(struct isci_host *ihost,
482 u16 io_tag); 479 u16 io_tag);
483 480
484void scic_sds_controller_power_control_queue_insert( 481void 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
488void scic_sds_controller_power_control_queue_remove( 485void 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
492void scic_sds_controller_link_up( 489void 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
497void scic_sds_controller_link_down( 494void 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
502void scic_sds_controller_remote_device_stopped( 499void 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
506void scic_sds_controller_copy_task_context( 503void 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
510void scic_sds_controller_register_setup(struct isci_host *ihost); 507void sci_controller_register_setup(struct isci_host *ihost);
511 508
512enum sci_status scic_controller_continue_io(struct isci_request *ireq); 509enum sci_status sci_controller_continue_io(struct isci_request *ireq);
513int isci_host_scan_finished(struct Scsi_Host *, unsigned long); 510int isci_host_scan_finished(struct Scsi_Host *, unsigned long);
514void isci_host_scan_start(struct Scsi_Host *); 511void isci_host_scan_start(struct Scsi_Host *);
515u16 isci_alloc_tag(struct isci_host *ihost); 512u16 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
539void scic_controller_disable_interrupts( 536void sci_controller_disable_interrupts(
540 struct isci_host *ihost); 537 struct isci_host *ihost);
541 538
542enum sci_status scic_controller_start_io( 539enum 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
547enum sci_task_status scic_controller_start_task( 544enum 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
552enum sci_status scic_controller_terminate_request( 549enum 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
557enum sci_status scic_controller_complete_io( 554enum 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
562void scic_sds_port_configuration_agent_construct( 559void sci_port_configuration_agent_construct(
563 struct scic_sds_port_configuration_agent *port_agent); 560 struct sci_port_configuration_agent *port_agent);
564 561
565enum sci_status scic_sds_port_configuration_agent_initialize( 562enum 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