Commit f8feed06 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman

Staging: hv: storvsc_drv: Get rid of some DPRINTS

Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarAbhishek Kane <v-abkane@microsoft.com>
Signed-off-by: default avatarHank Janssen <hjanssen@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 7f9facad
...@@ -79,13 +79,6 @@ static int stor_vsc_initialize(struct hv_driver *driver) ...@@ -79,13 +79,6 @@ static int stor_vsc_initialize(struct hv_driver *driver)
stor_driver = hvdr_to_stordr(driver); stor_driver = hvdr_to_stordr(driver);
DPRINT_DBG(STORVSC,
"sizeof(struct hv_storvsc_request)=%zd "
"sizeof(struct vstor_packet)=%zd, "
"sizeof(struct vmscsi_request)=%zd",
sizeof(struct hv_storvsc_request),
sizeof(struct vstor_packet),
sizeof(struct vmscsi_request));
/* Make sure we are at least 2 pages since 1 page is used for control */ /* Make sure we are at least 2 pages since 1 page is used for control */
...@@ -199,14 +192,8 @@ static int storvsc_drv_init(void) ...@@ -199,14 +192,8 @@ static int storvsc_drv_init(void)
storvsc_drv_obj->max_outstanding_req_per_channel); storvsc_drv_obj->max_outstanding_req_per_channel);
if (storvsc_drv_obj->max_outstanding_req_per_channel < if (storvsc_drv_obj->max_outstanding_req_per_channel <
STORVSC_MAX_IO_REQUESTS) { STORVSC_MAX_IO_REQUESTS)
DPRINT_ERR(STORVSC_DRV,
"The number of outstanding io requests (%d) "
"is larger than that supported (%d) internally.",
STORVSC_MAX_IO_REQUESTS,
storvsc_drv_obj->max_outstanding_req_per_channel);
return -1; return -1;
}
drv->driver.name = storvsc_drv_obj->base.name; drv->driver.name = storvsc_drv_obj->base.name;
...@@ -230,11 +217,8 @@ static int stor_vsc_on_host_reset(struct hv_device *device) ...@@ -230,11 +217,8 @@ static int stor_vsc_on_host_reset(struct hv_device *device)
DPRINT_INFO(STORVSC, "resetting host adapter..."); DPRINT_INFO(STORVSC, "resetting host adapter...");
stor_device = get_stor_device(device); stor_device = get_stor_device(device);
if (!stor_device) { if (!stor_device)
DPRINT_ERR(STORVSC, "unable to get stor device..."
"device being destroyed?");
return -1; return -1;
}
request = &stor_device->reset_request; request = &stor_device->reset_request;
vstor_packet = &request->vstor_packet; vstor_packet = &request->vstor_packet;
...@@ -250,11 +234,8 @@ static int stor_vsc_on_host_reset(struct hv_device *device) ...@@ -250,11 +234,8 @@ static int stor_vsc_on_host_reset(struct hv_device *device)
(unsigned long)&stor_device->reset_request, (unsigned long)&stor_device->reset_request,
VM_PKT_DATA_INBAND, VM_PKT_DATA_INBAND,
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
if (ret != 0) { if (ret != 0)
DPRINT_ERR(STORVSC, "Unable to send reset packet %p ret %d",
vstor_packet, ret);
goto cleanup; goto cleanup;
}
t = wait_for_completion_timeout(&request->wait_event, HZ); t = wait_for_completion_timeout(&request->wait_event, HZ);
if (t == 0) { if (t == 0) {
...@@ -296,9 +277,6 @@ static void storvsc_drv_exit(void) ...@@ -296,9 +277,6 @@ static void storvsc_drv_exit(void)
(void *) &current_dev, (void *) &current_dev,
storvsc_drv_exit_cb); storvsc_drv_exit_cb);
if (ret)
DPRINT_WARN(STORVSC_DRV,
"driver_for_each_device returned %d", ret);
if (current_dev == NULL) if (current_dev == NULL)
break; break;
...@@ -331,10 +309,8 @@ static int storvsc_probe(struct hv_device *device) ...@@ -331,10 +309,8 @@ static int storvsc_probe(struct hv_device *device)
host = scsi_host_alloc(&scsi_driver, host = scsi_host_alloc(&scsi_driver,
sizeof(struct hv_host_device)); sizeof(struct hv_host_device));
if (!host) { if (!host)
DPRINT_ERR(STORVSC_DRV, "unable to allocate scsi host object");
return -ENOMEM; return -ENOMEM;
}
dev_set_drvdata(&device->device, host); dev_set_drvdata(&device->device, host);
...@@ -359,7 +335,6 @@ static int storvsc_probe(struct hv_device *device) ...@@ -359,7 +335,6 @@ static int storvsc_probe(struct hv_device *device)
ret = storvsc_drv_obj->base.dev_add(device, (void *)&device_info); ret = storvsc_drv_obj->base.dev_add(device, (void *)&device_info);
if (ret != 0) { if (ret != 0) {
DPRINT_ERR(STORVSC_DRV, "unable to add scsi vsc device");
kmem_cache_destroy(host_dev->request_pool); kmem_cache_destroy(host_dev->request_pool);
scsi_host_put(host); scsi_host_put(host);
return -1; return -1;
...@@ -378,7 +353,6 @@ static int storvsc_probe(struct hv_device *device) ...@@ -378,7 +353,6 @@ static int storvsc_probe(struct hv_device *device)
/* Register the HBA and start the scsi bus scan */ /* Register the HBA and start the scsi bus scan */
ret = scsi_add_host(host, &device->device); ret = scsi_add_host(host, &device->device);
if (ret != 0) { if (ret != 0) {
DPRINT_ERR(STORVSC_DRV, "unable to add scsi host device");
storvsc_drv_obj->base.dev_rm(device); storvsc_drv_obj->base.dev_rm(device);
...@@ -692,11 +666,6 @@ static int storvsc_queuecommand_lck(struct scsi_cmnd *scmnd, ...@@ -692,11 +666,6 @@ static int storvsc_queuecommand_lck(struct scsi_cmnd *scmnd,
unsigned int sg_count = 0; unsigned int sg_count = 0;
struct vmscsi_request *vm_srb; struct vmscsi_request *vm_srb;
DPRINT_DBG(STORVSC_DRV, "scmnd %p dir %d, use_sg %d buf %p len %d "
"queue depth %d tagged %d", scmnd, scmnd->sc_data_direction,
scsi_sg_count(scmnd), scsi_sglist(scmnd),
scsi_bufflen(scmnd), scmnd->device->queue_depth,
scmnd->device->tagged_supported);
/* If retrying, no need to prep the cmd */ /* If retrying, no need to prep the cmd */
if (scmnd->host_scribble) { if (scmnd->host_scribble) {
...@@ -720,8 +689,6 @@ static int storvsc_queuecommand_lck(struct scsi_cmnd *scmnd, ...@@ -720,8 +689,6 @@ static int storvsc_queuecommand_lck(struct scsi_cmnd *scmnd,
cmd_request = kmem_cache_zalloc(host_dev->request_pool, cmd_request = kmem_cache_zalloc(host_dev->request_pool,
GFP_ATOMIC); GFP_ATOMIC);
if (!cmd_request) { if (!cmd_request) {
DPRINT_ERR(STORVSC_DRV, "scmnd (%p) - unable to allocate "
"storvsc_cmd_request...marking queue busy", scmnd);
scmnd->scsi_done = NULL; scmnd->scsi_done = NULL;
return SCSI_MLQUEUE_DEVICE_BUSY; return SCSI_MLQUEUE_DEVICE_BUSY;
} }
...@@ -736,7 +703,6 @@ static int storvsc_queuecommand_lck(struct scsi_cmnd *scmnd, ...@@ -736,7 +703,6 @@ static int storvsc_queuecommand_lck(struct scsi_cmnd *scmnd,
request = &cmd_request->request; request = &cmd_request->request;
vm_srb = &request->vstor_packet.vm_srb; vm_srb = &request->vstor_packet.vm_srb;
DPRINT_DBG(STORVSC_DRV, "req %p size %d", request, request_size);
/* Build the SRB */ /* Build the SRB */
switch (scmnd->sc_data_direction) { switch (scmnd->sc_data_direction) {
...@@ -775,17 +741,10 @@ static int storvsc_queuecommand_lck(struct scsi_cmnd *scmnd, ...@@ -775,17 +741,10 @@ static int storvsc_queuecommand_lck(struct scsi_cmnd *scmnd,
/* check if we need to bounce the sgl */ /* check if we need to bounce the sgl */
if (do_bounce_buffer(sgl, scsi_sg_count(scmnd)) != -1) { if (do_bounce_buffer(sgl, scsi_sg_count(scmnd)) != -1) {
DPRINT_INFO(STORVSC_DRV,
"need to bounce buffer for this scmnd %p",
scmnd);
cmd_request->bounce_sgl = cmd_request->bounce_sgl =
create_bounce_buffer(sgl, scsi_sg_count(scmnd), create_bounce_buffer(sgl, scsi_sg_count(scmnd),
scsi_bufflen(scmnd)); scsi_bufflen(scmnd));
if (!cmd_request->bounce_sgl) { if (!cmd_request->bounce_sgl) {
DPRINT_ERR(STORVSC_DRV,
"unable to create bounce buffer for "
"this scmnd %p", scmnd);
scmnd->scsi_done = NULL; scmnd->scsi_done = NULL;
scmnd->host_scribble = NULL; scmnd->host_scribble = NULL;
kmem_cache_free(host_dev->request_pool, kmem_cache_free(host_dev->request_pool,
...@@ -811,12 +770,10 @@ static int storvsc_queuecommand_lck(struct scsi_cmnd *scmnd, ...@@ -811,12 +770,10 @@ static int storvsc_queuecommand_lck(struct scsi_cmnd *scmnd,
request->data_buffer.offset = sgl[0].offset; request->data_buffer.offset = sgl[0].offset;
for (i = 0; i < sg_count; i++) { for (i = 0; i < sg_count; i++)
DPRINT_DBG(STORVSC_DRV, "sgl[%d] len %d offset %d\n",
i, sgl[i].length, sgl[i].offset);
request->data_buffer.pfn_array[i] = request->data_buffer.pfn_array[i] =
page_to_pfn(sg_page((&sgl[i]))); page_to_pfn(sg_page((&sgl[i])));
}
} else if (scsi_sglist(scmnd)) { } else if (scsi_sglist(scmnd)) {
/* ASSERT(scsi_bufflen(scmnd) <= PAGE_SIZE); */ /* ASSERT(scsi_bufflen(scmnd) <= PAGE_SIZE); */
request->data_buffer.offset = request->data_buffer.offset =
...@@ -831,9 +788,6 @@ static int storvsc_queuecommand_lck(struct scsi_cmnd *scmnd, ...@@ -831,9 +788,6 @@ static int storvsc_queuecommand_lck(struct scsi_cmnd *scmnd,
&cmd_request->request); &cmd_request->request);
if (ret == -1) { if (ret == -1) {
/* no more space */ /* no more space */
DPRINT_ERR(STORVSC_DRV,
"scmnd (%p) - queue FULL...marking queue busy",
scmnd);
if (cmd_request->bounce_sgl_count) { if (cmd_request->bounce_sgl_count) {
/* /*
...@@ -872,8 +826,6 @@ static int storvsc_merge_bvec(struct request_queue *q, ...@@ -872,8 +826,6 @@ static int storvsc_merge_bvec(struct request_queue *q,
*/ */
static int storvsc_device_alloc(struct scsi_device *sdevice) static int storvsc_device_alloc(struct scsi_device *sdevice)
{ {
DPRINT_DBG(STORVSC_DRV, "sdev (%p) - setting device flag to %d",
sdevice, BLIST_SPARSELUN);
/* /*
* This enables luns to be located sparsely. Otherwise, we may not * This enables luns to be located sparsely. Otherwise, we may not
* discovered them. * discovered them.
...@@ -884,11 +836,6 @@ static int storvsc_device_alloc(struct scsi_device *sdevice) ...@@ -884,11 +836,6 @@ static int storvsc_device_alloc(struct scsi_device *sdevice)
static int storvsc_device_configure(struct scsi_device *sdevice) static int storvsc_device_configure(struct scsi_device *sdevice)
{ {
DPRINT_INFO(STORVSC_DRV, "sdev (%p) - curr queue depth %d", sdevice,
sdevice->queue_depth);
DPRINT_INFO(STORVSC_DRV, "sdev (%p) - setting queue depth to %d",
sdevice, STORVSC_MAX_IO_REQUESTS);
scsi_adjust_queue_depth(sdevice, MSG_SIMPLE_TAG, scsi_adjust_queue_depth(sdevice, MSG_SIMPLE_TAG,
STORVSC_MAX_IO_REQUESTS); STORVSC_MAX_IO_REQUESTS);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment