Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182180
b: refs/heads/master
c: 589c74d
h: refs/heads/master
v: v3
  • Loading branch information
Stefan Haberland authored and Martin Schwidefsky committed Feb 26, 2010
1 parent 2e13145 commit 6f3c86f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 13 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: 9eb251225ab4dbea3119cfcf4c5194eed223a740
refs/heads/master: 589c74d5076dd1bde13a5a36d97ca79be8bd72b2
24 changes: 15 additions & 9 deletions trunk/drivers/s390/block/dasd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1003,12 +1003,20 @@ static void dasd_handle_killed_request(struct ccw_device *cdev,
return;
}

device = (struct dasd_device *) cqr->startdev;
if (device == NULL ||
device != dasd_device_from_cdev_locked(cdev) ||
strncmp(device->discipline->ebcname, (char *) &cqr->magic, 4)) {
device = dasd_device_from_cdev_locked(cdev);
if (IS_ERR(device)) {
DBF_EVENT_DEVID(DBF_DEBUG, cdev, "%s",
"unable to get device from cdev");
return;
}

if (!cqr->startdev ||
device != cqr->startdev ||
strncmp(cqr->startdev->discipline->ebcname,
(char *) &cqr->magic, 4)) {
DBF_EVENT_DEVID(DBF_DEBUG, cdev, "%s",
"invalid device in request");
dasd_put_device(device);
return;
}

Expand Down Expand Up @@ -2291,11 +2299,6 @@ static void dasd_generic_auto_online(void *data, async_cookie_t cookie)
if (ret)
pr_warning("%s: Setting the DASD online failed with rc=%d\n",
dev_name(&cdev->dev), ret);
else {
struct dasd_device *device = dasd_device_from_cdev(cdev);
wait_event(dasd_init_waitq, _wait_for_device(device));
dasd_put_device(device);
}
}

/*
Expand Down Expand Up @@ -2430,6 +2433,9 @@ int dasd_generic_set_online(struct ccw_device *cdev,
} else
pr_debug("dasd_generic device %s found\n",
dev_name(&cdev->dev));

wait_event(dasd_init_waitq, _wait_for_device(device));

dasd_put_device(device);
return rc;
}
Expand Down
13 changes: 10 additions & 3 deletions trunk/drivers/s390/block/dasd_devmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -874,12 +874,19 @@ dasd_discipline_show(struct device *dev, struct device_attribute *attr,
ssize_t len;

device = dasd_device_from_cdev(to_ccwdev(dev));
if (!IS_ERR(device) && device->discipline) {
if (IS_ERR(device))
goto out;
else if (!device->discipline) {
dasd_put_device(device);
goto out;
} else {
len = snprintf(buf, PAGE_SIZE, "%s\n",
device->discipline->name);
dasd_put_device(device);
} else
len = snprintf(buf, PAGE_SIZE, "none\n");
return len;
}
out:
len = snprintf(buf, PAGE_SIZE, "none\n");
return len;
}

Expand Down

0 comments on commit 6f3c86f

Please sign in to comment.