isci: cleanup/optimize pool implementation
[deliverable/linux.git] / drivers / scsi / isci / host.h
1 /*
2 * This file is provided under a dual BSD/GPLv2 license. When using or
3 * redistributing this file, you may do so under either license.
4 *
5 * GPL LICENSE SUMMARY
6 *
7 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of version 2 of the GNU General Public License as
11 * published by the Free Software Foundation.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
21 * The full GNU General Public License is included in this distribution
22 * in the file called LICENSE.GPL.
23 *
24 * BSD LICENSE
25 *
26 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
27 * All rights reserved.
28 *
29 * Redistribution and use in source and binary forms, with or without
30 * modification, are permitted provided that the following conditions
31 * are met:
32 *
33 * * Redistributions of source code must retain the above copyright
34 * notice, this list of conditions and the following disclaimer.
35 * * Redistributions in binary form must reproduce the above copyright
36 * notice, this list of conditions and the following disclaimer in
37 * the documentation and/or other materials provided with the
38 * distribution.
39 * * Neither the name of Intel Corporation nor the names of its
40 * contributors may be used to endorse or promote products derived
41 * from this software without specific prior written permission.
42 *
43 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
44 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
45 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
46 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
47 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
48 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
49 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
50 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
51 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
52 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
53 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
54 */
55 #ifndef _SCI_HOST_H_
56 #define _SCI_HOST_H_
57
58 #include "remote_device.h"
59 #include "phy.h"
60 #include "isci.h"
61 #include "remote_node_table.h"
62 #include "registers.h"
63 #include "scu_unsolicited_frame.h"
64 #include "unsolicited_frame_control.h"
65 #include "probe_roms.h"
66
67 struct scic_sds_request;
68 struct scu_task_context;
69
70
71 /**
72 * struct scic_power_control -
73 *
74 * This structure defines the fields for managing power control for direct
75 * attached disk devices.
76 */
77 struct scic_power_control {
78 /**
79 * This field is set when the power control timer is running and cleared when
80 * it is not.
81 */
82 bool timer_started;
83
84 /**
85 * Timer to control when the directed attached disks can consume power.
86 */
87 struct sci_timer timer;
88
89 /**
90 * This field is used to keep track of how many phys are put into the
91 * requesters field.
92 */
93 u8 phys_waiting;
94
95 /**
96 * This field is used to keep track of how many phys have been granted to consume power
97 */
98 u8 phys_granted_power;
99
100 /**
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
103 */
104 struct scic_sds_phy *requesters[SCI_MAX_PHYS];
105
106 };
107
108 struct scic_sds_port_configuration_agent;
109 typedef void (*port_config_fn)(struct scic_sds_controller *,
110 struct scic_sds_port_configuration_agent *,
111 struct scic_sds_port *, struct scic_sds_phy *);
112
113 struct scic_sds_port_configuration_agent {
114 u16 phy_configured_mask;
115 u16 phy_ready_mask;
116 struct {
117 u8 min_index;
118 u8 max_index;
119 } phy_valid_port_range[SCI_MAX_PHYS];
120 bool timer_pending;
121 port_config_fn link_up_handler;
122 port_config_fn link_down_handler;
123 struct sci_timer timer;
124 };
125
126 /**
127 * struct scic_sds_controller -
128 *
129 * This structure represents the SCU controller object.
130 */
131 struct scic_sds_controller {
132 /**
133 * This field contains the information for the base controller state
134 * machine.
135 */
136 struct sci_base_state_machine sm;
137
138 /**
139 * Timer for controller start/stop operations.
140 */
141 struct sci_timer timer;
142
143 /**
144 * This field contains the user parameters to be utilized for this
145 * core controller object.
146 */
147 union scic_user_parameters user_parameters;
148
149 /**
150 * This field contains the OEM parameters to be utilized for this
151 * core controller object.
152 */
153 union scic_oem_parameters oem_parameters;
154
155 /**
156 * This field contains the port configuration agent for this controller.
157 */
158 struct scic_sds_port_configuration_agent port_agent;
159
160 /**
161 * This field is the array of device objects that are currently constructed
162 * for this controller object. This table is used as a fast lookup of device
163 * objects that need to handle device completion notifications from the
164 * hardware. The table is RNi based.
165 */
166 struct scic_sds_remote_device *device_table[SCI_MAX_REMOTE_DEVICES];
167
168 /**
169 * This field is the array of IO request objects that are currently active for
170 * this controller object. This table is used as a fast lookup of the io
171 * request object that need to handle completion queue notifications. The
172 * table is TCi based.
173 */
174 struct scic_sds_request *io_request_table[SCI_MAX_IO_REQUESTS];
175
176 /**
177 * This field is the free RNi data structure
178 */
179 struct scic_remote_node_table available_remote_nodes;
180
181 /**
182 * This filed is the struct scic_power_control data used to controll when direct
183 * attached devices can consume power.
184 */
185 struct scic_power_control power_control;
186
187 /**
188 * This field is the array of sequence values for the IO Tag fields. Even
189 * though only 4 bits of the field is used for the sequence the sequence is 16
190 * bits in size so the sequence can be bitwise or'd with the TCi to build the
191 * IO Tag value.
192 */
193 u16 io_request_sequence[SCI_MAX_IO_REQUESTS];
194
195 /**
196 * This field in the array of sequence values for the RNi. These are used
197 * to control io request build to io request start operations. The sequence
198 * value is recorded into an io request when it is built and is checked on
199 * the io request start operation to make sure that there was not a device
200 * hot plug between the build and start operation.
201 */
202 u8 remote_device_sequence[SCI_MAX_REMOTE_DEVICES];
203
204 /**
205 * This field is a pointer to the memory allocated by the driver for the task
206 * context table. This data is shared between the hardware and software.
207 */
208 struct scu_task_context *task_context_table;
209
210 /**
211 * This field is a pointer to the memory allocated by the driver for the
212 * remote node context table. This table is shared between the hardware and
213 * software.
214 */
215 union scu_remote_node_context *remote_node_context_table;
216
217 /**
218 * This field is a pointer to the completion queue. This memory is
219 * written to by the hardware and read by the software.
220 */
221 u32 *completion_queue;
222
223 /**
224 * This field is the software copy of the completion queue get pointer. The
225 * controller object writes this value to the hardware after processing the
226 * completion entries.
227 */
228 u32 completion_queue_get;
229
230 /**
231 * This field is the minimum of the number of hardware supported port entries
232 * and the software requested port entries.
233 */
234 u32 logical_port_entries;
235
236 /**
237 * This field is the minimum number of devices supported by the hardware and
238 * the number of devices requested by the software.
239 */
240 u32 remote_node_entries;
241
242 /**
243 * This field is the minimum number of IO requests supported by the hardware
244 * and the number of IO requests requested by the software.
245 */
246 u32 task_context_entries;
247
248 /**
249 * This object contains all of the unsolicited frame specific
250 * data utilized by the core controller.
251 */
252 struct scic_sds_unsolicited_frame_control uf_control;
253
254 /* Phy Startup Data */
255 /**
256 * Timer for controller phy request startup. On controller start the
257 * controller will start each PHY individually in order of phy index.
258 */
259 struct sci_timer phy_timer;
260
261 /**
262 * This field is set when the phy_timer is running and is cleared when
263 * the phy_timer is stopped.
264 */
265 bool phy_startup_timer_pending;
266
267 /**
268 * This field is the index of the next phy start. It is initialized to 0 and
269 * increments for each phy index that is started.
270 */
271 u32 next_phy_to_start;
272
273 /**
274 * This field controlls the invalid link up notifications to the SCI_USER. If
275 * an invalid_link_up notification is reported a bit for the PHY index is set
276 * so further notifications are not made. Once the PHY object reports link up
277 * and is made part of a port then this bit for the PHY index is cleared.
278 */
279 u8 invalid_phy_mask;
280
281 /*
282 * This field saves the current interrupt coalescing number of the controller.
283 */
284 u16 interrupt_coalesce_number;
285
286 /*
287 * This field saves the current interrupt coalescing timeout value in microseconds.
288 */
289 u32 interrupt_coalesce_timeout;
290
291 /**
292 * This field is a pointer to the memory mapped register space for the
293 * struct smu_registers.
294 */
295 struct smu_registers __iomem *smu_registers;
296
297 /**
298 * This field is a pointer to the memory mapped register space for the
299 * struct scu_registers.
300 */
301 struct scu_registers __iomem *scu_registers;
302
303 };
304
305 struct isci_host {
306 struct scic_sds_controller sci;
307 u16 tci_head;
308 u16 tci_tail;
309 u16 tci_pool[SCI_MAX_IO_REQUESTS];
310
311 union scic_oem_parameters oem_parameters;
312
313 int id; /* unique within a given pci device */
314 struct dma_pool *dma_pool;
315 struct isci_phy phys[SCI_MAX_PHYS];
316 struct isci_port ports[SCI_MAX_PORTS + 1]; /* includes dummy port */
317 struct sas_ha_struct sas_ha;
318
319 int can_queue;
320 spinlock_t queue_lock;
321 spinlock_t state_lock;
322
323 struct pci_dev *pdev;
324
325 enum isci_status status;
326 #define IHOST_START_PENDING 0
327 #define IHOST_STOP_PENDING 1
328 unsigned long flags;
329 wait_queue_head_t eventq;
330 struct Scsi_Host *shost;
331 struct tasklet_struct completion_tasklet;
332 struct list_head requests_to_complete;
333 struct list_head requests_to_errorback;
334 spinlock_t scic_lock;
335
336 struct isci_remote_device devices[SCI_MAX_REMOTE_DEVICES];
337 };
338
339 /**
340 * enum scic_sds_controller_states - This enumeration depicts all the states
341 * for the common controller state machine.
342 */
343 enum scic_sds_controller_states {
344 /**
345 * Simply the initial state for the base controller state machine.
346 */
347 SCIC_INITIAL = 0,
348
349 /**
350 * This state indicates that the controller is reset. The memory for
351 * the controller is in it's initial state, but the controller requires
352 * initialization.
353 * This state is entered from the INITIAL state.
354 * This state is entered from the RESETTING state.
355 */
356 SCIC_RESET,
357
358 /**
359 * This state is typically an action state that indicates the controller
360 * is in the process of initialization. In this state no new IO operations
361 * are permitted.
362 * This state is entered from the RESET state.
363 */
364 SCIC_INITIALIZING,
365
366 /**
367 * This state indicates that the controller has been successfully
368 * initialized. In this state no new IO operations are permitted.
369 * This state is entered from the INITIALIZING state.
370 */
371 SCIC_INITIALIZED,
372
373 /**
374 * This state indicates the the controller is in the process of becoming
375 * ready (i.e. starting). In this state no new IO operations are permitted.
376 * This state is entered from the INITIALIZED state.
377 */
378 SCIC_STARTING,
379
380 /**
381 * This state indicates the controller is now ready. Thus, the user
382 * is able to perform IO operations on the controller.
383 * This state is entered from the STARTING state.
384 */
385 SCIC_READY,
386
387 /**
388 * This state is typically an action state that indicates the controller
389 * is in the process of resetting. Thus, the user is unable to perform
390 * IO operations on the controller. A reset is considered destructive in
391 * most cases.
392 * This state is entered from the READY state.
393 * This state is entered from the FAILED state.
394 * This state is entered from the STOPPED state.
395 */
396 SCIC_RESETTING,
397
398 /**
399 * This state indicates that the controller is in the process of stopping.
400 * In this state no new IO operations are permitted, but existing IO
401 * operations are allowed to complete.
402 * This state is entered from the READY state.
403 */
404 SCIC_STOPPING,
405
406 /**
407 * This state indicates that the controller has successfully been stopped.
408 * In this state no new IO operations are permitted.
409 * This state is entered from the STOPPING state.
410 */
411 SCIC_STOPPED,
412
413 /**
414 * This state indicates that the controller could not successfully be
415 * initialized. In this state no new IO operations are permitted.
416 * This state is entered from the INITIALIZING state.
417 * This state is entered from the STARTING state.
418 * This state is entered from the STOPPING state.
419 * This state is entered from the RESETTING state.
420 */
421 SCIC_FAILED,
422 };
423
424 /**
425 * struct isci_pci_info - This class represents the pci function containing the
426 * controllers. Depending on PCI SKU, there could be up to 2 controllers in
427 * the PCI function.
428 */
429 #define SCI_MAX_MSIX_INT (SCI_NUM_MSI_X_INT*SCI_MAX_CONTROLLERS)
430
431 struct isci_pci_info {
432 struct msix_entry msix_entries[SCI_MAX_MSIX_INT];
433 struct isci_host *hosts[SCI_MAX_CONTROLLERS];
434 struct isci_orom *orom;
435 };
436
437 static inline struct isci_pci_info *to_pci_info(struct pci_dev *pdev)
438 {
439 return pci_get_drvdata(pdev);
440 }
441
442 #define for_each_isci_host(id, ihost, pdev) \
443 for (id = 0, ihost = to_pci_info(pdev)->hosts[id]; \
444 id < ARRAY_SIZE(to_pci_info(pdev)->hosts) && ihost; \
445 ihost = to_pci_info(pdev)->hosts[++id])
446
447 static inline enum isci_status isci_host_get_state(struct isci_host *isci_host)
448 {
449 return isci_host->status;
450 }
451
452 static inline void isci_host_change_state(struct isci_host *isci_host,
453 enum isci_status status)
454 {
455 unsigned long flags;
456
457 dev_dbg(&isci_host->pdev->dev,
458 "%s: isci_host = %p, state = 0x%x",
459 __func__,
460 isci_host,
461 status);
462 spin_lock_irqsave(&isci_host->state_lock, flags);
463 isci_host->status = status;
464 spin_unlock_irqrestore(&isci_host->state_lock, flags);
465
466 }
467
468 static inline int isci_host_can_queue(struct isci_host *isci_host, int num)
469 {
470 int ret = 0;
471 unsigned long flags;
472
473 spin_lock_irqsave(&isci_host->queue_lock, flags);
474 if ((isci_host->can_queue - num) < 0) {
475 dev_dbg(&isci_host->pdev->dev,
476 "%s: isci_host->can_queue = %d\n",
477 __func__,
478 isci_host->can_queue);
479 ret = -SAS_QUEUE_FULL;
480
481 } else
482 isci_host->can_queue -= num;
483
484 spin_unlock_irqrestore(&isci_host->queue_lock, flags);
485
486 return ret;
487 }
488
489 static inline void isci_host_can_dequeue(struct isci_host *isci_host, int num)
490 {
491 unsigned long flags;
492
493 spin_lock_irqsave(&isci_host->queue_lock, flags);
494 isci_host->can_queue += num;
495 spin_unlock_irqrestore(&isci_host->queue_lock, flags);
496 }
497
498 static inline void wait_for_start(struct isci_host *ihost)
499 {
500 wait_event(ihost->eventq, !test_bit(IHOST_START_PENDING, &ihost->flags));
501 }
502
503 static inline void wait_for_stop(struct isci_host *ihost)
504 {
505 wait_event(ihost->eventq, !test_bit(IHOST_STOP_PENDING, &ihost->flags));
506 }
507
508 static inline void wait_for_device_start(struct isci_host *ihost, struct isci_remote_device *idev)
509 {
510 wait_event(ihost->eventq, !test_bit(IDEV_START_PENDING, &idev->flags));
511 }
512
513 static inline void wait_for_device_stop(struct isci_host *ihost, struct isci_remote_device *idev)
514 {
515 wait_event(ihost->eventq, !test_bit(IDEV_STOP_PENDING, &idev->flags));
516 }
517
518 static inline struct isci_host *dev_to_ihost(struct domain_device *dev)
519 {
520 return dev->port->ha->lldd_ha;
521 }
522
523 static inline struct isci_host *scic_to_ihost(struct scic_sds_controller *scic)
524 {
525 /* XXX delete after merging scic_sds_contoller and isci_host */
526 struct isci_host *ihost = container_of(scic, typeof(*ihost), sci);
527
528 return ihost;
529 }
530
531 /**
532 * INCREMENT_QUEUE_GET() -
533 *
534 * This macro will increment the specified index to and if the index wraps to 0
535 * it will toggel the cycle bit.
536 */
537 #define INCREMENT_QUEUE_GET(index, cycle, entry_count, bit_toggle) \
538 { \
539 if ((index) + 1 == entry_count) { \
540 (index) = 0; \
541 (cycle) = (cycle) ^ (bit_toggle); \
542 } else { \
543 index = index + 1; \
544 } \
545 }
546
547 /**
548 * scic_sds_controller_get_protocol_engine_group() -
549 *
550 * This macro returns the protocol engine group for this controller object.
551 * Presently we only support protocol engine group 0 so just return that
552 */
553 #define scic_sds_controller_get_protocol_engine_group(controller) 0
554
555 /**
556 * scic_sds_io_tag_construct() -
557 *
558 * This macro constructs an IO tag from the sequence and index values.
559 */
560 #define scic_sds_io_tag_construct(sequence, task_index) \
561 ((sequence) << 12 | (task_index))
562
563 /**
564 * scic_sds_io_tag_get_sequence() -
565 *
566 * This macro returns the IO sequence from the IO tag value.
567 */
568 #define scic_sds_io_tag_get_sequence(io_tag) \
569 (((io_tag) & 0xF000) >> 12)
570
571 /**
572 * scic_sds_io_tag_get_index() -
573 *
574 * This macro returns the TCi from the io tag value
575 */
576 #define scic_sds_io_tag_get_index(io_tag) \
577 ((io_tag) & 0x0FFF)
578
579 /**
580 * scic_sds_io_sequence_increment() -
581 *
582 * This is a helper macro to increment the io sequence count. We may find in
583 * the future that it will be faster to store the sequence count in such a way
584 * as we dont perform the shift operation to build io tag values so therefore
585 * need a way to incrment them correctly
586 */
587 #define scic_sds_io_sequence_increment(value) \
588 ((value) = (((value) + 1) & 0x000F))
589
590 /* expander attached sata devices require 3 rnc slots */
591 static inline int scic_sds_remote_device_node_count(struct scic_sds_remote_device *sci_dev)
592 {
593 struct domain_device *dev = sci_dev_to_domain(sci_dev);
594
595 if ((dev->dev_type == SATA_DEV || (dev->tproto & SAS_PROTOCOL_STP)) &&
596 !sci_dev->is_direct_attached)
597 return SCU_STP_REMOTE_NODE_COUNT;
598 return SCU_SSP_REMOTE_NODE_COUNT;
599 }
600
601 /**
602 * scic_sds_controller_set_invalid_phy() -
603 *
604 * This macro will set the bit in the invalid phy mask for this controller
605 * object. This is used to control messages reported for invalid link up
606 * notifications.
607 */
608 #define scic_sds_controller_set_invalid_phy(controller, phy) \
609 ((controller)->invalid_phy_mask |= (1 << (phy)->phy_index))
610
611 /**
612 * scic_sds_controller_clear_invalid_phy() -
613 *
614 * This macro will clear the bit in the invalid phy mask for this controller
615 * object. This is used to control messages reported for invalid link up
616 * notifications.
617 */
618 #define scic_sds_controller_clear_invalid_phy(controller, phy) \
619 ((controller)->invalid_phy_mask &= ~(1 << (phy)->phy_index))
620
621 static inline struct device *scic_to_dev(struct scic_sds_controller *scic)
622 {
623 return &scic_to_ihost(scic)->pdev->dev;
624 }
625
626 static inline struct device *sciphy_to_dev(struct scic_sds_phy *sci_phy)
627 {
628 struct isci_phy *iphy = sci_phy_to_iphy(sci_phy);
629
630 if (!iphy || !iphy->isci_port || !iphy->isci_port->isci_host)
631 return NULL;
632
633 return &iphy->isci_port->isci_host->pdev->dev;
634 }
635
636 static inline struct device *sciport_to_dev(struct scic_sds_port *sci_port)
637 {
638 struct isci_port *iport = sci_port_to_iport(sci_port);
639
640 if (!iport || !iport->isci_host)
641 return NULL;
642
643 return &iport->isci_host->pdev->dev;
644 }
645
646 static inline struct device *scirdev_to_dev(struct scic_sds_remote_device *sci_dev)
647 {
648 struct isci_remote_device *idev =
649 container_of(sci_dev, typeof(*idev), sci);
650
651 if (!idev || !idev->isci_port || !idev->isci_port->isci_host)
652 return NULL;
653
654 return &idev->isci_port->isci_host->pdev->dev;
655 }
656
657 enum {
658 ISCI_SI_REVA0,
659 ISCI_SI_REVA2,
660 ISCI_SI_REVB0,
661 ISCI_SI_REVC0
662 };
663
664 extern int isci_si_rev;
665
666 static inline bool is_a0(void)
667 {
668 return isci_si_rev == ISCI_SI_REVA0;
669 }
670
671 static inline bool is_a2(void)
672 {
673 return isci_si_rev == ISCI_SI_REVA2;
674 }
675
676 static inline bool is_b0(void)
677 {
678 return isci_si_rev == ISCI_SI_REVB0;
679 }
680
681 static inline bool is_c0(void)
682 {
683 return isci_si_rev > ISCI_SI_REVB0;
684 }
685
686 void scic_sds_controller_post_request(struct scic_sds_controller *scic,
687 u32 request);
688 void scic_sds_controller_release_frame(struct scic_sds_controller *scic,
689 u32 frame_index);
690 void scic_sds_controller_copy_sata_response(void *response_buffer,
691 void *frame_header,
692 void *frame_buffer);
693 enum sci_status scic_sds_controller_allocate_remote_node_context(struct scic_sds_controller *scic,
694 struct scic_sds_remote_device *sci_dev,
695 u16 *node_id);
696 void scic_sds_controller_free_remote_node_context(
697 struct scic_sds_controller *scic,
698 struct scic_sds_remote_device *sci_dev,
699 u16 node_id);
700 union scu_remote_node_context *scic_sds_controller_get_remote_node_context_buffer(
701 struct scic_sds_controller *scic,
702 u16 node_id);
703
704 struct scic_sds_request *scic_request_by_tag(struct scic_sds_controller *scic,
705 u16 io_tag);
706
707 struct scu_task_context *scic_sds_controller_get_task_context_buffer(
708 struct scic_sds_controller *scic,
709 u16 io_tag);
710
711 void scic_sds_controller_power_control_queue_insert(
712 struct scic_sds_controller *scic,
713 struct scic_sds_phy *sci_phy);
714
715 void scic_sds_controller_power_control_queue_remove(
716 struct scic_sds_controller *scic,
717 struct scic_sds_phy *sci_phy);
718
719 void scic_sds_controller_link_up(
720 struct scic_sds_controller *scic,
721 struct scic_sds_port *sci_port,
722 struct scic_sds_phy *sci_phy);
723
724 void scic_sds_controller_link_down(
725 struct scic_sds_controller *scic,
726 struct scic_sds_port *sci_port,
727 struct scic_sds_phy *sci_phy);
728
729 void scic_sds_controller_remote_device_stopped(
730 struct scic_sds_controller *scic,
731 struct scic_sds_remote_device *sci_dev);
732
733 void scic_sds_controller_copy_task_context(
734 struct scic_sds_controller *scic,
735 struct scic_sds_request *this_request);
736
737 void scic_sds_controller_register_setup(struct scic_sds_controller *scic);
738
739 enum sci_status scic_controller_continue_io(struct scic_sds_request *sci_req);
740 int isci_host_scan_finished(struct Scsi_Host *, unsigned long);
741 void isci_host_scan_start(struct Scsi_Host *);
742
743 int isci_host_init(struct isci_host *);
744
745 void isci_host_init_controller_names(
746 struct isci_host *isci_host,
747 unsigned int controller_idx);
748
749 void isci_host_deinit(
750 struct isci_host *);
751
752 void isci_host_port_link_up(
753 struct isci_host *,
754 struct scic_sds_port *,
755 struct scic_sds_phy *);
756 int isci_host_dev_found(struct domain_device *);
757
758 void isci_host_remote_device_start_complete(
759 struct isci_host *,
760 struct isci_remote_device *,
761 enum sci_status);
762
763 void scic_controller_disable_interrupts(
764 struct scic_sds_controller *scic);
765
766 enum sci_status scic_controller_start_io(
767 struct scic_sds_controller *scic,
768 struct scic_sds_remote_device *remote_device,
769 struct scic_sds_request *io_request,
770 u16 io_tag);
771
772 enum sci_task_status scic_controller_start_task(
773 struct scic_sds_controller *scic,
774 struct scic_sds_remote_device *remote_device,
775 struct scic_sds_request *task_request,
776 u16 io_tag);
777
778 enum sci_status scic_controller_terminate_request(
779 struct scic_sds_controller *scic,
780 struct scic_sds_remote_device *remote_device,
781 struct scic_sds_request *request);
782
783 enum sci_status scic_controller_complete_io(
784 struct scic_sds_controller *scic,
785 struct scic_sds_remote_device *remote_device,
786 struct scic_sds_request *io_request);
787
788 u16 scic_controller_allocate_io_tag(
789 struct scic_sds_controller *scic);
790
791 enum sci_status scic_controller_free_io_tag(
792 struct scic_sds_controller *scic,
793 u16 io_tag);
794
795 void scic_sds_port_configuration_agent_construct(
796 struct scic_sds_port_configuration_agent *port_agent);
797
798 enum sci_status scic_sds_port_configuration_agent_initialize(
799 struct scic_sds_controller *controller,
800 struct scic_sds_port_configuration_agent *port_agent);
801 #endif
This page took 0.06231 seconds and 5 git commands to generate.