Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 356110
b: refs/heads/master
c: 69f5576
h: refs/heads/master
v: v3
  • Loading branch information
Sebastian Ott authored and Martin Schwidefsky committed Feb 14, 2013
1 parent b52196c commit c7a4574
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 11 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: b4b3d128c821d70112ac0096d5c1440f5ed9f718
refs/heads/master: 69f5576f6c8c9d0f0b3670ee7c807a194b4c40f4
48 changes: 38 additions & 10 deletions trunk/drivers/s390/cio/device_pgid.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,20 @@ static void nop_callback(struct ccw_device *cdev, void *data, int rc)
struct subchannel *sch = to_subchannel(cdev->dev.parent);
struct ccw_request *req = &cdev->private->req;

if (rc == 0)
switch (rc) {
case 0:
sch->vpm |= req->lpm;
else if (rc != -EACCES)
break;
case -ETIME:
cdev->private->path_noirq_mask |= req->lpm;
break;
case -EACCES:
cdev->private->path_notoper_mask |= req->lpm;
break;
default:
goto err;
}
/* Continue on the next path. */
req->lpm >>= 1;
nop_do(cdev);
return;
Expand Down Expand Up @@ -174,7 +184,12 @@ static void spid_callback(struct ccw_device *cdev, void *data, int rc)
case 0:
sch->vpm |= req->lpm & sch->opm;
break;
case -ETIME:
cdev->private->flags.pgid_unknown = 1;
cdev->private->path_noirq_mask |= req->lpm;
break;
case -EACCES:
cdev->private->path_notoper_mask |= req->lpm;
break;
case -EOPNOTSUPP:
if (cdev->private->flags.mpath) {
Expand Down Expand Up @@ -404,10 +419,21 @@ static void snid_callback(struct ccw_device *cdev, void *data, int rc)
{
struct ccw_request *req = &cdev->private->req;

if (rc == 0)
switch (rc) {
case 0:
cdev->private->pgid_valid_mask |= req->lpm;
else if (rc != -EACCES)
break;
case -ETIME:
cdev->private->flags.pgid_unknown = 1;
cdev->private->path_noirq_mask |= req->lpm;
break;
case -EACCES:
cdev->private->path_notoper_mask |= req->lpm;
break;
default:
goto err;
}
/* Continue on the next path. */
req->lpm >>= 1;
snid_do(cdev);
return;
Expand All @@ -427,6 +453,13 @@ static void verify_start(struct ccw_device *cdev)

sch->vpm = 0;
sch->lpm = sch->schib.pmcw.pam;

/* Initialize PGID data. */
memset(cdev->private->pgid, 0, sizeof(cdev->private->pgid));
cdev->private->pgid_valid_mask = 0;
cdev->private->pgid_todo_mask = sch->schib.pmcw.pam;
cdev->private->path_notoper_mask = 0;

/* Initialize request data. */
memset(req, 0, sizeof(*req));
req->timeout = PGID_TIMEOUT;
Expand Down Expand Up @@ -459,21 +492,16 @@ static void verify_start(struct ccw_device *cdev)
*/
void ccw_device_verify_start(struct ccw_device *cdev)
{
struct subchannel *sch = to_subchannel(cdev->dev.parent);

CIO_TRACE_EVENT(4, "vrfy");
CIO_HEX_EVENT(4, &cdev->private->dev_id, sizeof(cdev->private->dev_id));
/* Initialize PGID data. */
memset(cdev->private->pgid, 0, sizeof(cdev->private->pgid));
cdev->private->pgid_valid_mask = 0;
cdev->private->pgid_todo_mask = sch->schib.pmcw.pam;
/*
* Initialize pathgroup and multipath state with target values.
* They may change in the course of path verification.
*/
cdev->private->flags.pgroup = cdev->private->options.pgroup;
cdev->private->flags.mpath = cdev->private->options.mpath;
cdev->private->flags.doverify = 0;
cdev->private->path_noirq_mask = 0;
verify_start(cdev);
}

Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/s390/cio/io_sch.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ struct ccw_device_private {
u8 pgid_valid_mask; /* mask of valid PGIDs */
u8 pgid_todo_mask; /* mask of PGIDs to be adjusted */
u8 pgid_reset_mask; /* mask of PGIDs which were reset */
u8 path_noirq_mask; /* mask of paths for which no irq was
received */
u8 path_notoper_mask; /* mask of paths which were found
not operable */
u8 path_gone_mask; /* mask of paths, that became unavailable */
u8 path_new_mask; /* mask of paths, that became available */
struct {
Expand All @@ -145,6 +149,7 @@ struct ccw_device_private {
unsigned int resuming:1; /* recognition while resume */
unsigned int pgroup:1; /* pathgroup is set up */
unsigned int mpath:1; /* multipathing is set up */
unsigned int pgid_unknown:1;/* unknown pgid state */
unsigned int initialized:1; /* set if initial reference held */
} __attribute__((packed)) flags;
unsigned long intparm; /* user interruption parameter */
Expand Down

0 comments on commit c7a4574

Please sign in to comment.