Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248920
b: refs/heads/master
c: 5e081c9
h: refs/heads/master
v: v3
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed Apr 5, 2011
1 parent e1ab967 commit 6ee9430
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 34 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: afa3f3d7f57bc9adb3f7cc2c853153916f690eda
refs/heads/master: 5e081c91eb515d55bdd5d121adff8d216914c0dc
33 changes: 0 additions & 33 deletions trunk/drivers/staging/hv/storvsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ static inline struct storvsc_device *alloc_stor_device(struct hv_device *device)

static inline void free_stor_device(struct storvsc_device *device)
{
/* ASSERT(atomic_read(&device->ref_count) == 0); */
kfree(device);
}

Expand Down Expand Up @@ -103,10 +102,8 @@ static inline void put_stor_device(struct hv_device *device)
struct storvsc_device *stor_device;

stor_device = (struct storvsc_device *)device->ext;
/* ASSERT(stor_device); */

atomic_dec(&stor_device->ref_count);
/* ASSERT(atomic_read(&stor_device->ref_count)); */
}

/* Drop ref count to 1 to effectively disable get_stor_device() */
Expand All @@ -116,7 +113,6 @@ static inline struct storvsc_device *release_stor_device(
struct storvsc_device *stor_device;

stor_device = (struct storvsc_device *)device->ext;
/* ASSERT(stor_device); */

/* Busy wait until the ref drop to 2, then set it to 1 */
while (atomic_cmpxchg(&stor_device->ref_count, 2, 1) != 2)
Expand All @@ -132,7 +128,6 @@ static inline struct storvsc_device *final_release_stor_device(
struct storvsc_device *stor_device;

stor_device = (struct storvsc_device *)device->ext;
/* ASSERT(stor_device); */

/* Busy wait until the ref drop to 1, then set it to 0 */
while (atomic_cmpxchg(&stor_device->ref_count, 1, 0) != 1)
Expand Down Expand Up @@ -341,12 +336,8 @@ static void stor_vsc_on_io_completion(struct hv_device *device,
"completed bytes xfer %u", request_ext,
vstor_packet->vm_srb.data_transfer_length);

/* ASSERT(request_ext != NULL); */
/* ASSERT(request_ext->request != NULL); */

request = request_ext->request;

/* ASSERT(request->OnIOCompletion != NULL); */

/* Copy over the status...etc */
request->status = vstor_packet->vm_srb.scsi_status;
Expand All @@ -366,8 +357,6 @@ static void stor_vsc_on_io_completion(struct hv_device *device,
"valid - len %d\n", request_ext,
vstor_packet->vm_srb.sense_info_length);

/* ASSERT(vstor_packet->vm_srb.sense_info_length <= */
/* request->SenseBufferSize); */
memcpy(request->sense_buffer,
vstor_packet->vm_srb.sense_data,
vstor_packet->vm_srb.sense_info_length);
Expand Down Expand Up @@ -418,7 +407,6 @@ static void stor_vsc_on_channel_callback(void *context)
struct storvsc_request_extension *request;
int ret;

/* ASSERT(device); */

stor_device = must_get_stor_device(device);
if (!stor_device) {
Expand All @@ -435,21 +423,12 @@ static void stor_vsc_on_channel_callback(void *context)
DPRINT_DBG(STORVSC, "receive %d bytes - tid %llx",
bytes_recvd, request_id);

/* ASSERT(bytes_recvd ==
sizeof(struct vstor_packet)); */

request = (struct storvsc_request_extension *)
(unsigned long)request_id;
/* ASSERT(request);c */

/* if (vstor_packet.Flags & SYNTHETIC_FLAG) */
if ((request == &stor_device->init_request) ||
(request == &stor_device->reset_request)) {
/* DPRINT_INFO(STORVSC,
* "reset completion - operation "
* "%u status %u",
* vstor_packet.Operation,
* vstor_packet.Status); */

memcpy(&request->vstor_packet, packet,
sizeof(struct vstor_packet));
Expand All @@ -461,7 +440,6 @@ static void stor_vsc_on_channel_callback(void *context)
request);
}
} else {
/* DPRINT_DBG(STORVSC, "nothing else to read..."); */
break;
}
} while (1);
Expand Down Expand Up @@ -508,7 +486,6 @@ int stor_vsc_on_device_add(struct hv_device *device,
void *additional_info)
{
struct storvsc_device *stor_device;
/* struct vmstorage_channel_properties *props; */
struct storvsc_device_info *device_info;
int ret = 0;

Expand All @@ -520,8 +497,6 @@ int stor_vsc_on_device_add(struct hv_device *device,
}

/* Save the channel properties to our storvsc channel */
/* props = (struct vmstorage_channel_properties *)
* channel->offerMsg.Offer.u.Standard.UserDefined; */

/* FIXME: */
/*
Expand All @@ -530,15 +505,10 @@ int stor_vsc_on_device_add(struct hv_device *device,
* scsi channel prior to the bus scan
*/

/* storChannel->PortNumber = 0;
storChannel->PathId = props->PathId;
storChannel->TargetId = props->TargetId; */

stor_device->port_number = device_info->port_number;
/* Send it back up */
ret = stor_vsc_connect_to_vsp(device);

/* device_info->PortNumber = stor_device->PortNumber; */
device_info->path_id = stor_device->path_id;
device_info->target_id = stor_device->target_id;

Expand Down Expand Up @@ -673,8 +643,6 @@ int stor_vsc_on_io_request(struct hv_device *device,
return -2;
}

/* print_hex_dump_bytes("", DUMP_PREFIX_NONE, request->Cdb,
* request->CdbLen); */

request_extension->request = request;
request_extension->device = device;
Expand Down Expand Up @@ -762,7 +730,6 @@ int stor_vsc_initialize(struct hv_driver *driver)
sizeof(struct vmscsi_request));

/* Make sure we are at least 2 pages since 1 page is used for control */
/* ASSERT(stor_driver->RingBufferSize >= (PAGE_SIZE << 1)); */

driver->name = g_driver_name;
memcpy(&driver->dev_type, &gStorVscDeviceType,
Expand Down

0 comments on commit 6ee9430

Please sign in to comment.