aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio
diff options
context:
space:
mode:
authorJeremy Erickson <jerickso@cs.unc.edu>2014-04-18 17:06:00 -0400
committerJeremy Erickson <jerickso@cs.unc.edu>2014-04-18 17:06:00 -0400
commita215aa7b9ab3759c047201199fba64d3042d7f13 (patch)
treebca37493d9b2233450e6d3ffced1261d0e4f71fe /drivers/s390/cio
parentd31199a77ef606f1d06894385f1852181ba6136b (diff)
Update 2.6.36 to 2.6.36.4wip-dissipation2-jerickso
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r--drivers/s390/cio/qdio.h6
-rw-r--r--drivers/s390/cio/qdio_main.c43
2 files changed, 34 insertions, 15 deletions
diff --git a/drivers/s390/cio/qdio.h b/drivers/s390/cio/qdio.h
index f0037eefd44e..142af5bc3a4f 100644
--- a/drivers/s390/cio/qdio.h
+++ b/drivers/s390/cio/qdio.h
@@ -91,6 +91,12 @@ enum qdio_irq_states {
91#define AC1_SC_QEBSM_AVAILABLE 0x02 /* available for subchannel */ 91#define AC1_SC_QEBSM_AVAILABLE 0x02 /* available for subchannel */
92#define AC1_SC_QEBSM_ENABLED 0x01 /* enabled for subchannel */ 92#define AC1_SC_QEBSM_ENABLED 0x01 /* enabled for subchannel */
93 93
94/* SIGA flags */
95#define QDIO_SIGA_WRITE 0x00
96#define QDIO_SIGA_READ 0x01
97#define QDIO_SIGA_SYNC 0x02
98#define QDIO_SIGA_QEBSM_FLAG 0x80
99
94#ifdef CONFIG_64BIT 100#ifdef CONFIG_64BIT
95static inline int do_sqbs(u64 token, unsigned char state, int queue, 101static inline int do_sqbs(u64 token, unsigned char state, int queue,
96 int *start, int *count) 102 int *start, int *count)
diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c
index 00520f9a7a8e..1763afcd89ec 100644
--- a/drivers/s390/cio/qdio_main.c
+++ b/drivers/s390/cio/qdio_main.c
@@ -29,11 +29,12 @@ MODULE_AUTHOR("Utz Bacher <utz.bacher@de.ibm.com>,"\
29MODULE_DESCRIPTION("QDIO base support"); 29MODULE_DESCRIPTION("QDIO base support");
30MODULE_LICENSE("GPL"); 30MODULE_LICENSE("GPL");
31 31
32static inline int do_siga_sync(struct subchannel_id schid, 32static inline int do_siga_sync(unsigned long schid,
33 unsigned int out_mask, unsigned int in_mask) 33 unsigned int out_mask, unsigned int in_mask,
34 unsigned int fc)
34{ 35{
35 register unsigned long __fc asm ("0") = 2; 36 register unsigned long __fc asm ("0") = fc;
36 register struct subchannel_id __schid asm ("1") = schid; 37 register unsigned long __schid asm ("1") = schid;
37 register unsigned long out asm ("2") = out_mask; 38 register unsigned long out asm ("2") = out_mask;
38 register unsigned long in asm ("3") = in_mask; 39 register unsigned long in asm ("3") = in_mask;
39 int cc; 40 int cc;
@@ -47,10 +48,11 @@ static inline int do_siga_sync(struct subchannel_id schid,
47 return cc; 48 return cc;
48} 49}
49 50
50static inline int do_siga_input(struct subchannel_id schid, unsigned int mask) 51static inline int do_siga_input(unsigned long schid, unsigned int mask,
52 unsigned int fc)
51{ 53{
52 register unsigned long __fc asm ("0") = 1; 54 register unsigned long __fc asm ("0") = fc;
53 register struct subchannel_id __schid asm ("1") = schid; 55 register unsigned long __schid asm ("1") = schid;
54 register unsigned long __mask asm ("2") = mask; 56 register unsigned long __mask asm ("2") = mask;
55 int cc; 57 int cc;
56 58
@@ -279,6 +281,8 @@ void qdio_init_buf_states(struct qdio_irq *irq_ptr)
279static inline int qdio_siga_sync(struct qdio_q *q, unsigned int output, 281static inline int qdio_siga_sync(struct qdio_q *q, unsigned int output,
280 unsigned int input) 282 unsigned int input)
281{ 283{
284 unsigned long schid = *((u32 *) &q->irq_ptr->schid);
285 unsigned int fc = QDIO_SIGA_SYNC;
282 int cc; 286 int cc;
283 287
284 if (!need_siga_sync(q)) 288 if (!need_siga_sync(q))
@@ -287,7 +291,12 @@ static inline int qdio_siga_sync(struct qdio_q *q, unsigned int output,
287 DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "siga-s:%1d", q->nr); 291 DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "siga-s:%1d", q->nr);
288 qperf_inc(q, siga_sync); 292 qperf_inc(q, siga_sync);
289 293
290 cc = do_siga_sync(q->irq_ptr->schid, output, input); 294 if (is_qebsm(q)) {
295 schid = q->irq_ptr->sch_token;
296 fc |= QDIO_SIGA_QEBSM_FLAG;
297 }
298
299 cc = do_siga_sync(schid, output, input, fc);
291 if (cc) 300 if (cc)
292 DBF_ERROR("%4x SIGA-S:%2d", SCH_NO(q), cc); 301 DBF_ERROR("%4x SIGA-S:%2d", SCH_NO(q), cc);
293 return cc; 302 return cc;
@@ -313,8 +322,8 @@ static inline int qdio_siga_sync_all(struct qdio_q *q)
313 322
314static int qdio_siga_output(struct qdio_q *q, unsigned int *busy_bit) 323static int qdio_siga_output(struct qdio_q *q, unsigned int *busy_bit)
315{ 324{
316 unsigned long schid; 325 unsigned long schid = *((u32 *) &q->irq_ptr->schid);
317 unsigned int fc = 0; 326 unsigned int fc = QDIO_SIGA_WRITE;
318 u64 start_time = 0; 327 u64 start_time = 0;
319 int cc; 328 int cc;
320 329
@@ -323,11 +332,8 @@ static int qdio_siga_output(struct qdio_q *q, unsigned int *busy_bit)
323 332
324 if (is_qebsm(q)) { 333 if (is_qebsm(q)) {
325 schid = q->irq_ptr->sch_token; 334 schid = q->irq_ptr->sch_token;
326 fc |= 0x80; 335 fc |= QDIO_SIGA_QEBSM_FLAG;
327 } 336 }
328 else
329 schid = *((u32 *)&q->irq_ptr->schid);
330
331again: 337again:
332 cc = do_siga_output(schid, q->mask, busy_bit, fc); 338 cc = do_siga_output(schid, q->mask, busy_bit, fc);
333 339
@@ -347,12 +353,19 @@ again:
347 353
348static inline int qdio_siga_input(struct qdio_q *q) 354static inline int qdio_siga_input(struct qdio_q *q)
349{ 355{
356 unsigned long schid = *((u32 *) &q->irq_ptr->schid);
357 unsigned int fc = QDIO_SIGA_READ;
350 int cc; 358 int cc;
351 359
352 DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "siga-r:%1d", q->nr); 360 DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "siga-r:%1d", q->nr);
353 qperf_inc(q, siga_read); 361 qperf_inc(q, siga_read);
354 362
355 cc = do_siga_input(q->irq_ptr->schid, q->mask); 363 if (is_qebsm(q)) {
364 schid = q->irq_ptr->sch_token;
365 fc |= QDIO_SIGA_QEBSM_FLAG;
366 }
367
368 cc = do_siga_input(schid, q->mask, fc);
356 if (cc) 369 if (cc)
357 DBF_ERROR("%4x SIGA-R:%2d", SCH_NO(q), cc); 370 DBF_ERROR("%4x SIGA-R:%2d", SCH_NO(q), cc);
358 return cc; 371 return cc;