blob: d7ce3933b1dbd8bf634c4da1d44c2f6eb3a5cd57 [file] [log] [blame]
Hank Janssenbef4a342009-07-13 16:01:31 -07001/*
Hank Janssenbef4a342009-07-13 16:01:31 -07002 * Copyright (c) 2009, Microsoft Corporation.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
15 * Place - Suite 330, Boston, MA 02111-1307 USA.
16 *
17 * Authors:
18 * Haiyang Zhang <haiyangz@microsoft.com>
19 * Hank Janssen <hjanssen@microsoft.com>
Hank Janssenbef4a342009-07-13 16:01:31 -070020 */
Greg Kroah-Hartman5654e932009-07-14 15:08:20 -070021#include <linux/kernel.h>
K. Y. Srinivasan0c3b7b22011-02-11 09:59:43 -080022#include <linux/sched.h>
K. Y. Srinivasan939584652011-03-28 09:33:30 -070023#include <linux/completion.h>
Greg Kroah-Hartman0ffa63b2009-07-15 11:06:01 -070024#include <linux/string.h>
Tejun Heo5a0e3ad2010-03-24 17:04:11 +090025#include <linux/slab.h>
Greg Kroah-Hartman0ffa63b2009-07-15 11:06:01 -070026#include <linux/mm.h>
Greg Kroah-Hartmanb4362c92009-07-16 11:50:41 -070027#include <linux/delay.h>
K. Y. Srinivasane3fe0bb2011-02-11 10:00:12 -080028#include "hv_api.h"
Greg Kroah-Hartman645954c2009-08-28 16:22:59 -070029#include "logging.h"
Greg Kroah-Hartmanbb969792010-05-05 22:40:43 -070030#include "storvsc_api.h"
Greg Kroah-Hartmanf8e5add2010-05-05 22:50:11 -070031#include "vmbus_packet_format.h"
Greg Kroah-Hartman2dd88b52009-08-27 15:58:52 -070032#include "vstorage.h"
Greg Kroah-Hartman50ea95d2010-10-21 09:15:14 -070033#include "channel.h"
Hank Janssenbef4a342009-07-13 16:01:31 -070034
35
Hank Janssenf6388592010-12-06 12:26:49 -080036static inline struct storvsc_device *alloc_stor_device(struct hv_device *device)
Hank Janssenbef4a342009-07-13 16:01:31 -070037{
Hank Janssenf6388592010-12-06 12:26:49 -080038 struct storvsc_device *stor_device;
Hank Janssenbef4a342009-07-13 16:01:31 -070039
Hank Janssenf6388592010-12-06 12:26:49 -080040 stor_device = kzalloc(sizeof(struct storvsc_device), GFP_KERNEL);
41 if (!stor_device)
Hank Janssenbef4a342009-07-13 16:01:31 -070042 return NULL;
43
Bill Pemberton454f18a2009-07-27 16:47:24 -040044 /* Set to 2 to allow both inbound and outbound traffics */
Hank Janssen3d8cdf22010-12-06 12:26:47 -080045 /* (ie get_stor_device() and must_get_stor_device()) to proceed. */
Hank Janssenf6388592010-12-06 12:26:49 -080046 atomic_cmpxchg(&stor_device->ref_count, 0, 2);
Hank Janssenbef4a342009-07-13 16:01:31 -070047
Hank Janssenf6388592010-12-06 12:26:49 -080048 stor_device->device = device;
Haiyang Zhangca623ad2011-01-26 12:12:11 -080049 device->ext = stor_device;
Hank Janssenbef4a342009-07-13 16:01:31 -070050
Hank Janssenf6388592010-12-06 12:26:49 -080051 return stor_device;
Hank Janssenbef4a342009-07-13 16:01:31 -070052}
53
Hank Janssenf6388592010-12-06 12:26:49 -080054static inline void free_stor_device(struct storvsc_device *device)
Hank Janssenbef4a342009-07-13 16:01:31 -070055{
Hank Janssenf6388592010-12-06 12:26:49 -080056 kfree(device);
Hank Janssenbef4a342009-07-13 16:01:31 -070057}
58
Bill Pemberton454f18a2009-07-27 16:47:24 -040059/* Get the stordevice object iff exists and its refcount > 0 */
Hank Janssen02e37db2010-12-06 12:26:48 -080060static inline struct storvsc_device *must_get_stor_device(
Hank Janssenf6388592010-12-06 12:26:49 -080061 struct hv_device *device)
Hank Janssenbef4a342009-07-13 16:01:31 -070062{
Hank Janssenf6388592010-12-06 12:26:49 -080063 struct storvsc_device *stor_device;
Hank Janssenbef4a342009-07-13 16:01:31 -070064
Haiyang Zhangca623ad2011-01-26 12:12:11 -080065 stor_device = (struct storvsc_device *)device->ext;
Hank Janssenf6388592010-12-06 12:26:49 -080066 if (stor_device && atomic_read(&stor_device->ref_count))
67 atomic_inc(&stor_device->ref_count);
Hank Janssenbef4a342009-07-13 16:01:31 -070068 else
Hank Janssenf6388592010-12-06 12:26:49 -080069 stor_device = NULL;
Hank Janssenbef4a342009-07-13 16:01:31 -070070
Hank Janssenf6388592010-12-06 12:26:49 -080071 return stor_device;
Hank Janssenbef4a342009-07-13 16:01:31 -070072}
73
Hank Janssen02e37db2010-12-06 12:26:48 -080074/* Drop ref count to 1 to effectively disable get_stor_device() */
75static inline struct storvsc_device *release_stor_device(
Hank Janssenf6388592010-12-06 12:26:49 -080076 struct hv_device *device)
Hank Janssenbef4a342009-07-13 16:01:31 -070077{
Hank Janssenf6388592010-12-06 12:26:49 -080078 struct storvsc_device *stor_device;
Hank Janssenbef4a342009-07-13 16:01:31 -070079
Haiyang Zhangca623ad2011-01-26 12:12:11 -080080 stor_device = (struct storvsc_device *)device->ext;
Hank Janssenbef4a342009-07-13 16:01:31 -070081
Bill Pemberton454f18a2009-07-27 16:47:24 -040082 /* Busy wait until the ref drop to 2, then set it to 1 */
Hank Janssenf6388592010-12-06 12:26:49 -080083 while (atomic_cmpxchg(&stor_device->ref_count, 2, 1) != 2)
Greg Kroah-Hartmanb4362c92009-07-16 11:50:41 -070084 udelay(100);
Hank Janssenbef4a342009-07-13 16:01:31 -070085
Hank Janssenf6388592010-12-06 12:26:49 -080086 return stor_device;
Hank Janssenbef4a342009-07-13 16:01:31 -070087}
88
Hank Janssenf6388592010-12-06 12:26:49 -080089/* Drop ref count to 0. No one can use stor_device object. */
Hank Janssen02e37db2010-12-06 12:26:48 -080090static inline struct storvsc_device *final_release_stor_device(
Hank Janssenf6388592010-12-06 12:26:49 -080091 struct hv_device *device)
Hank Janssenbef4a342009-07-13 16:01:31 -070092{
Hank Janssenf6388592010-12-06 12:26:49 -080093 struct storvsc_device *stor_device;
Hank Janssenbef4a342009-07-13 16:01:31 -070094
Haiyang Zhangca623ad2011-01-26 12:12:11 -080095 stor_device = (struct storvsc_device *)device->ext;
Hank Janssenbef4a342009-07-13 16:01:31 -070096
Bill Pemberton454f18a2009-07-27 16:47:24 -040097 /* Busy wait until the ref drop to 1, then set it to 0 */
Hank Janssenf6388592010-12-06 12:26:49 -080098 while (atomic_cmpxchg(&stor_device->ref_count, 1, 0) != 1)
Greg Kroah-Hartmanb4362c92009-07-16 11:50:41 -070099 udelay(100);
Hank Janssenbef4a342009-07-13 16:01:31 -0700100
Haiyang Zhangca623ad2011-01-26 12:12:11 -0800101 device->ext = NULL;
Hank Janssenf6388592010-12-06 12:26:49 -0800102 return stor_device;
Hank Janssenbef4a342009-07-13 16:01:31 -0700103}
104
Hank Janssenf6388592010-12-06 12:26:49 -0800105static int stor_vsc_channel_init(struct hv_device *device)
Hank Janssenbef4a342009-07-13 16:01:31 -0700106{
Hank Janssenf6388592010-12-06 12:26:49 -0800107 struct storvsc_device *stor_device;
K. Y. Srinivasand7a1bdb2011-03-28 09:33:44 -0700108 struct hv_storvsc_request *request;
Hank Janssenf6388592010-12-06 12:26:49 -0800109 struct vstor_packet *vstor_packet;
K. Y. Srinivasan939584652011-03-28 09:33:30 -0700110 int ret, t;
Hank Janssenbef4a342009-07-13 16:01:31 -0700111
Hank Janssenf6388592010-12-06 12:26:49 -0800112 stor_device = get_stor_device(device);
113 if (!stor_device) {
Greg Kroah-Hartman068c5df2009-08-31 22:25:48 -0700114 DPRINT_ERR(STORVSC, "unable to get stor device..."
115 "device being destroyed?");
Hank Janssenbef4a342009-07-13 16:01:31 -0700116 return -1;
117 }
118
Hank Janssenf6388592010-12-06 12:26:49 -0800119 request = &stor_device->init_request;
120 vstor_packet = &request->vstor_packet;
Hank Janssenbef4a342009-07-13 16:01:31 -0700121
Greg Kroah-Hartman068c5df2009-08-31 22:25:48 -0700122 /*
123 * Now, initiate the vsc/vsp initialization protocol on the open
124 * channel
125 */
K. Y. Srinivasand7a1bdb2011-03-28 09:33:44 -0700126 memset(request, 0, sizeof(struct hv_storvsc_request));
K. Y. Srinivasan939584652011-03-28 09:33:30 -0700127 init_completion(&request->wait_event);
Hank Janssenf6388592010-12-06 12:26:49 -0800128 vstor_packet->operation = VSTOR_OPERATION_BEGIN_INITIALIZATION;
129 vstor_packet->flags = REQUEST_COMPLETION_FLAG;
Hank Janssenbef4a342009-07-13 16:01:31 -0700130
Hank Janssenbef4a342009-07-13 16:01:31 -0700131 DPRINT_INFO(STORVSC, "BEGIN_INITIALIZATION_OPERATION...");
132
Hank Janssenf6388592010-12-06 12:26:49 -0800133 ret = vmbus_sendpacket(device->channel, vstor_packet,
Greg Kroah-Hartmanb60d71e2010-10-21 09:43:56 -0700134 sizeof(struct vstor_packet),
135 (unsigned long)request,
Haiyang Zhang415f2282011-01-26 12:12:13 -0800136 VM_PKT_DATA_INBAND,
Greg Kroah-Hartmanb60d71e2010-10-21 09:43:56 -0700137 VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
Greg Kroah-Hartman068c5df2009-08-31 22:25:48 -0700138 if (ret != 0) {
139 DPRINT_ERR(STORVSC,
140 "unable to send BEGIN_INITIALIZATION_OPERATION");
K. Y. Srinivasan0c3b7b22011-02-11 09:59:43 -0800141 goto cleanup;
Hank Janssenbef4a342009-07-13 16:01:31 -0700142 }
143
K. Y. Srinivasan939584652011-03-28 09:33:30 -0700144 t = wait_for_completion_timeout(&request->wait_event, HZ);
145 if (t == 0) {
K. Y. Srinivasan0c3b7b22011-02-11 09:59:43 -0800146 ret = -ETIMEDOUT;
147 goto cleanup;
148 }
149
Hank Janssenf6388592010-12-06 12:26:49 -0800150 if (vstor_packet->operation != VSTOR_OPERATION_COMPLETE_IO ||
151 vstor_packet->status != 0) {
Greg Kroah-Hartman068c5df2009-08-31 22:25:48 -0700152 DPRINT_ERR(STORVSC, "BEGIN_INITIALIZATION_OPERATION failed "
153 "(op %d status 0x%x)",
Hank Janssenf6388592010-12-06 12:26:49 -0800154 vstor_packet->operation, vstor_packet->status);
K. Y. Srinivasan0c3b7b22011-02-11 09:59:43 -0800155 goto cleanup;
Hank Janssenbef4a342009-07-13 16:01:31 -0700156 }
157
158 DPRINT_INFO(STORVSC, "QUERY_PROTOCOL_VERSION_OPERATION...");
159
Bill Pemberton454f18a2009-07-27 16:47:24 -0400160 /* reuse the packet for version range supported */
Hank Janssenf6388592010-12-06 12:26:49 -0800161 memset(vstor_packet, 0, sizeof(struct vstor_packet));
162 vstor_packet->operation = VSTOR_OPERATION_QUERY_PROTOCOL_VERSION;
163 vstor_packet->flags = REQUEST_COMPLETION_FLAG;
Hank Janssenbef4a342009-07-13 16:01:31 -0700164
Hank Janssenf6388592010-12-06 12:26:49 -0800165 vstor_packet->version.major_minor = VMSTOR_PROTOCOL_VERSION_CURRENT;
166 FILL_VMSTOR_REVISION(vstor_packet->version.revision);
Hank Janssenbef4a342009-07-13 16:01:31 -0700167
Hank Janssenf6388592010-12-06 12:26:49 -0800168 ret = vmbus_sendpacket(device->channel, vstor_packet,
Greg Kroah-Hartmanb60d71e2010-10-21 09:43:56 -0700169 sizeof(struct vstor_packet),
170 (unsigned long)request,
Haiyang Zhang415f2282011-01-26 12:12:13 -0800171 VM_PKT_DATA_INBAND,
Greg Kroah-Hartmanb60d71e2010-10-21 09:43:56 -0700172 VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
Greg Kroah-Hartman068c5df2009-08-31 22:25:48 -0700173 if (ret != 0) {
174 DPRINT_ERR(STORVSC,
175 "unable to send BEGIN_INITIALIZATION_OPERATION");
K. Y. Srinivasan0c3b7b22011-02-11 09:59:43 -0800176 goto cleanup;
Hank Janssenbef4a342009-07-13 16:01:31 -0700177 }
178
K. Y. Srinivasan939584652011-03-28 09:33:30 -0700179 t = wait_for_completion_timeout(&request->wait_event, HZ);
180 if (t == 0) {
K. Y. Srinivasan0c3b7b22011-02-11 09:59:43 -0800181 ret = -ETIMEDOUT;
182 goto cleanup;
183 }
Hank Janssenbef4a342009-07-13 16:01:31 -0700184
Bill Pemberton454f18a2009-07-27 16:47:24 -0400185 /* TODO: Check returned version */
Hank Janssenf6388592010-12-06 12:26:49 -0800186 if (vstor_packet->operation != VSTOR_OPERATION_COMPLETE_IO ||
187 vstor_packet->status != 0) {
Greg Kroah-Hartman068c5df2009-08-31 22:25:48 -0700188 DPRINT_ERR(STORVSC, "QUERY_PROTOCOL_VERSION_OPERATION failed "
189 "(op %d status 0x%x)",
Hank Janssenf6388592010-12-06 12:26:49 -0800190 vstor_packet->operation, vstor_packet->status);
K. Y. Srinivasan0c3b7b22011-02-11 09:59:43 -0800191 goto cleanup;
Hank Janssenbef4a342009-07-13 16:01:31 -0700192 }
193
Bill Pemberton454f18a2009-07-27 16:47:24 -0400194 /* Query channel properties */
Hank Janssenbef4a342009-07-13 16:01:31 -0700195 DPRINT_INFO(STORVSC, "QUERY_PROPERTIES_OPERATION...");
196
Hank Janssenf6388592010-12-06 12:26:49 -0800197 memset(vstor_packet, 0, sizeof(struct vstor_packet));
198 vstor_packet->operation = VSTOR_OPERATION_QUERY_PROPERTIES;
199 vstor_packet->flags = REQUEST_COMPLETION_FLAG;
200 vstor_packet->storage_channel_properties.port_number =
201 stor_device->port_number;
Hank Janssenbef4a342009-07-13 16:01:31 -0700202
Hank Janssenf6388592010-12-06 12:26:49 -0800203 ret = vmbus_sendpacket(device->channel, vstor_packet,
Greg Kroah-Hartmanb60d71e2010-10-21 09:43:56 -0700204 sizeof(struct vstor_packet),
205 (unsigned long)request,
Haiyang Zhang415f2282011-01-26 12:12:13 -0800206 VM_PKT_DATA_INBAND,
Greg Kroah-Hartmanb60d71e2010-10-21 09:43:56 -0700207 VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
Hank Janssenbef4a342009-07-13 16:01:31 -0700208
Greg Kroah-Hartman068c5df2009-08-31 22:25:48 -0700209 if (ret != 0) {
210 DPRINT_ERR(STORVSC,
211 "unable to send QUERY_PROPERTIES_OPERATION");
K. Y. Srinivasan0c3b7b22011-02-11 09:59:43 -0800212 goto cleanup;
Hank Janssenbef4a342009-07-13 16:01:31 -0700213 }
214
K. Y. Srinivasan939584652011-03-28 09:33:30 -0700215 t = wait_for_completion_timeout(&request->wait_event, HZ);
216 if (t == 0) {
K. Y. Srinivasan0c3b7b22011-02-11 09:59:43 -0800217 ret = -ETIMEDOUT;
218 goto cleanup;
219 }
Hank Janssenbef4a342009-07-13 16:01:31 -0700220
Bill Pemberton454f18a2009-07-27 16:47:24 -0400221 /* TODO: Check returned version */
Hank Janssenf6388592010-12-06 12:26:49 -0800222 if (vstor_packet->operation != VSTOR_OPERATION_COMPLETE_IO ||
223 vstor_packet->status != 0) {
Greg Kroah-Hartman068c5df2009-08-31 22:25:48 -0700224 DPRINT_ERR(STORVSC, "QUERY_PROPERTIES_OPERATION failed "
225 "(op %d status 0x%x)",
Hank Janssenf6388592010-12-06 12:26:49 -0800226 vstor_packet->operation, vstor_packet->status);
K. Y. Srinivasan0c3b7b22011-02-11 09:59:43 -0800227 goto cleanup;
Hank Janssenbef4a342009-07-13 16:01:31 -0700228 }
229
Hank Janssenf6388592010-12-06 12:26:49 -0800230 stor_device->path_id = vstor_packet->storage_channel_properties.path_id;
231 stor_device->target_id
232 = vstor_packet->storage_channel_properties.target_id;
Hank Janssenbef4a342009-07-13 16:01:31 -0700233
Greg Kroah-Hartman068c5df2009-08-31 22:25:48 -0700234 DPRINT_DBG(STORVSC, "channel flag 0x%x, max xfer len 0x%x",
Hank Janssenf6388592010-12-06 12:26:49 -0800235 vstor_packet->storage_channel_properties.flags,
236 vstor_packet->storage_channel_properties.max_transfer_bytes);
Hank Janssenbef4a342009-07-13 16:01:31 -0700237
238 DPRINT_INFO(STORVSC, "END_INITIALIZATION_OPERATION...");
239
Hank Janssenf6388592010-12-06 12:26:49 -0800240 memset(vstor_packet, 0, sizeof(struct vstor_packet));
241 vstor_packet->operation = VSTOR_OPERATION_END_INITIALIZATION;
242 vstor_packet->flags = REQUEST_COMPLETION_FLAG;
Hank Janssenbef4a342009-07-13 16:01:31 -0700243
Hank Janssenf6388592010-12-06 12:26:49 -0800244 ret = vmbus_sendpacket(device->channel, vstor_packet,
Greg Kroah-Hartmanb60d71e2010-10-21 09:43:56 -0700245 sizeof(struct vstor_packet),
246 (unsigned long)request,
Haiyang Zhang415f2282011-01-26 12:12:13 -0800247 VM_PKT_DATA_INBAND,
Greg Kroah-Hartmanb60d71e2010-10-21 09:43:56 -0700248 VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
Hank Janssenbef4a342009-07-13 16:01:31 -0700249
Greg Kroah-Hartman068c5df2009-08-31 22:25:48 -0700250 if (ret != 0) {
251 DPRINT_ERR(STORVSC,
252 "unable to send END_INITIALIZATION_OPERATION");
K. Y. Srinivasan0c3b7b22011-02-11 09:59:43 -0800253 goto cleanup;
Hank Janssenbef4a342009-07-13 16:01:31 -0700254 }
255
K. Y. Srinivasan939584652011-03-28 09:33:30 -0700256 t = wait_for_completion_timeout(&request->wait_event, HZ);
257 if (t == 0) {
K. Y. Srinivasan0c3b7b22011-02-11 09:59:43 -0800258 ret = -ETIMEDOUT;
259 goto cleanup;
260 }
Hank Janssenbef4a342009-07-13 16:01:31 -0700261
Hank Janssenf6388592010-12-06 12:26:49 -0800262 if (vstor_packet->operation != VSTOR_OPERATION_COMPLETE_IO ||
263 vstor_packet->status != 0) {
Greg Kroah-Hartman068c5df2009-08-31 22:25:48 -0700264 DPRINT_ERR(STORVSC, "END_INITIALIZATION_OPERATION failed "
265 "(op %d status 0x%x)",
Hank Janssenf6388592010-12-06 12:26:49 -0800266 vstor_packet->operation, vstor_packet->status);
K. Y. Srinivasan0c3b7b22011-02-11 09:59:43 -0800267 goto cleanup;
Hank Janssenbef4a342009-07-13 16:01:31 -0700268 }
269
270 DPRINT_INFO(STORVSC, "**** storage channel up and running!! ****");
271
K. Y. Srinivasan0c3b7b22011-02-11 09:59:43 -0800272cleanup:
Hank Janssenf6388592010-12-06 12:26:49 -0800273 put_stor_device(device);
Hank Janssenbef4a342009-07-13 16:01:31 -0700274 return ret;
275}
276
Hank Janssenf6388592010-12-06 12:26:49 -0800277static void stor_vsc_on_io_completion(struct hv_device *device,
278 struct vstor_packet *vstor_packet,
K. Y. Srinivasand7a1bdb2011-03-28 09:33:44 -0700279 struct hv_storvsc_request *request)
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700280{
Hank Janssenf6388592010-12-06 12:26:49 -0800281 struct storvsc_device *stor_device;
K. Y. Srinivasana617e392011-04-06 11:25:38 -0700282 struct vstor_packet *stor_pkt;
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700283
Hank Janssenf6388592010-12-06 12:26:49 -0800284 stor_device = must_get_stor_device(device);
285 if (!stor_device) {
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700286 DPRINT_ERR(STORVSC, "unable to get stor device..."
287 "device being destroyed?");
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700288 return;
289 }
290
K. Y. Srinivasana617e392011-04-06 11:25:38 -0700291 DPRINT_DBG(STORVSC, "IO_COMPLETE_OPERATION - request %p "
K. Y. Srinivasand7a1bdb2011-03-28 09:33:44 -0700292 "completed bytes xfer %u", request,
Hank Janssenf6388592010-12-06 12:26:49 -0800293 vstor_packet->vm_srb.data_transfer_length);
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700294
K. Y. Srinivasana617e392011-04-06 11:25:38 -0700295 stor_pkt = &request->vstor_packet;
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700296
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700297
298 /* Copy over the status...etc */
K. Y. Srinivasana617e392011-04-06 11:25:38 -0700299 stor_pkt->vm_srb.scsi_status = vstor_packet->vm_srb.scsi_status;
300 stor_pkt->vm_srb.srb_status = vstor_packet->vm_srb.srb_status;
301 stor_pkt->vm_srb.sense_info_length =
302 vstor_packet->vm_srb.sense_info_length;
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700303
K. Y. Srinivasan6dc3f0a2011-03-28 09:33:42 -0700304 if (vstor_packet->vm_srb.scsi_status != 0 ||
305 vstor_packet->vm_srb.srb_status != 1) {
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700306 DPRINT_WARN(STORVSC,
307 "cmd 0x%x scsi status 0x%x srb status 0x%x\n",
K. Y. Srinivasana617e392011-04-06 11:25:38 -0700308 stor_pkt->vm_srb.cdb[0],
K. Y. Srinivasan373dd8a2011-03-28 09:33:37 -0700309 vstor_packet->vm_srb.scsi_status,
Hank Janssenf6388592010-12-06 12:26:49 -0800310 vstor_packet->vm_srb.srb_status);
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700311 }
312
K. Y. Srinivasan6dc3f0a2011-03-28 09:33:42 -0700313 if ((vstor_packet->vm_srb.scsi_status & 0xFF) == 0x02) {
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700314 /* CHECK_CONDITION */
Hank Janssenf6388592010-12-06 12:26:49 -0800315 if (vstor_packet->vm_srb.srb_status & 0x80) {
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700316 /* autosense data available */
317 DPRINT_WARN(STORVSC, "storvsc pkt %p autosense data "
K. Y. Srinivasand7a1bdb2011-03-28 09:33:44 -0700318 "valid - len %d\n", request,
Hank Janssenf6388592010-12-06 12:26:49 -0800319 vstor_packet->vm_srb.sense_info_length);
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700320
K. Y. Srinivasand7a1bdb2011-03-28 09:33:44 -0700321 memcpy(request->sense_buffer,
Hank Janssenf6388592010-12-06 12:26:49 -0800322 vstor_packet->vm_srb.sense_data,
323 vstor_packet->vm_srb.sense_info_length);
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700324
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700325 }
326 }
327
K. Y. Srinivasana617e392011-04-06 11:25:38 -0700328 stor_pkt->vm_srb.data_transfer_length =
329 vstor_packet->vm_srb.data_transfer_length;
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700330
K. Y. Srinivasand7a1bdb2011-03-28 09:33:44 -0700331 request->on_io_completion(request);
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700332
Hank Janssenf6388592010-12-06 12:26:49 -0800333 atomic_dec(&stor_device->num_outstanding_req);
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700334
Hank Janssenf6388592010-12-06 12:26:49 -0800335 put_stor_device(device);
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700336}
337
Hank Janssenf6388592010-12-06 12:26:49 -0800338static void stor_vsc_on_receive(struct hv_device *device,
339 struct vstor_packet *vstor_packet,
K. Y. Srinivasand7a1bdb2011-03-28 09:33:44 -0700340 struct hv_storvsc_request *request)
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700341{
Hank Janssenf6388592010-12-06 12:26:49 -0800342 switch (vstor_packet->operation) {
Hank Janssend2aaba42010-12-06 12:26:44 -0800343 case VSTOR_OPERATION_COMPLETE_IO:
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700344 DPRINT_DBG(STORVSC, "IO_COMPLETE_OPERATION");
K. Y. Srinivasand7a1bdb2011-03-28 09:33:44 -0700345 stor_vsc_on_io_completion(device, vstor_packet, request);
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700346 break;
Hank Janssend2aaba42010-12-06 12:26:44 -0800347 case VSTOR_OPERATION_REMOVE_DEVICE:
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700348 DPRINT_INFO(STORVSC, "REMOVE_DEVICE_OPERATION");
349 /* TODO: */
350 break;
351
352 default:
353 DPRINT_INFO(STORVSC, "Unknown operation received - %d",
Hank Janssenf6388592010-12-06 12:26:49 -0800354 vstor_packet->operation);
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700355 break;
356 }
357}
358
Hank Janssen02e37db2010-12-06 12:26:48 -0800359static void stor_vsc_on_channel_callback(void *context)
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700360{
361 struct hv_device *device = (struct hv_device *)context;
Hank Janssenf6388592010-12-06 12:26:49 -0800362 struct storvsc_device *stor_device;
363 u32 bytes_recvd;
364 u64 request_id;
Uwe Kleine-König73509682011-01-20 09:32:01 +0100365 unsigned char packet[ALIGN(sizeof(struct vstor_packet), 8)];
K. Y. Srinivasand7a1bdb2011-03-28 09:33:44 -0700366 struct hv_storvsc_request *request;
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700367 int ret;
368
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700369
Hank Janssenf6388592010-12-06 12:26:49 -0800370 stor_device = must_get_stor_device(device);
371 if (!stor_device) {
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700372 DPRINT_ERR(STORVSC, "unable to get stor device..."
373 "device being destroyed?");
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700374 return;
375 }
376
377 do {
Greg Kroah-Hartman50ea95d2010-10-21 09:15:14 -0700378 ret = vmbus_recvpacket(device->channel, packet,
Uwe Kleine-König73509682011-01-20 09:32:01 +0100379 ALIGN(sizeof(struct vstor_packet), 8),
Hank Janssenf6388592010-12-06 12:26:49 -0800380 &bytes_recvd, &request_id);
381 if (ret == 0 && bytes_recvd > 0) {
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700382 DPRINT_DBG(STORVSC, "receive %d bytes - tid %llx",
Hank Janssenf6388592010-12-06 12:26:49 -0800383 bytes_recvd, request_id);
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700384
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700385
K. Y. Srinivasand7a1bdb2011-03-28 09:33:44 -0700386 request = (struct hv_storvsc_request *)
Hank Janssenf6388592010-12-06 12:26:49 -0800387 (unsigned long)request_id;
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700388
Hank Janssenf6388592010-12-06 12:26:49 -0800389 if ((request == &stor_device->init_request) ||
390 (request == &stor_device->reset_request)) {
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700391
Hank Janssen3d8cdf22010-12-06 12:26:47 -0800392 memcpy(&request->vstor_packet, packet,
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700393 sizeof(struct vstor_packet));
K. Y. Srinivasan939584652011-03-28 09:33:30 -0700394 complete(&request->wait_event);
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700395 } else {
Hank Janssen02e37db2010-12-06 12:26:48 -0800396 stor_vsc_on_receive(device,
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700397 (struct vstor_packet *)packet,
398 request);
399 }
400 } else {
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700401 break;
402 }
403 } while (1);
404
Hank Janssen02e37db2010-12-06 12:26:48 -0800405 put_stor_device(device);
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700406 return;
407}
408
Hank Janssenf6388592010-12-06 12:26:49 -0800409static int stor_vsc_connect_to_vsp(struct hv_device *device)
Hank Janssenbef4a342009-07-13 16:01:31 -0700410{
Greg Kroah-Hartmanb3715ee2009-08-27 16:00:24 -0700411 struct vmstorage_channel_properties props;
Hank Janssenf6388592010-12-06 12:26:49 -0800412 struct storvsc_driver_object *stor_driver;
Greg Kroah-Hartman068c5df2009-08-31 22:25:48 -0700413 int ret;
Hank Janssenbef4a342009-07-13 16:01:31 -0700414
Haiyang Zhangca623ad2011-01-26 12:12:11 -0800415 stor_driver = (struct storvsc_driver_object *)device->drv;
Dave Jones8c960e42009-11-11 16:57:03 -0500416 memset(&props, 0, sizeof(struct vmstorage_channel_properties));
Hank Janssenbef4a342009-07-13 16:01:31 -0700417
Bill Pemberton454f18a2009-07-27 16:47:24 -0400418 /* Open the channel */
Hank Janssenf6388592010-12-06 12:26:49 -0800419 ret = vmbus_open(device->channel,
420 stor_driver->ring_buffer_size,
421 stor_driver->ring_buffer_size,
Greg Kroah-Hartman60f841a2010-10-21 09:59:06 -0700422 (void *)&props,
423 sizeof(struct vmstorage_channel_properties),
Hank Janssenf6388592010-12-06 12:26:49 -0800424 stor_vsc_on_channel_callback, device);
Hank Janssenbef4a342009-07-13 16:01:31 -0700425
Greg Kroah-Hartman068c5df2009-08-31 22:25:48 -0700426 DPRINT_DBG(STORVSC, "storage props: path id %d, tgt id %d, max xfer %d",
Hank Janssend2aaba42010-12-06 12:26:44 -0800427 props.path_id, props.target_id, props.max_transfer_bytes);
Hank Janssenbef4a342009-07-13 16:01:31 -0700428
Greg Kroah-Hartman068c5df2009-08-31 22:25:48 -0700429 if (ret != 0) {
Hank Janssenbef4a342009-07-13 16:01:31 -0700430 DPRINT_ERR(STORVSC, "unable to open channel: %d", ret);
431 return -1;
432 }
433
Hank Janssenf6388592010-12-06 12:26:49 -0800434 ret = stor_vsc_channel_init(device);
Hank Janssenbef4a342009-07-13 16:01:31 -0700435
436 return ret;
437}
438
Hank Janssen3e189512010-03-04 22:11:00 +0000439/*
Hank Janssen02e37db2010-12-06 12:26:48 -0800440 * stor_vsc_on_device_add - Callback when the device belonging to this driver
Hank Janssen3d8cdf22010-12-06 12:26:47 -0800441 * is added
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700442 */
K. Y. Srinivasanafa3f3d2011-03-23 10:50:23 -0700443int stor_vsc_on_device_add(struct hv_device *device,
Hank Janssenf6388592010-12-06 12:26:49 -0800444 void *additional_info)
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700445{
Hank Janssenf6388592010-12-06 12:26:49 -0800446 struct storvsc_device *stor_device;
Hank Janssenf6388592010-12-06 12:26:49 -0800447 struct storvsc_device_info *device_info;
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700448 int ret = 0;
449
Hank Janssenf6388592010-12-06 12:26:49 -0800450 device_info = (struct storvsc_device_info *)additional_info;
451 stor_device = alloc_stor_device(device);
452 if (!stor_device) {
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700453 ret = -1;
K. Y. Srinivasan0c3b7b22011-02-11 09:59:43 -0800454 goto cleanup;
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700455 }
456
457 /* Save the channel properties to our storvsc channel */
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700458
459 /* FIXME: */
460 /*
461 * If we support more than 1 scsi channel, we need to set the
462 * port number here to the scsi channel but how do we get the
463 * scsi channel prior to the bus scan
464 */
465
Hank Janssenf6388592010-12-06 12:26:49 -0800466 stor_device->port_number = device_info->port_number;
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700467 /* Send it back up */
Hank Janssenf6388592010-12-06 12:26:49 -0800468 ret = stor_vsc_connect_to_vsp(device);
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700469
Hank Janssenf6388592010-12-06 12:26:49 -0800470 device_info->path_id = stor_device->path_id;
471 device_info->target_id = stor_device->target_id;
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700472
473 DPRINT_DBG(STORVSC, "assigned port %u, path %u target %u\n",
Hank Janssenf6388592010-12-06 12:26:49 -0800474 stor_device->port_number, stor_device->path_id,
475 stor_device->target_id);
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700476
K. Y. Srinivasan0c3b7b22011-02-11 09:59:43 -0800477cleanup:
Greg Kroah-Hartman163680b2009-08-31 22:31:22 -0700478 return ret;
479}
Hank Janssenbef4a342009-07-13 16:01:31 -0700480
Hank Janssen3e189512010-03-04 22:11:00 +0000481/*
Hank Janssen02e37db2010-12-06 12:26:48 -0800482 * stor_vsc_on_device_remove - Callback when the our device is being removed
Greg Kroah-Hartman068c5df2009-08-31 22:25:48 -0700483 */
K. Y. Srinivasanafa3f3d2011-03-23 10:50:23 -0700484int stor_vsc_on_device_remove(struct hv_device *device)
Hank Janssenbef4a342009-07-13 16:01:31 -0700485{
Hank Janssenf6388592010-12-06 12:26:49 -0800486 struct storvsc_device *stor_device;
Hank Janssenbef4a342009-07-13 16:01:31 -0700487
Greg Kroah-Hartman068c5df2009-08-31 22:25:48 -0700488 DPRINT_INFO(STORVSC, "disabling storage device (%p)...",
Haiyang Zhangca623ad2011-01-26 12:12:11 -0800489 device->ext);
Hank Janssenbef4a342009-07-13 16:01:31 -0700490
Hank Janssenf6388592010-12-06 12:26:49 -0800491 stor_device = release_stor_device(device);
Hank Janssenbef4a342009-07-13 16:01:31 -0700492
Bill Pemberton454f18a2009-07-27 16:47:24 -0400493 /*
494 * At this point, all outbound traffic should be disable. We
495 * only allow inbound traffic (responses) to proceed so that
496 * outstanding requests can be completed.
497 */
Hank Janssenf6388592010-12-06 12:26:49 -0800498 while (atomic_read(&stor_device->num_outstanding_req)) {
Greg Kroah-Hartman068c5df2009-08-31 22:25:48 -0700499 DPRINT_INFO(STORVSC, "waiting for %d requests to complete...",
Hank Janssenf6388592010-12-06 12:26:49 -0800500 atomic_read(&stor_device->num_outstanding_req));
Greg Kroah-Hartmanb4362c92009-07-16 11:50:41 -0700501 udelay(100);
Hank Janssenbef4a342009-07-13 16:01:31 -0700502 }
503
Greg Kroah-Hartman068c5df2009-08-31 22:25:48 -0700504 DPRINT_INFO(STORVSC, "removing storage device (%p)...",
Haiyang Zhangca623ad2011-01-26 12:12:11 -0800505 device->ext);
Hank Janssenbef4a342009-07-13 16:01:31 -0700506
Hank Janssenf6388592010-12-06 12:26:49 -0800507 stor_device = final_release_stor_device(device);
Hank Janssenbef4a342009-07-13 16:01:31 -0700508
Hank Janssenf6388592010-12-06 12:26:49 -0800509 DPRINT_INFO(STORVSC, "storage device (%p) safe to remove", stor_device);
Hank Janssenbef4a342009-07-13 16:01:31 -0700510
Bill Pemberton454f18a2009-07-27 16:47:24 -0400511 /* Close the channel */
Hank Janssenf6388592010-12-06 12:26:49 -0800512 vmbus_close(device->channel);
Hank Janssenbef4a342009-07-13 16:01:31 -0700513
Hank Janssenf6388592010-12-06 12:26:49 -0800514 free_stor_device(stor_device);
Greg Kroah-Hartman068c5df2009-08-31 22:25:48 -0700515 return 0;
Hank Janssenbef4a342009-07-13 16:01:31 -0700516}
517
Hank Janssen3e189512010-03-04 22:11:00 +0000518/*
Hank Janssen02e37db2010-12-06 12:26:48 -0800519 * stor_vsc_on_io_request - Callback to initiate an I/O request
Greg Kroah-Hartman068c5df2009-08-31 22:25:48 -0700520 */
K. Y. Srinivasanafa3f3d2011-03-23 10:50:23 -0700521int stor_vsc_on_io_request(struct hv_device *device,
Hank Janssenf6388592010-12-06 12:26:49 -0800522 struct hv_storvsc_request *request)
Hank Janssenbef4a342009-07-13 16:01:31 -0700523{
Hank Janssenf6388592010-12-06 12:26:49 -0800524 struct storvsc_device *stor_device;
Hank Janssenf6388592010-12-06 12:26:49 -0800525 struct vstor_packet *vstor_packet;
Greg Kroah-Hartman068c5df2009-08-31 22:25:48 -0700526 int ret = 0;
Hank Janssenbef4a342009-07-13 16:01:31 -0700527
K. Y. Srinivasand7a1bdb2011-03-28 09:33:44 -0700528 vstor_packet = &request->vstor_packet;
Hank Janssenf6388592010-12-06 12:26:49 -0800529 stor_device = get_stor_device(device);
Hank Janssenbef4a342009-07-13 16:01:31 -0700530
Greg Kroah-Hartman068c5df2009-08-31 22:25:48 -0700531 DPRINT_DBG(STORVSC, "enter - Device %p, DeviceExt %p, Request %p, "
K. Y. Srinivasand7a1bdb2011-03-28 09:33:44 -0700532 , device, stor_device, request);
Hank Janssenbef4a342009-07-13 16:01:31 -0700533
K. Y. Srinivasan473f9402011-03-28 09:33:36 -0700534 DPRINT_DBG(STORVSC, "req %p len %d",
K. Y. Srinivasand7a1bdb2011-03-28 09:33:44 -0700535 request, request->data_buffer.len);
Hank Janssenbef4a342009-07-13 16:01:31 -0700536
Hank Janssenf6388592010-12-06 12:26:49 -0800537 if (!stor_device) {
Greg Kroah-Hartman068c5df2009-08-31 22:25:48 -0700538 DPRINT_ERR(STORVSC, "unable to get stor device..."
539 "device being destroyed?");
Hank Janssenbef4a342009-07-13 16:01:31 -0700540 return -2;
541 }
542
Hank Janssenbef4a342009-07-13 16:01:31 -0700543
K. Y. Srinivasand7a1bdb2011-03-28 09:33:44 -0700544 request->device = device;
Hank Janssenbef4a342009-07-13 16:01:31 -0700545
K. Y. Srinivasana617e392011-04-06 11:25:38 -0700546
Hank Janssenf6388592010-12-06 12:26:49 -0800547 vstor_packet->flags |= REQUEST_COMPLETION_FLAG;
Hank Janssenbef4a342009-07-13 16:01:31 -0700548
Hank Janssenf6388592010-12-06 12:26:49 -0800549 vstor_packet->vm_srb.length = sizeof(struct vmscsi_request);
Hank Janssenbef4a342009-07-13 16:01:31 -0700550
Hank Janssenbef4a342009-07-13 16:01:31 -0700551
Hank Janssenf6388592010-12-06 12:26:49 -0800552 vstor_packet->vm_srb.sense_info_length = SENSE_BUFFER_SIZE;
Hank Janssenbef4a342009-07-13 16:01:31 -0700553
Hank Janssenbef4a342009-07-13 16:01:31 -0700554
K. Y. Srinivasane9e936c2011-03-28 09:33:43 -0700555 vstor_packet->vm_srb.data_transfer_length =
K. Y. Srinivasand7a1bdb2011-03-28 09:33:44 -0700556 request->data_buffer.len;
Hank Janssenbef4a342009-07-13 16:01:31 -0700557
Hank Janssenf6388592010-12-06 12:26:49 -0800558 vstor_packet->operation = VSTOR_OPERATION_EXECUTE_SRB;
Hank Janssenbef4a342009-07-13 16:01:31 -0700559
Greg Kroah-Hartman068c5df2009-08-31 22:25:48 -0700560 DPRINT_DBG(STORVSC, "srb - len %d port %d, path %d, target %d, "
561 "lun %d senselen %d cdblen %d",
Hank Janssenf6388592010-12-06 12:26:49 -0800562 vstor_packet->vm_srb.length,
563 vstor_packet->vm_srb.port_number,
564 vstor_packet->vm_srb.path_id,
565 vstor_packet->vm_srb.target_id,
566 vstor_packet->vm_srb.lun,
567 vstor_packet->vm_srb.sense_info_length,
568 vstor_packet->vm_srb.cdb_length);
Hank Janssenbef4a342009-07-13 16:01:31 -0700569
K. Y. Srinivasand7a1bdb2011-03-28 09:33:44 -0700570 if (request->data_buffer.len) {
Hank Janssenf6388592010-12-06 12:26:49 -0800571 ret = vmbus_sendpacket_multipagebuffer(device->channel,
K. Y. Srinivasand7a1bdb2011-03-28 09:33:44 -0700572 &request->data_buffer,
Hank Janssenf6388592010-12-06 12:26:49 -0800573 vstor_packet,
Greg Kroah-Hartmanb3715ee2009-08-27 16:00:24 -0700574 sizeof(struct vstor_packet),
K. Y. Srinivasand7a1bdb2011-03-28 09:33:44 -0700575 (unsigned long)request);
Greg Kroah-Hartman068c5df2009-08-31 22:25:48 -0700576 } else {
Hank Janssenf6388592010-12-06 12:26:49 -0800577 ret = vmbus_sendpacket(device->channel, vstor_packet,
Greg Kroah-Hartmanb60d71e2010-10-21 09:43:56 -0700578 sizeof(struct vstor_packet),
K. Y. Srinivasand7a1bdb2011-03-28 09:33:44 -0700579 (unsigned long)request,
Haiyang Zhang415f2282011-01-26 12:12:13 -0800580 VM_PKT_DATA_INBAND,
Greg Kroah-Hartmanb60d71e2010-10-21 09:43:56 -0700581 VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
Hank Janssenbef4a342009-07-13 16:01:31 -0700582 }
583
Greg Kroah-Hartman068c5df2009-08-31 22:25:48 -0700584 if (ret != 0) {
585 DPRINT_DBG(STORVSC, "Unable to send packet %p ret %d",
Hank Janssenf6388592010-12-06 12:26:49 -0800586 vstor_packet, ret);
Hank Janssenbef4a342009-07-13 16:01:31 -0700587 }
588
Hank Janssenf6388592010-12-06 12:26:49 -0800589 atomic_inc(&stor_device->num_outstanding_req);
Hank Janssenbef4a342009-07-13 16:01:31 -0700590
Hank Janssenf6388592010-12-06 12:26:49 -0800591 put_stor_device(device);
Hank Janssenbef4a342009-07-13 16:01:31 -0700592 return ret;
593}
594
Hank Janssen3e189512010-03-04 22:11:00 +0000595/*
Hank Janssen02e37db2010-12-06 12:26:48 -0800596 * stor_vsc_on_cleanup - Perform any cleanup when the driver is removed
Greg Kroah-Hartman068c5df2009-08-31 22:25:48 -0700597 */
K. Y. Srinivasanafa3f3d2011-03-23 10:50:23 -0700598void stor_vsc_on_cleanup(struct hv_driver *driver)
Hank Janssenbef4a342009-07-13 16:01:31 -0700599{
Hank Janssenbef4a342009-07-13 16:01:31 -0700600}
601