diff options
author | Jitendra Bhivare <jitendra.bhivare@broadcom.com> | 2016-08-19 05:50:09 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-08-23 22:42:43 -0400 |
commit | 1f5e847acbda0c46f66a7571bd62a9970a248b27 (patch) | |
tree | b7bc1937c7c65a2c7e46198c5b993e5de9ff60c1 | |
parent | 290aa376a6669d4cec22d9db5695f0036e218132 (diff) |
scsi: be2iscsi: Remove alloc_mcc_tag & beiscsi_pci_soft_reset
alloc_mcc_tag was replaced with alloc_mcc_wrb and is no more used.
beiscsi_pci_soft_reset is not used at all and won't be needed.
Signed-off-by: Jitendra Bhivare <jitendra.bhivare@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/be2iscsi/be_cmds.c | 76 | ||||
-rw-r--r-- | drivers/scsi/be2iscsi/be_cmds.h | 1 |
2 files changed, 0 insertions, 77 deletions
diff --git a/drivers/scsi/be2iscsi/be_cmds.c b/drivers/scsi/be2iscsi/be_cmds.c index 59b8e2dc3aca..403296239ae9 100644 --- a/drivers/scsi/be2iscsi/be_cmds.c +++ b/drivers/scsi/be2iscsi/be_cmds.c | |||
@@ -21,60 +21,6 @@ | |||
21 | #include "be.h" | 21 | #include "be.h" |
22 | #include "be_mgmt.h" | 22 | #include "be_mgmt.h" |
23 | 23 | ||
24 | int beiscsi_pci_soft_reset(struct beiscsi_hba *phba) | ||
25 | { | ||
26 | u32 sreset; | ||
27 | u8 *pci_reset_offset = 0; | ||
28 | u8 *pci_online0_offset = 0; | ||
29 | u8 *pci_online1_offset = 0; | ||
30 | u32 pconline0 = 0; | ||
31 | u32 pconline1 = 0; | ||
32 | u32 i; | ||
33 | |||
34 | pci_reset_offset = (u8 *)phba->pci_va + BE2_SOFT_RESET; | ||
35 | pci_online0_offset = (u8 *)phba->pci_va + BE2_PCI_ONLINE0; | ||
36 | pci_online1_offset = (u8 *)phba->pci_va + BE2_PCI_ONLINE1; | ||
37 | sreset = readl((void *)pci_reset_offset); | ||
38 | sreset |= BE2_SET_RESET; | ||
39 | writel(sreset, (void *)pci_reset_offset); | ||
40 | |||
41 | i = 0; | ||
42 | while (sreset & BE2_SET_RESET) { | ||
43 | if (i > 64) | ||
44 | break; | ||
45 | msleep(100); | ||
46 | sreset = readl((void *)pci_reset_offset); | ||
47 | i++; | ||
48 | } | ||
49 | |||
50 | if (sreset & BE2_SET_RESET) { | ||
51 | printk(KERN_ERR DRV_NAME | ||
52 | " Soft Reset did not deassert\n"); | ||
53 | return -EIO; | ||
54 | } | ||
55 | pconline1 = BE2_MPU_IRAM_ONLINE; | ||
56 | writel(pconline0, (void *)pci_online0_offset); | ||
57 | writel(pconline1, (void *)pci_online1_offset); | ||
58 | |||
59 | sreset |= BE2_SET_RESET; | ||
60 | writel(sreset, (void *)pci_reset_offset); | ||
61 | |||
62 | i = 0; | ||
63 | while (sreset & BE2_SET_RESET) { | ||
64 | if (i > 64) | ||
65 | break; | ||
66 | msleep(1); | ||
67 | sreset = readl((void *)pci_reset_offset); | ||
68 | i++; | ||
69 | } | ||
70 | if (sreset & BE2_SET_RESET) { | ||
71 | printk(KERN_ERR DRV_NAME | ||
72 | " MPU Online Soft Reset did not deassert\n"); | ||
73 | return -EIO; | ||
74 | } | ||
75 | return 0; | ||
76 | } | ||
77 | |||
78 | int be_chk_reset_complete(struct beiscsi_hba *phba) | 24 | int be_chk_reset_complete(struct beiscsi_hba *phba) |
79 | { | 25 | { |
80 | unsigned int num_loop; | 26 | unsigned int num_loop; |
@@ -104,28 +50,6 @@ int be_chk_reset_complete(struct beiscsi_hba *phba) | |||
104 | return 0; | 50 | return 0; |
105 | } | 51 | } |
106 | 52 | ||
107 | unsigned int alloc_mcc_tag(struct beiscsi_hba *phba) | ||
108 | { | ||
109 | unsigned int tag = 0; | ||
110 | |||
111 | spin_lock(&phba->ctrl.mcc_lock); | ||
112 | if (phba->ctrl.mcc_tag_available) { | ||
113 | tag = phba->ctrl.mcc_tag[phba->ctrl.mcc_alloc_index]; | ||
114 | phba->ctrl.mcc_tag[phba->ctrl.mcc_alloc_index] = 0; | ||
115 | phba->ctrl.mcc_tag_status[tag] = 0; | ||
116 | phba->ctrl.ptag_state[tag].tag_state = 0; | ||
117 | } | ||
118 | if (tag) { | ||
119 | phba->ctrl.mcc_tag_available--; | ||
120 | if (phba->ctrl.mcc_alloc_index == (MAX_MCC_CMD - 1)) | ||
121 | phba->ctrl.mcc_alloc_index = 0; | ||
122 | else | ||
123 | phba->ctrl.mcc_alloc_index++; | ||
124 | } | ||
125 | spin_unlock(&phba->ctrl.mcc_lock); | ||
126 | return tag; | ||
127 | } | ||
128 | |||
129 | struct be_mcc_wrb *alloc_mcc_wrb(struct beiscsi_hba *phba, | 53 | struct be_mcc_wrb *alloc_mcc_wrb(struct beiscsi_hba *phba, |
130 | unsigned int *ref_tag) | 54 | unsigned int *ref_tag) |
131 | { | 55 | { |
diff --git a/drivers/scsi/be2iscsi/be_cmds.h b/drivers/scsi/be2iscsi/be_cmds.h index a4bc83cbec9e..c50b74afd00a 100644 --- a/drivers/scsi/be2iscsi/be_cmds.h +++ b/drivers/scsi/be2iscsi/be_cmds.h | |||
@@ -1376,7 +1376,6 @@ struct be_cmd_get_port_name { | |||
1376 | * the cxn | 1376 | * the cxn |
1377 | */ | 1377 | */ |
1378 | 1378 | ||
1379 | int beiscsi_pci_soft_reset(struct beiscsi_hba *phba); | ||
1380 | int be_chk_reset_complete(struct beiscsi_hba *phba); | 1379 | int be_chk_reset_complete(struct beiscsi_hba *phba); |
1381 | 1380 | ||
1382 | void be_wrb_hdr_prepare(struct be_mcc_wrb *wrb, int payload_len, | 1381 | void be_wrb_hdr_prepare(struct be_mcc_wrb *wrb, int payload_len, |