aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2012-03-07 13:35:38 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-03-08 18:35:15 -0500
commit7834799a6c8fed36d06d6b78bfd17831ecfa93c4 (patch)
treeeee30cb0664c680b6e40d56e7787d5e31421ebdf
parente92a665949f6fabd2d25708e00239866f91a644f (diff)
powerpc: remove the legacy iSeries part of ibmvscsi
The PowerPC legacy iSeries platform is being removed and this code is no longer selectable. There is more clean up that can be done, but this just gets the old code out of the way. Cc: "James E.J. Bottomley" <JBottomley@parallels.com> Cc: Brian King <brking@linux.vnet.ibm.com> Cc: linux-scsi@vger.kernel.org Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r--drivers/scsi/Kconfig3
-rw-r--r--drivers/scsi/ibmvscsi/Makefile1
-rw-r--r--drivers/scsi/ibmvscsi/ibmvscsi.c12
-rw-r--r--drivers/scsi/ibmvscsi/ibmvscsi.h1
-rw-r--r--drivers/scsi/ibmvscsi/iseries_vscsi.c173
5 files changed, 3 insertions, 187 deletions
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index 16570aa84aac..e38d843a2915 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -967,9 +967,8 @@ config SCSI_IPS
967 967
968config SCSI_IBMVSCSI 968config SCSI_IBMVSCSI
969 tristate "IBM Virtual SCSI support" 969 tristate "IBM Virtual SCSI support"
970 depends on PPC_PSERIES || PPC_ISERIES 970 depends on PPC_PSERIES
971 select SCSI_SRP_ATTRS 971 select SCSI_SRP_ATTRS
972 select VIOPATH if PPC_ISERIES
973 help 972 help
974 This is the IBM POWER Virtual SCSI Client 973 This is the IBM POWER Virtual SCSI Client
975 974
diff --git a/drivers/scsi/ibmvscsi/Makefile b/drivers/scsi/ibmvscsi/Makefile
index a423d9633625..ff5b5c5538ee 100644
--- a/drivers/scsi/ibmvscsi/Makefile
+++ b/drivers/scsi/ibmvscsi/Makefile
@@ -1,7 +1,6 @@
1obj-$(CONFIG_SCSI_IBMVSCSI) += ibmvscsic.o 1obj-$(CONFIG_SCSI_IBMVSCSI) += ibmvscsic.o
2 2
3ibmvscsic-y += ibmvscsi.o 3ibmvscsic-y += ibmvscsi.o
4ibmvscsic-$(CONFIG_PPC_ISERIES) += iseries_vscsi.o
5ibmvscsic-$(CONFIG_PPC_PSERIES) += rpa_vscsi.o 4ibmvscsic-$(CONFIG_PPC_PSERIES) += rpa_vscsi.o
6 5
7obj-$(CONFIG_SCSI_IBMVSCSIS) += ibmvstgt.o 6obj-$(CONFIG_SCSI_IBMVSCSIS) += ibmvstgt.o
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
index 3d391dc3f11f..e984951baeb6 100644
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
@@ -55,13 +55,7 @@
55 * and sends a CRQ message back to inform the client that the request has 55 * and sends a CRQ message back to inform the client that the request has
56 * completed. 56 * completed.
57 * 57 *
58 * Note that some of the underlying infrastructure is different between 58 * TODO: This is currently pretty tied to the IBM pSeries hypervisor
59 * machines conforming to the "RS/6000 Platform Architecture" (RPA) and
60 * the older iSeries hypervisor models. To support both, some low level
61 * routines have been broken out into rpa_vscsi.c and iseries_vscsi.c.
62 * The Makefile should pick one, not two, not zero, of these.
63 *
64 * TODO: This is currently pretty tied to the IBM i/pSeries hypervisor
65 * interfaces. It would be really nice to abstract this above an RDMA 59 * interfaces. It would be really nice to abstract this above an RDMA
66 * layer. 60 * layer.
67 */ 61 */
@@ -2085,9 +2079,7 @@ int __init ibmvscsi_module_init(void)
2085 driver_template.can_queue = max_requests; 2079 driver_template.can_queue = max_requests;
2086 max_events = max_requests + 2; 2080 max_events = max_requests + 2;
2087 2081
2088 if (firmware_has_feature(FW_FEATURE_ISERIES)) 2082 if (firmware_has_feature(FW_FEATURE_VIO))
2089 ibmvscsi_ops = &iseriesvscsi_ops;
2090 else if (firmware_has_feature(FW_FEATURE_VIO))
2091 ibmvscsi_ops = &rpavscsi_ops; 2083 ibmvscsi_ops = &rpavscsi_ops;
2092 else 2084 else
2093 return -ENODEV; 2085 return -ENODEV;
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.h b/drivers/scsi/ibmvscsi/ibmvscsi.h
index 02197a2b22b9..c503e1776014 100644
--- a/drivers/scsi/ibmvscsi/ibmvscsi.h
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.h
@@ -127,7 +127,6 @@ struct ibmvscsi_ops {
127 int (*resume) (struct ibmvscsi_host_data *hostdata); 127 int (*resume) (struct ibmvscsi_host_data *hostdata);
128}; 128};
129 129
130extern struct ibmvscsi_ops iseriesvscsi_ops;
131extern struct ibmvscsi_ops rpavscsi_ops; 130extern struct ibmvscsi_ops rpavscsi_ops;
132 131
133#endif /* IBMVSCSI_H */ 132#endif /* IBMVSCSI_H */
diff --git a/drivers/scsi/ibmvscsi/iseries_vscsi.c b/drivers/scsi/ibmvscsi/iseries_vscsi.c
deleted file mode 100644
index f4776451a754..000000000000
--- a/drivers/scsi/ibmvscsi/iseries_vscsi.c
+++ /dev/null
@@ -1,173 +0,0 @@
1/* ------------------------------------------------------------
2 * iSeries_vscsi.c
3 * (C) Copyright IBM Corporation 1994, 2003
4 * Authors: Colin DeVilbiss (devilbis@us.ibm.com)
5 * Santiago Leon (santil@us.ibm.com)
6 * Dave Boutcher (sleddog@us.ibm.com)
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21 * USA
22 *
23 * ------------------------------------------------------------
24 * iSeries-specific functions of the SCSI host adapter for Virtual I/O devices
25 *
26 * This driver allows the Linux SCSI peripheral drivers to directly
27 * access devices in the hosting partition, either on an iSeries
28 * hypervisor system or a converged hypervisor system.
29 */
30
31#include <asm/iseries/vio.h>
32#include <asm/iseries/hv_lp_event.h>
33#include <asm/iseries/hv_types.h>
34#include <asm/iseries/hv_lp_config.h>
35#include <asm/vio.h>
36#include <linux/device.h>
37#include "ibmvscsi.h"
38
39/* global variables */
40static struct ibmvscsi_host_data *single_host_data;
41
42/* ------------------------------------------------------------
43 * Routines for direct interpartition interaction
44 */
45struct srp_lp_event {
46 struct HvLpEvent lpevt; /* 0x00-0x17 */
47 u32 reserved1; /* 0x18-0x1B; unused */
48 u16 version; /* 0x1C-0x1D; unused */
49 u16 subtype_rc; /* 0x1E-0x1F; unused */
50 struct viosrp_crq crq; /* 0x20-0x3F */
51};
52
53/**
54 * standard interface for handling logical partition events.
55 */
56static void iseriesvscsi_handle_event(struct HvLpEvent *lpevt)
57{
58 struct srp_lp_event *evt = (struct srp_lp_event *)lpevt;
59
60 if (!evt) {
61 printk(KERN_ERR "ibmvscsi: received null event\n");
62 return;
63 }
64
65 if (single_host_data == NULL) {
66 printk(KERN_ERR
67 "ibmvscsi: received event, no adapter present\n");
68 return;
69 }
70
71 ibmvscsi_handle_crq(&evt->crq, single_host_data);
72}
73
74/* ------------------------------------------------------------
75 * Routines for driver initialization
76 */
77static int iseriesvscsi_init_crq_queue(struct crq_queue *queue,
78 struct ibmvscsi_host_data *hostdata,
79 int max_requests)
80{
81 int rc;
82
83 single_host_data = hostdata;
84 rc = viopath_open(viopath_hostLp, viomajorsubtype_scsi, max_requests);
85 if (rc < 0) {
86 printk("viopath_open failed with rc %d in open_event_path\n",
87 rc);
88 goto viopath_open_failed;
89 }
90
91 rc = vio_setHandler(viomajorsubtype_scsi, iseriesvscsi_handle_event);
92 if (rc < 0) {
93 printk("vio_setHandler failed with rc %d in open_event_path\n",
94 rc);
95 goto vio_setHandler_failed;
96 }
97 return 0;
98
99 vio_setHandler_failed:
100 viopath_close(viopath_hostLp, viomajorsubtype_scsi, max_requests);
101 viopath_open_failed:
102 return -1;
103}
104
105static void iseriesvscsi_release_crq_queue(struct crq_queue *queue,
106 struct ibmvscsi_host_data *hostdata,
107 int max_requests)
108{
109 vio_clearHandler(viomajorsubtype_scsi);
110 viopath_close(viopath_hostLp, viomajorsubtype_scsi, max_requests);
111}
112
113/**
114 * reset_crq_queue: - resets a crq after a failure
115 * @queue: crq_queue to initialize and register
116 * @hostdata: ibmvscsi_host_data of host
117 *
118 * no-op for iSeries
119 */
120static int iseriesvscsi_reset_crq_queue(struct crq_queue *queue,
121 struct ibmvscsi_host_data *hostdata)
122{
123 return 0;
124}
125
126/**
127 * reenable_crq_queue: - reenables a crq after a failure
128 * @queue: crq_queue to initialize and register
129 * @hostdata: ibmvscsi_host_data of host
130 *
131 * no-op for iSeries
132 */
133static int iseriesvscsi_reenable_crq_queue(struct crq_queue *queue,
134 struct ibmvscsi_host_data *hostdata)
135{
136 return 0;
137}
138
139/**
140 * iseriesvscsi_send_crq: - Send a CRQ
141 * @hostdata: the adapter
142 * @word1: the first 64 bits of the data
143 * @word2: the second 64 bits of the data
144 */
145static int iseriesvscsi_send_crq(struct ibmvscsi_host_data *hostdata,
146 u64 word1, u64 word2)
147{
148 single_host_data = hostdata;
149 return HvCallEvent_signalLpEventFast(viopath_hostLp,
150 HvLpEvent_Type_VirtualIo,
151 viomajorsubtype_scsi,
152 HvLpEvent_AckInd_NoAck,
153 HvLpEvent_AckType_ImmediateAck,
154 viopath_sourceinst(viopath_hostLp),
155 viopath_targetinst(viopath_hostLp),
156 0,
157 VIOVERSION << 16, word1, word2, 0,
158 0);
159}
160
161static int iseriesvscsi_resume(struct ibmvscsi_host_data *hostdata)
162{
163 return 0;
164}
165
166struct ibmvscsi_ops iseriesvscsi_ops = {
167 .init_crq_queue = iseriesvscsi_init_crq_queue,
168 .release_crq_queue = iseriesvscsi_release_crq_queue,
169 .reset_crq_queue = iseriesvscsi_reset_crq_queue,
170 .reenable_crq_queue = iseriesvscsi_reenable_crq_queue,
171 .send_crq = iseriesvscsi_send_crq,
172 .resume = iseriesvscsi_resume,
173};