host.c (bb3dbdf6c835a145e46119ed18a920a774694583) host.c (8db02da52895285e99d7eb2fa825fd393e61d9c5)
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 *

--- 53 unchanged lines hidden (view full) ---

62#include "remote_device.h"
63#include "request.h"
64#include "scu_completion_codes.h"
65#include "scu_event_codes.h"
66#include "registers.h"
67#include "scu_remote_node_context.h"
68#include "scu_task_context.h"
69#include "scu_unsolicited_frame.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 *

--- 53 unchanged lines hidden (view full) ---

62#include "remote_device.h"
63#include "request.h"
64#include "scu_completion_codes.h"
65#include "scu_event_codes.h"
66#include "registers.h"
67#include "scu_remote_node_context.h"
68#include "scu_task_context.h"
69#include "scu_unsolicited_frame.h"
70#include "timers.h"
71
72#define SCU_CONTEXT_RAM_INIT_STALL_TIME 200
73
74/**
75 * smu_dcc_get_max_ports() -
76 *
77 * This macro returns the maximum number of logical ports supported by the
78 * hardware. The caller passes in the value read from the device context

--- 27 unchanged lines hidden (view full) ---

106 */
107#define smu_dcc_get_max_remote_node_context(dcc_value) \
108 (\
109 (((dcc_value) & SMU_DEVICE_CONTEXT_CAPACITY_MAX_RNC_MASK) \
110 >> SMU_DEVICE_CONTEXT_CAPACITY_MAX_RNC_SHIFT) + 1 \
111 )
112
113
70
71#define SCU_CONTEXT_RAM_INIT_STALL_TIME 200
72
73/**
74 * smu_dcc_get_max_ports() -
75 *
76 * This macro returns the maximum number of logical ports supported by the
77 * hardware. The caller passes in the value read from the device context

--- 27 unchanged lines hidden (view full) ---

105 */
106#define smu_dcc_get_max_remote_node_context(dcc_value) \
107 (\
108 (((dcc_value) & SMU_DEVICE_CONTEXT_CAPACITY_MAX_RNC_MASK) \
109 >> SMU_DEVICE_CONTEXT_CAPACITY_MAX_RNC_SHIFT) + 1 \
110 )
111
112
114#define SCIC_SDS_CONTROLLER_MIN_TIMER_COUNT 3
115#define SCIC_SDS_CONTROLLER_MAX_TIMER_COUNT 3
116
117/**
118 *
119 *
120 * The number of milliseconds to wait for a phy to start.
121 */
122#define SCIC_SDS_CONTROLLER_PHY_START_TIMEOUT 100
123
124/**
125 *
126 *
127 * The number of milliseconds to wait while a given phy is consuming power
128 * before allowing another set of phys to consume power. Ultimately, this will
129 * be specified by OEM parameter.

--- 1244 unchanged lines hidden (view full) ---

1374
1375 del_timer_sync(&ihost->sci.port_agent.timer.timer);
1376
1377 del_timer_sync(&ihost->sci.power_control.timer.timer);
1378
1379 del_timer_sync(&ihost->sci.timer.timer);
1380
1381 del_timer_sync(&ihost->sci.phy_timer.timer);
113#define SCIC_SDS_CONTROLLER_PHY_START_TIMEOUT 100
114
115/**
116 *
117 *
118 * The number of milliseconds to wait while a given phy is consuming power
119 * before allowing another set of phys to consume power. Ultimately, this will
120 * be specified by OEM parameter.

--- 1244 unchanged lines hidden (view full) ---

1365
1366 del_timer_sync(&ihost->sci.port_agent.timer.timer);
1367
1368 del_timer_sync(&ihost->sci.power_control.timer.timer);
1369
1370 del_timer_sync(&ihost->sci.timer.timer);
1371
1372 del_timer_sync(&ihost->sci.phy_timer.timer);
1382
1383 isci_timer_list_destroy(ihost);
1384}
1385
1386static void __iomem *scu_base(struct isci_host *isci_host)
1387{
1388 struct pci_dev *pdev = isci_host->pdev;
1389 int id = isci_host->id;
1390
1391 return pcim_iomap_table(pdev)[SCI_SCU_BAR * 2] + SCI_SCU_BAR_SIZE * id;

--- 1120 unchanged lines hidden (view full) ---

2512int isci_host_init(struct isci_host *isci_host)
2513{
2514 int err = 0, i;
2515 enum sci_status status;
2516 union scic_oem_parameters oem;
2517 union scic_user_parameters scic_user_params;
2518 struct isci_pci_info *pci_info = to_pci_info(isci_host->pdev);
2519
1373}
1374
1375static void __iomem *scu_base(struct isci_host *isci_host)
1376{
1377 struct pci_dev *pdev = isci_host->pdev;
1378 int id = isci_host->id;
1379
1380 return pcim_iomap_table(pdev)[SCI_SCU_BAR * 2] + SCI_SCU_BAR_SIZE * id;

--- 1120 unchanged lines hidden (view full) ---

2501int isci_host_init(struct isci_host *isci_host)
2502{
2503 int err = 0, i;
2504 enum sci_status status;
2505 union scic_oem_parameters oem;
2506 union scic_user_parameters scic_user_params;
2507 struct isci_pci_info *pci_info = to_pci_info(isci_host->pdev);
2508
2520 isci_timer_list_construct(isci_host);
2521
2522 spin_lock_init(&isci_host->state_lock);
2523 spin_lock_init(&isci_host->scic_lock);
2524 spin_lock_init(&isci_host->queue_lock);
2525 init_waitqueue_head(&isci_host->eventq);
2526
2527 isci_host_change_state(isci_host, isci_starting);
2528 isci_host->can_queue = ISCI_CAN_QUEUE_VAL;
2529

--- 717 unchanged lines hidden ---
2509 spin_lock_init(&isci_host->state_lock);
2510 spin_lock_init(&isci_host->scic_lock);
2511 spin_lock_init(&isci_host->queue_lock);
2512 init_waitqueue_head(&isci_host->eventq);
2513
2514 isci_host_change_state(isci_host, isci_starting);
2515 isci_host->can_queue = ISCI_CAN_QUEUE_VAL;
2516

--- 717 unchanged lines hidden ---