Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 334737
b: refs/heads/master
c: cec8546
h: refs/heads/master
i:
  334735: 71e5d6d
v: v3
  • Loading branch information
Sebastian Ott authored and Martin Schwidefsky committed Oct 18, 2012
1 parent 7fd8538 commit 813f3c4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 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: aa92b33c6b93b5ef4ccbaa72afa9c387a96c2ee2
refs/heads/master: cec8546638dc634824b629e33968d6c68f8b07d6
7 changes: 6 additions & 1 deletion trunk/drivers/s390/cio/css.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,11 @@ static int css_evaluate_new_subchannel(struct subchannel_id schid, int slow)
/* Will be done on the slow path. */
return -EAGAIN;
}
if (stsch_err(schid, &schib) || !css_sch_is_valid(&schib)) {
if (stsch_err(schid, &schib)) {
/* Subchannel is not provided. */
return -ENXIO;
}
if (!css_sch_is_valid(&schib)) {
/* Unusable - ignore. */
return 0;
}
Expand Down Expand Up @@ -536,6 +540,7 @@ static int slow_eval_unknown_fn(struct subchannel_id schid, void *data)
case -ENOMEM:
case -EIO:
/* These should abort looping */
idset_sch_del_subseq(slow_subchannel_set, schid);
break;
default:
rc = 0;
Expand Down
8 changes: 8 additions & 0 deletions trunk/drivers/s390/cio/idset.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,14 @@ void idset_sch_del(struct idset *set, struct subchannel_id schid)
idset_del(set, schid.ssid, schid.sch_no);
}

/* Clear ids starting from @schid up to end of subchannel set. */
void idset_sch_del_subseq(struct idset *set, struct subchannel_id schid)
{
int pos = schid.ssid * set->num_id + schid.sch_no;

bitmap_clear(set->bitmap, pos, set->num_id - schid.sch_no);
}

int idset_sch_contains(struct idset *set, struct subchannel_id schid)
{
return idset_contains(set, schid.ssid, schid.sch_no);
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/s390/cio/idset.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright IBM Corp. 2007
* Copyright IBM Corp. 2007, 2012
* Author(s): Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
*/

Expand All @@ -17,6 +17,7 @@ void idset_fill(struct idset *set);
struct idset *idset_sch_new(void);
void idset_sch_add(struct idset *set, struct subchannel_id id);
void idset_sch_del(struct idset *set, struct subchannel_id id);
void idset_sch_del_subseq(struct idset *set, struct subchannel_id schid);
int idset_sch_contains(struct idset *set, struct subchannel_id id);
int idset_sch_get_first(struct idset *set, struct subchannel_id *id);
int idset_is_empty(struct idset *set);
Expand Down

0 comments on commit 813f3c4

Please sign in to comment.