aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/device_fsm.c
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2008-01-26 08:10:43 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-01-26 08:10:59 -0500
commitcd6b4f27b9bb2a6a5ec82b96b87c85421257be6c (patch)
treebf5ac3d351242de6438ab1453a7f1b007f24c29f /drivers/s390/cio/device_fsm.c
parentbc698bcf8897363732226dc9ecba044771679996 (diff)
[S390] cio: Introduce subchannel->private.
Introduce a private pointer in struct subchannel to store per-subchannel type data (cannot use dev->priv since this is already used for something else). Create a new header io_sch.h for I/O subchannel specific structures and instructions. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/device_fsm.c')
-rw-r--r--drivers/s390/cio/device_fsm.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c
index 8b6be2142c81..44ce7a3d3857 100644
--- a/drivers/s390/cio/device_fsm.c
+++ b/drivers/s390/cio/device_fsm.c
@@ -96,29 +96,32 @@ static void ccw_timeout_log(struct ccw_device *cdev)
96{ 96{
97 struct schib schib; 97 struct schib schib;
98 struct subchannel *sch; 98 struct subchannel *sch;
99 struct io_subchannel_private *private;
99 int cc; 100 int cc;
100 101
101 sch = to_subchannel(cdev->dev.parent); 102 sch = to_subchannel(cdev->dev.parent);
103 private = to_io_private(sch);
102 cc = stsch(sch->schid, &schib); 104 cc = stsch(sch->schid, &schib);
103 105
104 printk(KERN_WARNING "cio: ccw device timeout occurred at %llx, " 106 printk(KERN_WARNING "cio: ccw device timeout occurred at %llx, "
105 "device information:\n", get_clock()); 107 "device information:\n", get_clock());
106 printk(KERN_WARNING "cio: orb:\n"); 108 printk(KERN_WARNING "cio: orb:\n");
107 print_hex_dump(KERN_WARNING, "cio: ", DUMP_PREFIX_NONE, 16, 1, 109 print_hex_dump(KERN_WARNING, "cio: ", DUMP_PREFIX_NONE, 16, 1,
108 &sch->orb, sizeof(sch->orb), 0); 110 &private->orb, sizeof(private->orb), 0);
109 printk(KERN_WARNING "cio: ccw device bus id: %s\n", cdev->dev.bus_id); 111 printk(KERN_WARNING "cio: ccw device bus id: %s\n", cdev->dev.bus_id);
110 printk(KERN_WARNING "cio: subchannel bus id: %s\n", sch->dev.bus_id); 112 printk(KERN_WARNING "cio: subchannel bus id: %s\n", sch->dev.bus_id);
111 printk(KERN_WARNING "cio: subchannel lpm: %02x, opm: %02x, " 113 printk(KERN_WARNING "cio: subchannel lpm: %02x, opm: %02x, "
112 "vpm: %02x\n", sch->lpm, sch->opm, sch->vpm); 114 "vpm: %02x\n", sch->lpm, sch->opm, sch->vpm);
113 115
114 if ((void *)(addr_t)sch->orb.cpa == &sch->sense_ccw || 116 if ((void *)(addr_t)private->orb.cpa == &private->sense_ccw ||
115 (void *)(addr_t)sch->orb.cpa == cdev->private->iccws) 117 (void *)(addr_t)private->orb.cpa == cdev->private->iccws)
116 printk(KERN_WARNING "cio: last channel program (intern):\n"); 118 printk(KERN_WARNING "cio: last channel program (intern):\n");
117 else 119 else
118 printk(KERN_WARNING "cio: last channel program:\n"); 120 printk(KERN_WARNING "cio: last channel program:\n");
119 121
120 print_hex_dump(KERN_WARNING, "cio: ", DUMP_PREFIX_NONE, 16, 1, 122 print_hex_dump(KERN_WARNING, "cio: ", DUMP_PREFIX_NONE, 16, 1,
121 (void *)(addr_t)sch->orb.cpa, sizeof(struct ccw1), 0); 123 (void *)(addr_t)private->orb.cpa,
124 sizeof(struct ccw1), 0);
122 printk(KERN_WARNING "cio: ccw device state: %d\n", 125 printk(KERN_WARNING "cio: ccw device state: %d\n",
123 cdev->private->state); 126 cdev->private->state);
124 printk(KERN_WARNING "cio: store subchannel returned: cc=%d\n", cc); 127 printk(KERN_WARNING "cio: store subchannel returned: cc=%d\n", cc);
@@ -1078,7 +1081,7 @@ device_trigger_reprobe(struct subchannel *sch)
1078 sch->schib.pmcw.ena = 0; 1081 sch->schib.pmcw.ena = 0;
1079 if ((sch->lpm & (sch->lpm - 1)) != 0) 1082 if ((sch->lpm & (sch->lpm - 1)) != 0)
1080 sch->schib.pmcw.mp = 1; 1083 sch->schib.pmcw.mp = 1;
1081 sch->schib.pmcw.intparm = (__u32)(unsigned long)sch; 1084 sch->schib.pmcw.intparm = (u32)(addr_t)sch;
1082 /* We should also udate ssd info, but this has to wait. */ 1085 /* We should also udate ssd info, but this has to wait. */
1083 /* Check if this is another device which appeared on the same sch. */ 1086 /* Check if this is another device which appeared on the same sch. */
1084 if (sch->schib.pmcw.dev != cdev->private->dev_id.devno) { 1087 if (sch->schib.pmcw.dev != cdev->private->dev_id.devno) {