From 5821b01f8ad7059b9b90afeda4fa562d0b0db82f Mon Sep 17 00:00:00 2001 From: "K. Y. Srinivasan" Date: Thu, 12 Jan 2012 12:37:55 -0800 Subject: [PATCH] --- yaml --- r: 288933 b: refs/heads/master c: 59d22950b274182b006e4071d6690bfbc94d7267 h: refs/heads/master i: 288931: 24d7debe4ebea73822d644a51a6a627bf80d94c7 v: v3 --- [refs] | 2 +- trunk/drivers/staging/hv/storvsc_drv.c | 30 +++++++------------------- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/[refs] b/[refs] index 7d985f3b448d..5c565836dfed 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 09f0355f0612520820ae4b2c342a26e048bef6e7 +refs/heads/master: 59d22950b274182b006e4071d6690bfbc94d7267 diff --git a/trunk/drivers/staging/hv/storvsc_drv.c b/trunk/drivers/staging/hv/storvsc_drv.c index 1633b032b5f4..7561d298f6d3 100644 --- a/trunk/drivers/staging/hv/storvsc_drv.c +++ b/trunk/drivers/staging/hv/storvsc_drv.c @@ -791,18 +791,6 @@ static int storvsc_do_io(struct hv_device *device, return ret; } -static void storvsc_get_ide_info(struct hv_device *dev, int *target, int *path) -{ - *target = - dev->dev_instance.b[5] << 8 | dev->dev_instance.b[4]; - - *path = - dev->dev_instance.b[3] << 24 | - dev->dev_instance.b[2] << 16 | - dev->dev_instance.b[1] << 8 | dev->dev_instance.b[0]; -} - - static int storvsc_device_alloc(struct scsi_device *sdevice) { struct stor_mem_pools *memp; @@ -1457,7 +1445,6 @@ static int storvsc_probe(struct hv_device *device, struct Scsi_Host *host; struct hv_host_device *host_dev; bool dev_is_ide = ((dev_id->driver_data == IDE_GUID) ? true : false); - int path = 0; int target = 0; struct storvsc_device *stor_device; @@ -1490,9 +1477,6 @@ static int storvsc_probe(struct hv_device *device, if (ret) goto err_out1; - if (dev_is_ide) - storvsc_get_ide_info(device, &target, &path); - host_dev->path = stor_device->path_id; host_dev->target = stor_device->target_id; @@ -1512,12 +1496,14 @@ static int storvsc_probe(struct hv_device *device, if (!dev_is_ide) { scsi_scan_host(host); - return 0; - } - ret = scsi_add_device(host, 0, target, 0); - if (ret) { - scsi_remove_host(host); - goto err_out2; + } else { + target = (device->dev_instance.b[5] << 8 | + device->dev_instance.b[4]); + ret = scsi_add_device(host, 0, target, 0); + if (ret) { + scsi_remove_host(host); + goto err_out2; + } } return 0;