Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 39055
b: refs/heads/master
c: 7e8ae7b
h: refs/heads/master
i:
  39053: 332e1dc
  39051: 8f32f85
  39047: 9ae8947
  39039: 6f11519
v: v3
  • Loading branch information
Cornelia Huck authored and Martin Schwidefsky committed Oct 6, 2006
1 parent f5882b3 commit 60bef25
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 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: 2d103d5a80846e96e1cb1ba5e635e8c37d30ada8
refs/heads/master: 7e8ae7bfe8354b1f1b98c5cd29db8965ca1e6391
25 changes: 16 additions & 9 deletions trunk/drivers/s390/cio/chsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,13 @@ css_get_ssd_info(struct subchannel *sch)
spin_unlock_irq(&sch->lock);
free_page((unsigned long)page);
if (!ret) {
int j, chpid;
int j, chpid, mask;
/* Allocate channel path structures, if needed. */
for (j = 0; j < 8; j++) {
mask = 0x80 >> j;
chpid = sch->ssd_info.chpid[j];
if (chpid && (get_chp_status(chpid) < 0))
if ((sch->schib.pmcw.pim & mask) &&
(get_chp_status(chpid) < 0))
new_channel_path(chpid);
}
}
Expand All @@ -222,13 +224,15 @@ s390_subchannel_remove_chpid(struct device *dev, void *data)

sch = to_subchannel(dev);
chpid = data;
for (j = 0; j < 8; j++)
if (sch->schib.pmcw.chpid[j] == chpid->id)
for (j = 0; j < 8; j++) {
mask = 0x80 >> j;
if ((sch->schib.pmcw.pim & mask) &&
(sch->schib.pmcw.chpid[j] == chpid->id))
break;
}
if (j >= 8)
return 0;

mask = 0x80 >> j;
spin_lock_irq(&sch->lock);

stsch(sch->schid, &schib);
Expand Down Expand Up @@ -620,7 +624,7 @@ __chp_add_new_sch(struct subchannel_id schid)
static int
__chp_add(struct subchannel_id schid, void *data)
{
int i;
int i, mask;
struct channel_path *chp;
struct subchannel *sch;

Expand All @@ -630,23 +634,26 @@ __chp_add(struct subchannel_id schid, void *data)
/* Check if the subchannel is now available. */
return __chp_add_new_sch(schid);
spin_lock_irq(&sch->lock);
for (i=0; i<8; i++)
if (sch->schib.pmcw.chpid[i] == chp->id) {
for (i=0; i<8; i++) {
mask = 0x80 >> i;
if ((sch->schib.pmcw.pim & mask) &&
(sch->schib.pmcw.chpid[i] == chp->id)) {
if (stsch(sch->schid, &sch->schib) != 0) {
/* Endgame. */
spin_unlock_irq(&sch->lock);
return -ENXIO;
}
break;
}
}
if (i==8) {
spin_unlock_irq(&sch->lock);
return 0;
}
sch->lpm = ((sch->schib.pmcw.pim &
sch->schib.pmcw.pam &
sch->schib.pmcw.pom)
| 0x80 >> i) & sch->opm;
| mask) & sch->opm;

if (sch->driver && sch->driver->verify)
sch->driver->verify(&sch->dev);
Expand Down

0 comments on commit 60bef25

Please sign in to comment.