diff options
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r-- | drivers/s390/cio/ccwgroup.c | 14 | ||||
-rw-r--r-- | drivers/s390/cio/chsc.c | 10 | ||||
-rw-r--r-- | drivers/s390/cio/device.c | 19 | ||||
-rw-r--r-- | drivers/s390/cio/device_fsm.c | 20 | ||||
-rw-r--r-- | drivers/s390/cio/device_pgid.c | 27 |
5 files changed, 45 insertions, 45 deletions
diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c index 3cba6c9fab11..38954f5cd14c 100644 --- a/drivers/s390/cio/ccwgroup.c +++ b/drivers/s390/cio/ccwgroup.c | |||
@@ -183,11 +183,9 @@ ccwgroup_create(struct device *root, | |||
183 | 183 | ||
184 | gdev->creator_id = creator_id; | 184 | gdev->creator_id = creator_id; |
185 | gdev->count = argc; | 185 | gdev->count = argc; |
186 | gdev->dev = (struct device ) { | 186 | gdev->dev.bus = &ccwgroup_bus_type; |
187 | .bus = &ccwgroup_bus_type, | 187 | gdev->dev.parent = root; |
188 | .parent = root, | 188 | gdev->dev.release = ccwgroup_release; |
189 | .release = ccwgroup_release, | ||
190 | }; | ||
191 | 189 | ||
192 | snprintf (gdev->dev.bus_id, BUS_ID_SIZE, "%s", | 190 | snprintf (gdev->dev.bus_id, BUS_ID_SIZE, "%s", |
193 | gdev->cdev[0]->dev.bus_id); | 191 | gdev->cdev[0]->dev.bus_id); |
@@ -391,10 +389,8 @@ int | |||
391 | ccwgroup_driver_register (struct ccwgroup_driver *cdriver) | 389 | ccwgroup_driver_register (struct ccwgroup_driver *cdriver) |
392 | { | 390 | { |
393 | /* register our new driver with the core */ | 391 | /* register our new driver with the core */ |
394 | cdriver->driver = (struct device_driver) { | 392 | cdriver->driver.bus = &ccwgroup_bus_type; |
395 | .bus = &ccwgroup_bus_type, | 393 | cdriver->driver.name = cdriver->name; |
396 | .name = cdriver->name, | ||
397 | }; | ||
398 | 394 | ||
399 | return driver_register(&cdriver->driver); | 395 | return driver_register(&cdriver->driver); |
400 | } | 396 | } |
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c index 61ce3f1d5228..c28444af0919 100644 --- a/drivers/s390/cio/chsc.c +++ b/drivers/s390/cio/chsc.c | |||
@@ -238,8 +238,6 @@ s390_subchannel_remove_chpid(struct device *dev, void *data) | |||
238 | /* Check for single path devices. */ | 238 | /* Check for single path devices. */ |
239 | if (sch->schib.pmcw.pim == 0x80) | 239 | if (sch->schib.pmcw.pim == 0x80) |
240 | goto out_unreg; | 240 | goto out_unreg; |
241 | if (sch->vpm == mask) | ||
242 | goto out_unreg; | ||
243 | 241 | ||
244 | if ((sch->schib.scsw.actl & SCSW_ACTL_DEVACT) && | 242 | if ((sch->schib.scsw.actl & SCSW_ACTL_DEVACT) && |
245 | (sch->schib.scsw.actl & SCSW_ACTL_SCHACT) && | 243 | (sch->schib.scsw.actl & SCSW_ACTL_SCHACT) && |
@@ -258,6 +256,8 @@ s390_subchannel_remove_chpid(struct device *dev, void *data) | |||
258 | /* trigger path verification. */ | 256 | /* trigger path verification. */ |
259 | if (sch->driver && sch->driver->verify) | 257 | if (sch->driver && sch->driver->verify) |
260 | sch->driver->verify(&sch->dev); | 258 | sch->driver->verify(&sch->dev); |
259 | else if (sch->vpm == mask) | ||
260 | goto out_unreg; | ||
261 | out_unlock: | 261 | out_unlock: |
262 | spin_unlock_irq(&sch->lock); | 262 | spin_unlock_irq(&sch->lock); |
263 | return 0; | 263 | return 0; |
@@ -1391,10 +1391,8 @@ new_channel_path(int chpid) | |||
1391 | /* fill in status, etc. */ | 1391 | /* fill in status, etc. */ |
1392 | chp->id = chpid; | 1392 | chp->id = chpid; |
1393 | chp->state = 1; | 1393 | chp->state = 1; |
1394 | chp->dev = (struct device) { | 1394 | chp->dev.parent = &css[0]->device; |
1395 | .parent = &css[0]->device, | 1395 | chp->dev.release = chp_release; |
1396 | .release = chp_release, | ||
1397 | }; | ||
1398 | snprintf(chp->dev.bus_id, BUS_ID_SIZE, "chp0.%x", chpid); | 1396 | snprintf(chp->dev.bus_id, BUS_ID_SIZE, "chp0.%x", chpid); |
1399 | 1397 | ||
1400 | /* Obtain channel path description and fill it in. */ | 1398 | /* Obtain channel path description and fill it in. */ |
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index 585fa04233c3..646da5640401 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
@@ -556,12 +556,11 @@ get_disc_ccwdev_by_devno(unsigned int devno, unsigned int ssid, | |||
556 | struct ccw_device *sibling) | 556 | struct ccw_device *sibling) |
557 | { | 557 | { |
558 | struct device *dev; | 558 | struct device *dev; |
559 | struct match_data data = { | 559 | struct match_data data; |
560 | .devno = devno, | ||
561 | .ssid = ssid, | ||
562 | .sibling = sibling, | ||
563 | }; | ||
564 | 560 | ||
561 | data.devno = devno; | ||
562 | data.ssid = ssid; | ||
563 | data.sibling = sibling; | ||
565 | dev = bus_find_device(&ccw_bus_type, NULL, &data, match_devno); | 564 | dev = bus_find_device(&ccw_bus_type, NULL, &data, match_devno); |
566 | 565 | ||
567 | return dev ? to_ccwdev(dev) : NULL; | 566 | return dev ? to_ccwdev(dev) : NULL; |
@@ -835,10 +834,8 @@ io_subchannel_probe (struct subchannel *sch) | |||
835 | return -ENOMEM; | 834 | return -ENOMEM; |
836 | } | 835 | } |
837 | atomic_set(&cdev->private->onoff, 0); | 836 | atomic_set(&cdev->private->onoff, 0); |
838 | cdev->dev = (struct device) { | 837 | cdev->dev.parent = &sch->dev; |
839 | .parent = &sch->dev, | 838 | cdev->dev.release = ccw_device_release; |
840 | .release = ccw_device_release, | ||
841 | }; | ||
842 | INIT_LIST_HEAD(&cdev->private->kick_work.entry); | 839 | INIT_LIST_HEAD(&cdev->private->kick_work.entry); |
843 | /* Do first half of device_register. */ | 840 | /* Do first half of device_register. */ |
844 | device_initialize(&cdev->dev); | 841 | device_initialize(&cdev->dev); |
@@ -977,9 +974,7 @@ ccw_device_console_enable (struct ccw_device *cdev, struct subchannel *sch) | |||
977 | int rc; | 974 | int rc; |
978 | 975 | ||
979 | /* Initialize the ccw_device structure. */ | 976 | /* Initialize the ccw_device structure. */ |
980 | cdev->dev = (struct device) { | 977 | cdev->dev.parent= &sch->dev; |
981 | .parent = &sch->dev, | ||
982 | }; | ||
983 | rc = io_subchannel_recog(cdev, sch); | 978 | rc = io_subchannel_recog(cdev, sch); |
984 | if (rc) | 979 | if (rc) |
985 | return rc; | 980 | return rc; |
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c index 6d91c2eb205b..35e162ba6d54 100644 --- a/drivers/s390/cio/device_fsm.c +++ b/drivers/s390/cio/device_fsm.c | |||
@@ -267,12 +267,10 @@ ccw_device_recog_done(struct ccw_device *cdev, int state) | |||
267 | notify = 1; | 267 | notify = 1; |
268 | } | 268 | } |
269 | /* fill out sense information */ | 269 | /* fill out sense information */ |
270 | cdev->id = (struct ccw_device_id) { | 270 | cdev->id.cu_type = cdev->private->senseid.cu_type; |
271 | .cu_type = cdev->private->senseid.cu_type, | 271 | cdev->id.cu_model = cdev->private->senseid.cu_model; |
272 | .cu_model = cdev->private->senseid.cu_model, | 272 | cdev->id.dev_type = cdev->private->senseid.dev_type; |
273 | .dev_type = cdev->private->senseid.dev_type, | 273 | cdev->id.dev_model = cdev->private->senseid.dev_model; |
274 | .dev_model = cdev->private->senseid.dev_model, | ||
275 | }; | ||
276 | if (notify) { | 274 | if (notify) { |
277 | cdev->private->state = DEV_STATE_OFFLINE; | 275 | cdev->private->state = DEV_STATE_OFFLINE; |
278 | if (same_dev) { | 276 | if (same_dev) { |
@@ -566,12 +564,10 @@ ccw_device_verify_done(struct ccw_device *cdev, int err) | |||
566 | /* Deliver fake irb to device driver, if needed. */ | 564 | /* Deliver fake irb to device driver, if needed. */ |
567 | if (cdev->private->flags.fake_irb) { | 565 | if (cdev->private->flags.fake_irb) { |
568 | memset(&cdev->private->irb, 0, sizeof(struct irb)); | 566 | memset(&cdev->private->irb, 0, sizeof(struct irb)); |
569 | cdev->private->irb.scsw = (struct scsw) { | 567 | cdev->private->irb.scsw.cc = 1; |
570 | .cc = 1, | 568 | cdev->private->irb.scsw.fctl = SCSW_FCTL_START_FUNC; |
571 | .fctl = SCSW_FCTL_START_FUNC, | 569 | cdev->private->irb.scsw.actl = SCSW_ACTL_START_PEND; |
572 | .actl = SCSW_ACTL_START_PEND, | 570 | cdev->private->irb.scsw.stctl = SCSW_STCTL_STATUS_PEND; |
573 | .stctl = SCSW_STCTL_STATUS_PEND, | ||
574 | }; | ||
575 | cdev->private->flags.fake_irb = 0; | 571 | cdev->private->flags.fake_irb = 0; |
576 | if (cdev->handler) | 572 | if (cdev->handler) |
577 | cdev->handler(cdev, cdev->private->intparm, | 573 | cdev->handler(cdev, cdev->private->intparm, |
diff --git a/drivers/s390/cio/device_pgid.c b/drivers/s390/cio/device_pgid.c index 32610fd8868e..1693a102dcfe 100644 --- a/drivers/s390/cio/device_pgid.c +++ b/drivers/s390/cio/device_pgid.c | |||
@@ -24,6 +24,21 @@ | |||
24 | #include "ioasm.h" | 24 | #include "ioasm.h" |
25 | 25 | ||
26 | /* | 26 | /* |
27 | * Helper function called from interrupt context to decide whether an | ||
28 | * operation should be tried again. | ||
29 | */ | ||
30 | static int __ccw_device_should_retry(struct scsw *scsw) | ||
31 | { | ||
32 | /* CC is only valid if start function bit is set. */ | ||
33 | if ((scsw->fctl & SCSW_FCTL_START_FUNC) && scsw->cc == 1) | ||
34 | return 1; | ||
35 | /* No more activity. For sense and set PGID we stubbornly try again. */ | ||
36 | if (!scsw->actl) | ||
37 | return 1; | ||
38 | return 0; | ||
39 | } | ||
40 | |||
41 | /* | ||
27 | * Start Sense Path Group ID helper function. Used in ccw_device_recog | 42 | * Start Sense Path Group ID helper function. Used in ccw_device_recog |
28 | * and ccw_device_sense_pgid. | 43 | * and ccw_device_sense_pgid. |
29 | */ | 44 | */ |
@@ -155,10 +170,10 @@ ccw_device_sense_pgid_irq(struct ccw_device *cdev, enum dev_event dev_event) | |||
155 | int ret; | 170 | int ret; |
156 | 171 | ||
157 | irb = (struct irb *) __LC_IRB; | 172 | irb = (struct irb *) __LC_IRB; |
158 | /* Retry sense pgid for cc=1. */ | 173 | |
159 | if (irb->scsw.stctl == | 174 | if (irb->scsw.stctl == |
160 | (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) { | 175 | (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) { |
161 | if (irb->scsw.cc == 1) { | 176 | if (__ccw_device_should_retry(&irb->scsw)) { |
162 | ret = __ccw_device_sense_pgid_start(cdev); | 177 | ret = __ccw_device_sense_pgid_start(cdev); |
163 | if (ret && ret != -EBUSY) | 178 | if (ret && ret != -EBUSY) |
164 | ccw_device_sense_pgid_done(cdev, ret); | 179 | ccw_device_sense_pgid_done(cdev, ret); |
@@ -391,10 +406,10 @@ ccw_device_verify_irq(struct ccw_device *cdev, enum dev_event dev_event) | |||
391 | int ret; | 406 | int ret; |
392 | 407 | ||
393 | irb = (struct irb *) __LC_IRB; | 408 | irb = (struct irb *) __LC_IRB; |
394 | /* Retry set pgid for cc=1. */ | 409 | |
395 | if (irb->scsw.stctl == | 410 | if (irb->scsw.stctl == |
396 | (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) { | 411 | (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) { |
397 | if (irb->scsw.cc == 1) | 412 | if (__ccw_device_should_retry(&irb->scsw)) |
398 | __ccw_device_verify_start(cdev); | 413 | __ccw_device_verify_start(cdev); |
399 | return; | 414 | return; |
400 | } | 415 | } |
@@ -494,10 +509,10 @@ ccw_device_disband_irq(struct ccw_device *cdev, enum dev_event dev_event) | |||
494 | int ret; | 509 | int ret; |
495 | 510 | ||
496 | irb = (struct irb *) __LC_IRB; | 511 | irb = (struct irb *) __LC_IRB; |
497 | /* Retry set pgid for cc=1. */ | 512 | |
498 | if (irb->scsw.stctl == | 513 | if (irb->scsw.stctl == |
499 | (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) { | 514 | (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) { |
500 | if (irb->scsw.cc == 1) | 515 | if (__ccw_device_should_retry(&irb->scsw)) |
501 | __ccw_device_disband_start(cdev); | 516 | __ccw_device_disband_start(cdev); |
502 | return; | 517 | return; |
503 | } | 518 | } |