aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/qdio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/cio/qdio.c')
-rw-r--r--drivers/s390/cio/qdio.c107
1 files changed, 55 insertions, 52 deletions
diff --git a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c
index e8bdfcd1d02a..5c7001b5c7a1 100644
--- a/drivers/s390/cio/qdio.c
+++ b/drivers/s390/cio/qdio.c
@@ -270,7 +270,7 @@ qdio_siga_sync(struct qdio_q *q, unsigned int gpr2,
270 perf_stats.siga_syncs++; 270 perf_stats.siga_syncs++;
271#endif /* QDIO_PERFORMANCE_STATS */ 271#endif /* QDIO_PERFORMANCE_STATS */
272 272
273 cc = do_siga_sync(0x10000|q->irq, gpr2, gpr3); 273 cc = do_siga_sync(q->schid, gpr2, gpr3);
274 if (cc) 274 if (cc)
275 QDIO_DBF_HEX3(0,trace,&cc,sizeof(int*)); 275 QDIO_DBF_HEX3(0,trace,&cc,sizeof(int*));
276 276
@@ -290,12 +290,16 @@ __do_siga_output(struct qdio_q *q, unsigned int *busy_bit)
290{ 290{
291 struct qdio_irq *irq; 291 struct qdio_irq *irq;
292 unsigned int fc = 0; 292 unsigned int fc = 0;
293 unsigned long schid;
293 294
294 irq = (struct qdio_irq *) q->irq_ptr; 295 irq = (struct qdio_irq *) q->irq_ptr;
295 if (!irq->is_qebsm) 296 if (!irq->is_qebsm)
296 return do_siga_output(0x10000|q->irq, q->mask, busy_bit, fc); 297 schid = *((u32 *)&q->schid);
297 fc |= 0x80; 298 else {
298 return do_siga_output(irq->sch_token, q->mask, busy_bit, fc); 299 schid = irq->sch_token;
300 fc |= 0x80;
301 }
302 return do_siga_output(schid, q->mask, busy_bit, fc);
299} 303}
300 304
301/* 305/*
@@ -349,7 +353,7 @@ qdio_siga_input(struct qdio_q *q)
349 perf_stats.siga_ins++; 353 perf_stats.siga_ins++;
350#endif /* QDIO_PERFORMANCE_STATS */ 354#endif /* QDIO_PERFORMANCE_STATS */
351 355
352 cc = do_siga_input(0x10000|q->irq, q->mask); 356 cc = do_siga_input(q->schid, q->mask);
353 357
354 if (cc) 358 if (cc)
355 QDIO_DBF_HEX3(0,trace,&cc,sizeof(int*)); 359 QDIO_DBF_HEX3(0,trace,&cc,sizeof(int*));
@@ -855,7 +859,7 @@ qdio_kick_outbound_q(struct qdio_q *q)
855 /* went smooth this time, reset timestamp */ 859 /* went smooth this time, reset timestamp */
856#ifdef CONFIG_QDIO_DEBUG 860#ifdef CONFIG_QDIO_DEBUG
857 QDIO_DBF_TEXT3(0,trace,"cc2reslv"); 861 QDIO_DBF_TEXT3(0,trace,"cc2reslv");
858 sprintf(dbf_text,"%4x%2x%2x",q->irq,q->q_no, 862 sprintf(dbf_text,"%4x%2x%2x",q->schid.sch_no,q->q_no,
859 atomic_read(&q->busy_siga_counter)); 863 atomic_read(&q->busy_siga_counter));
860 QDIO_DBF_TEXT3(0,trace,dbf_text); 864 QDIO_DBF_TEXT3(0,trace,dbf_text);
861#endif /* CONFIG_QDIO_DEBUG */ 865#endif /* CONFIG_QDIO_DEBUG */
@@ -878,7 +882,7 @@ qdio_kick_outbound_q(struct qdio_q *q)
878 } 882 }
879 QDIO_DBF_TEXT2(0,trace,"cc2REPRT"); 883 QDIO_DBF_TEXT2(0,trace,"cc2REPRT");
880#ifdef CONFIG_QDIO_DEBUG 884#ifdef CONFIG_QDIO_DEBUG
881 sprintf(dbf_text,"%4x%2x%2x",q->irq,q->q_no, 885 sprintf(dbf_text,"%4x%2x%2x",q->schid.sch_no,q->q_no,
882 atomic_read(&q->busy_siga_counter)); 886 atomic_read(&q->busy_siga_counter));
883 QDIO_DBF_TEXT3(0,trace,dbf_text); 887 QDIO_DBF_TEXT3(0,trace,dbf_text);
884#endif /* CONFIG_QDIO_DEBUG */ 888#endif /* CONFIG_QDIO_DEBUG */
@@ -1733,7 +1737,7 @@ qdio_fill_qs(struct qdio_irq *irq_ptr, struct ccw_device *cdev,
1733 void *ptr; 1737 void *ptr;
1734 int available; 1738 int available;
1735 1739
1736 sprintf(dbf_text,"qfqs%4x",cdev->private->irq); 1740 sprintf(dbf_text,"qfqs%4x",cdev->private->sch_no);
1737 QDIO_DBF_TEXT0(0,setup,dbf_text); 1741 QDIO_DBF_TEXT0(0,setup,dbf_text);
1738 for (i=0;i<no_input_qs;i++) { 1742 for (i=0;i<no_input_qs;i++) {
1739 q=irq_ptr->input_qs[i]; 1743 q=irq_ptr->input_qs[i];
@@ -1753,7 +1757,7 @@ qdio_fill_qs(struct qdio_irq *irq_ptr, struct ccw_device *cdev,
1753 1757
1754 q->queue_type=q_format; 1758 q->queue_type=q_format;
1755 q->int_parm=int_parm; 1759 q->int_parm=int_parm;
1756 q->irq=irq_ptr->irq; 1760 q->schid = irq_ptr->schid;
1757 q->irq_ptr = irq_ptr; 1761 q->irq_ptr = irq_ptr;
1758 q->cdev = cdev; 1762 q->cdev = cdev;
1759 q->mask=1<<(31-i); 1763 q->mask=1<<(31-i);
@@ -1826,7 +1830,7 @@ qdio_fill_qs(struct qdio_irq *irq_ptr, struct ccw_device *cdev,
1826 q->queue_type=q_format; 1830 q->queue_type=q_format;
1827 q->int_parm=int_parm; 1831 q->int_parm=int_parm;
1828 q->is_input_q=0; 1832 q->is_input_q=0;
1829 q->irq=irq_ptr->irq; 1833 q->schid = irq_ptr->schid;
1830 q->cdev = cdev; 1834 q->cdev = cdev;
1831 q->irq_ptr = irq_ptr; 1835 q->irq_ptr = irq_ptr;
1832 q->mask=1<<(31-i); 1836 q->mask=1<<(31-i);
@@ -1933,7 +1937,7 @@ qdio_set_state(struct qdio_irq *irq_ptr, enum qdio_irq_states state)
1933 char dbf_text[15]; 1937 char dbf_text[15];
1934 1938
1935 QDIO_DBF_TEXT5(0,trace,"newstate"); 1939 QDIO_DBF_TEXT5(0,trace,"newstate");
1936 sprintf(dbf_text,"%4x%4x",irq_ptr->irq,state); 1940 sprintf(dbf_text,"%4x%4x",irq_ptr->schid.sch_no,state);
1937 QDIO_DBF_TEXT5(0,trace,dbf_text); 1941 QDIO_DBF_TEXT5(0,trace,dbf_text);
1938#endif /* CONFIG_QDIO_DEBUG */ 1942#endif /* CONFIG_QDIO_DEBUG */
1939 1943
@@ -1946,12 +1950,12 @@ qdio_set_state(struct qdio_irq *irq_ptr, enum qdio_irq_states state)
1946} 1950}
1947 1951
1948static inline void 1952static inline void
1949qdio_irq_check_sense(int irq, struct irb *irb) 1953qdio_irq_check_sense(struct subchannel_id schid, struct irb *irb)
1950{ 1954{
1951 char dbf_text[15]; 1955 char dbf_text[15];
1952 1956
1953 if (irb->esw.esw0.erw.cons) { 1957 if (irb->esw.esw0.erw.cons) {
1954 sprintf(dbf_text,"sens%4x",irq); 1958 sprintf(dbf_text,"sens%4x",schid.sch_no);
1955 QDIO_DBF_TEXT2(1,trace,dbf_text); 1959 QDIO_DBF_TEXT2(1,trace,dbf_text);
1956 QDIO_DBF_HEX0(0,sense,irb,QDIO_DBF_SENSE_LEN); 1960 QDIO_DBF_HEX0(0,sense,irb,QDIO_DBF_SENSE_LEN);
1957 1961
@@ -2063,20 +2067,20 @@ qdio_timeout_handler(struct ccw_device *cdev)
2063 switch (irq_ptr->state) { 2067 switch (irq_ptr->state) {
2064 case QDIO_IRQ_STATE_INACTIVE: 2068 case QDIO_IRQ_STATE_INACTIVE:
2065 QDIO_PRINT_ERR("establish queues on irq %04x: timed out\n", 2069 QDIO_PRINT_ERR("establish queues on irq %04x: timed out\n",
2066 irq_ptr->irq); 2070 irq_ptr->schid.sch_no);
2067 QDIO_DBF_TEXT2(1,setup,"eq:timeo"); 2071 QDIO_DBF_TEXT2(1,setup,"eq:timeo");
2068 qdio_set_state(irq_ptr, QDIO_IRQ_STATE_ERR); 2072 qdio_set_state(irq_ptr, QDIO_IRQ_STATE_ERR);
2069 break; 2073 break;
2070 case QDIO_IRQ_STATE_CLEANUP: 2074 case QDIO_IRQ_STATE_CLEANUP:
2071 QDIO_PRINT_INFO("Did not get interrupt on cleanup, irq=0x%x.\n", 2075 QDIO_PRINT_INFO("Did not get interrupt on cleanup, irq=0x%x.\n",
2072 irq_ptr->irq); 2076 irq_ptr->schid.sch_no);
2073 qdio_set_state(irq_ptr, QDIO_IRQ_STATE_ERR); 2077 qdio_set_state(irq_ptr, QDIO_IRQ_STATE_ERR);
2074 break; 2078 break;
2075 case QDIO_IRQ_STATE_ESTABLISHED: 2079 case QDIO_IRQ_STATE_ESTABLISHED:
2076 case QDIO_IRQ_STATE_ACTIVE: 2080 case QDIO_IRQ_STATE_ACTIVE:
2077 /* I/O has been terminated by common I/O layer. */ 2081 /* I/O has been terminated by common I/O layer. */
2078 QDIO_PRINT_INFO("Queues on irq %04x killed by cio.\n", 2082 QDIO_PRINT_INFO("Queues on irq %04x killed by cio.\n",
2079 irq_ptr->irq); 2083 irq_ptr->schid.sch_no);
2080 QDIO_DBF_TEXT2(1, trace, "cio:term"); 2084 QDIO_DBF_TEXT2(1, trace, "cio:term");
2081 qdio_set_state(irq_ptr, QDIO_IRQ_STATE_STOPPED); 2085 qdio_set_state(irq_ptr, QDIO_IRQ_STATE_STOPPED);
2082 if (get_device(&cdev->dev)) { 2086 if (get_device(&cdev->dev)) {
@@ -2139,7 +2143,7 @@ qdio_handler(struct ccw_device *cdev, unsigned long intparm, struct irb *irb)
2139 } 2143 }
2140 } 2144 }
2141 2145
2142 qdio_irq_check_sense(irq_ptr->irq, irb); 2146 qdio_irq_check_sense(irq_ptr->schid, irb);
2143 2147
2144#ifdef CONFIG_QDIO_DEBUG 2148#ifdef CONFIG_QDIO_DEBUG
2145 sprintf(dbf_text, "state:%d", irq_ptr->state); 2149 sprintf(dbf_text, "state:%d", irq_ptr->state);
@@ -2195,7 +2199,7 @@ qdio_synchronize(struct ccw_device *cdev, unsigned int flags,
2195 return -ENODEV; 2199 return -ENODEV;
2196 2200
2197#ifdef CONFIG_QDIO_DEBUG 2201#ifdef CONFIG_QDIO_DEBUG
2198 *((int*)(&dbf_text[4])) = irq_ptr->irq; 2202 *((int*)(&dbf_text[4])) = irq_ptr->schid.sch_no;
2199 QDIO_DBF_HEX4(0,trace,dbf_text,QDIO_DBF_TRACE_LEN); 2203 QDIO_DBF_HEX4(0,trace,dbf_text,QDIO_DBF_TRACE_LEN);
2200 *((int*)(&dbf_text[0]))=flags; 2204 *((int*)(&dbf_text[0]))=flags;
2201 *((int*)(&dbf_text[4]))=queue_number; 2205 *((int*)(&dbf_text[4]))=queue_number;
@@ -2207,13 +2211,13 @@ qdio_synchronize(struct ccw_device *cdev, unsigned int flags,
2207 if (!q) 2211 if (!q)
2208 return -EINVAL; 2212 return -EINVAL;
2209 if (!(irq_ptr->is_qebsm)) 2213 if (!(irq_ptr->is_qebsm))
2210 cc = do_siga_sync(0x10000|q->irq, 0, q->mask); 2214 cc = do_siga_sync(q->schid, 0, q->mask);
2211 } else if (flags&QDIO_FLAG_SYNC_OUTPUT) { 2215 } else if (flags&QDIO_FLAG_SYNC_OUTPUT) {
2212 q=irq_ptr->output_qs[queue_number]; 2216 q=irq_ptr->output_qs[queue_number];
2213 if (!q) 2217 if (!q)
2214 return -EINVAL; 2218 return -EINVAL;
2215 if (!(irq_ptr->is_qebsm)) 2219 if (!(irq_ptr->is_qebsm))
2216 cc = do_siga_sync(0x10000|q->irq, q->mask, 0); 2220 cc = do_siga_sync(q->schid, q->mask, 0);
2217 } else 2221 } else
2218 return -EINVAL; 2222 return -EINVAL;
2219 2223
@@ -2298,7 +2302,7 @@ qdio_get_ssqd_information(struct qdio_irq *irq_ptr)
2298 ssqd_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); 2302 ssqd_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA);
2299 if (!ssqd_area) { 2303 if (!ssqd_area) {
2300 QDIO_PRINT_WARN("Could not get memory for chsc. Using all " \ 2304 QDIO_PRINT_WARN("Could not get memory for chsc. Using all " \
2301 "SIGAs for sch x%x.\n", irq_ptr->irq); 2305 "SIGAs for sch x%x.\n", irq_ptr->schid.sch_no);
2302 irq_ptr->qdioac = CHSC_FLAG_SIGA_INPUT_NECESSARY || 2306 irq_ptr->qdioac = CHSC_FLAG_SIGA_INPUT_NECESSARY ||
2303 CHSC_FLAG_SIGA_OUTPUT_NECESSARY || 2307 CHSC_FLAG_SIGA_OUTPUT_NECESSARY ||
2304 CHSC_FLAG_SIGA_SYNC_NECESSARY; /* all flags set */ 2308 CHSC_FLAG_SIGA_SYNC_NECESSARY; /* all flags set */
@@ -2312,14 +2316,14 @@ qdio_get_ssqd_information(struct qdio_irq *irq_ptr)
2312 .length = 0x0010, 2316 .length = 0x0010,
2313 .code = 0x0024, 2317 .code = 0x0024,
2314 }; 2318 };
2315 ssqd_area->first_sch = irq_ptr->irq; 2319 ssqd_area->first_sch = irq_ptr->schid.sch_no;
2316 ssqd_area->last_sch = irq_ptr->irq; 2320 ssqd_area->last_sch = irq_ptr->schid.sch_no;
2317 result = chsc(ssqd_area); 2321 result = chsc(ssqd_area);
2318 2322
2319 if (result) { 2323 if (result) {
2320 QDIO_PRINT_WARN("CHSC returned cc %i. Using all " \ 2324 QDIO_PRINT_WARN("CHSC returned cc %i. Using all " \
2321 "SIGAs for sch x%x.\n", 2325 "SIGAs for sch x%x.\n",
2322 result, irq_ptr->irq); 2326 result, irq_ptr->schid.sch_no);
2323 qdioac = CHSC_FLAG_SIGA_INPUT_NECESSARY || 2327 qdioac = CHSC_FLAG_SIGA_INPUT_NECESSARY ||
2324 CHSC_FLAG_SIGA_OUTPUT_NECESSARY || 2328 CHSC_FLAG_SIGA_OUTPUT_NECESSARY ||
2325 CHSC_FLAG_SIGA_SYNC_NECESSARY; /* all flags set */ 2329 CHSC_FLAG_SIGA_SYNC_NECESSARY; /* all flags set */
@@ -2330,7 +2334,7 @@ qdio_get_ssqd_information(struct qdio_irq *irq_ptr)
2330 if (ssqd_area->response.code != QDIO_CHSC_RESPONSE_CODE_OK) { 2334 if (ssqd_area->response.code != QDIO_CHSC_RESPONSE_CODE_OK) {
2331 QDIO_PRINT_WARN("response upon checking SIGA needs " \ 2335 QDIO_PRINT_WARN("response upon checking SIGA needs " \
2332 "is 0x%x. Using all SIGAs for sch x%x.\n", 2336 "is 0x%x. Using all SIGAs for sch x%x.\n",
2333 ssqd_area->response.code, irq_ptr->irq); 2337 ssqd_area->response.code, irq_ptr->schid.sch_no);
2334 qdioac = CHSC_FLAG_SIGA_INPUT_NECESSARY || 2338 qdioac = CHSC_FLAG_SIGA_INPUT_NECESSARY ||
2335 CHSC_FLAG_SIGA_OUTPUT_NECESSARY || 2339 CHSC_FLAG_SIGA_OUTPUT_NECESSARY ||
2336 CHSC_FLAG_SIGA_SYNC_NECESSARY; /* all flags set */ 2340 CHSC_FLAG_SIGA_SYNC_NECESSARY; /* all flags set */
@@ -2339,9 +2343,9 @@ qdio_get_ssqd_information(struct qdio_irq *irq_ptr)
2339 } 2343 }
2340 if (!(ssqd_area->flags & CHSC_FLAG_QDIO_CAPABILITY) || 2344 if (!(ssqd_area->flags & CHSC_FLAG_QDIO_CAPABILITY) ||
2341 !(ssqd_area->flags & CHSC_FLAG_VALIDITY) || 2345 !(ssqd_area->flags & CHSC_FLAG_VALIDITY) ||
2342 (ssqd_area->sch != irq_ptr->irq)) { 2346 (ssqd_area->sch != irq_ptr->schid.sch_no)) {
2343 QDIO_PRINT_WARN("huh? problems checking out sch x%x... " \ 2347 QDIO_PRINT_WARN("huh? problems checking out sch x%x... " \
2344 "using all SIGAs.\n",irq_ptr->irq); 2348 "using all SIGAs.\n",irq_ptr->schid.sch_no);
2345 qdioac = CHSC_FLAG_SIGA_INPUT_NECESSARY | 2349 qdioac = CHSC_FLAG_SIGA_INPUT_NECESSARY |
2346 CHSC_FLAG_SIGA_OUTPUT_NECESSARY | 2350 CHSC_FLAG_SIGA_OUTPUT_NECESSARY |
2347 CHSC_FLAG_SIGA_SYNC_NECESSARY; /* worst case */ 2351 CHSC_FLAG_SIGA_SYNC_NECESSARY; /* worst case */
@@ -2427,7 +2431,7 @@ tiqdio_set_subchannel_ind(struct qdio_irq *irq_ptr, int reset_to_zero)
2427 /* set to 0x10000000 to enable 2431 /* set to 0x10000000 to enable
2428 * time delay disablement facility */ 2432 * time delay disablement facility */
2429 u32 reserved5; 2433 u32 reserved5;
2430 u32 subsystem_id; 2434 struct subchannel_id schid;
2431 u32 reserved6[1004]; 2435 u32 reserved6[1004];
2432 struct chsc_header response; 2436 struct chsc_header response;
2433 u32 reserved7; 2437 u32 reserved7;
@@ -2449,7 +2453,7 @@ tiqdio_set_subchannel_ind(struct qdio_irq *irq_ptr, int reset_to_zero)
2449 scssc_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); 2453 scssc_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA);
2450 if (!scssc_area) { 2454 if (!scssc_area) {
2451 QDIO_PRINT_WARN("No memory for setting indicators on " \ 2455 QDIO_PRINT_WARN("No memory for setting indicators on " \
2452 "subchannel x%x.\n", irq_ptr->irq); 2456 "subchannel x%x.\n", irq_ptr->schid.sch_no);
2453 return -ENOMEM; 2457 return -ENOMEM;
2454 } 2458 }
2455 scssc_area->request = (struct chsc_header) { 2459 scssc_area->request = (struct chsc_header) {
@@ -2463,7 +2467,7 @@ tiqdio_set_subchannel_ind(struct qdio_irq *irq_ptr, int reset_to_zero)
2463 scssc_area->ks = QDIO_STORAGE_KEY; 2467 scssc_area->ks = QDIO_STORAGE_KEY;
2464 scssc_area->kc = QDIO_STORAGE_KEY; 2468 scssc_area->kc = QDIO_STORAGE_KEY;
2465 scssc_area->isc = TIQDIO_THININT_ISC; 2469 scssc_area->isc = TIQDIO_THININT_ISC;
2466 scssc_area->subsystem_id = (1<<16) + irq_ptr->irq; 2470 scssc_area->schid = irq_ptr->schid;
2467 /* enables the time delay disablement facility. Don't care 2471 /* enables the time delay disablement facility. Don't care
2468 * whether it is really there (i.e. we haven't checked for 2472 * whether it is really there (i.e. we haven't checked for
2469 * it) */ 2473 * it) */
@@ -2473,12 +2477,10 @@ tiqdio_set_subchannel_ind(struct qdio_irq *irq_ptr, int reset_to_zero)
2473 QDIO_PRINT_WARN("Time delay disablement facility " \ 2477 QDIO_PRINT_WARN("Time delay disablement facility " \
2474 "not available\n"); 2478 "not available\n");
2475 2479
2476
2477
2478 result = chsc(scssc_area); 2480 result = chsc(scssc_area);
2479 if (result) { 2481 if (result) {
2480 QDIO_PRINT_WARN("could not set indicators on irq x%x, " \ 2482 QDIO_PRINT_WARN("could not set indicators on irq x%x, " \
2481 "cc=%i.\n",irq_ptr->irq,result); 2483 "cc=%i.\n",irq_ptr->schid.sch_no,result);
2482 result = -EIO; 2484 result = -EIO;
2483 goto out; 2485 goto out;
2484 } 2486 }
@@ -2534,7 +2536,7 @@ tiqdio_set_delay_target(struct qdio_irq *irq_ptr, unsigned long delay_target)
2534 scsscf_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); 2536 scsscf_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA);
2535 if (!scsscf_area) { 2537 if (!scsscf_area) {
2536 QDIO_PRINT_WARN("No memory for setting delay target on " \ 2538 QDIO_PRINT_WARN("No memory for setting delay target on " \
2537 "subchannel x%x.\n", irq_ptr->irq); 2539 "subchannel x%x.\n", irq_ptr->schid.sch_no);
2538 return -ENOMEM; 2540 return -ENOMEM;
2539 } 2541 }
2540 scsscf_area->request = (struct chsc_header) { 2542 scsscf_area->request = (struct chsc_header) {
@@ -2547,7 +2549,8 @@ tiqdio_set_delay_target(struct qdio_irq *irq_ptr, unsigned long delay_target)
2547 result=chsc(scsscf_area); 2549 result=chsc(scsscf_area);
2548 if (result) { 2550 if (result) {
2549 QDIO_PRINT_WARN("could not set delay target on irq x%x, " \ 2551 QDIO_PRINT_WARN("could not set delay target on irq x%x, " \
2550 "cc=%i. Continuing.\n",irq_ptr->irq,result); 2552 "cc=%i. Continuing.\n",irq_ptr->schid.sch_no,
2553 result);
2551 result = -EIO; 2554 result = -EIO;
2552 goto out; 2555 goto out;
2553 } 2556 }
@@ -2581,7 +2584,7 @@ qdio_cleanup(struct ccw_device *cdev, int how)
2581 if (!irq_ptr) 2584 if (!irq_ptr)
2582 return -ENODEV; 2585 return -ENODEV;
2583 2586
2584 sprintf(dbf_text,"qcln%4x",irq_ptr->irq); 2587 sprintf(dbf_text,"qcln%4x",irq_ptr->schid.sch_no);
2585 QDIO_DBF_TEXT1(0,trace,dbf_text); 2588 QDIO_DBF_TEXT1(0,trace,dbf_text);
2586 QDIO_DBF_TEXT0(0,setup,dbf_text); 2589 QDIO_DBF_TEXT0(0,setup,dbf_text);
2587 2590
@@ -2608,7 +2611,7 @@ qdio_shutdown(struct ccw_device *cdev, int how)
2608 2611
2609 down(&irq_ptr->setting_up_sema); 2612 down(&irq_ptr->setting_up_sema);
2610 2613
2611 sprintf(dbf_text,"qsqs%4x",irq_ptr->irq); 2614 sprintf(dbf_text,"qsqs%4x",irq_ptr->schid.sch_no);
2612 QDIO_DBF_TEXT1(0,trace,dbf_text); 2615 QDIO_DBF_TEXT1(0,trace,dbf_text);
2613 QDIO_DBF_TEXT0(0,setup,dbf_text); 2616 QDIO_DBF_TEXT0(0,setup,dbf_text);
2614 2617
@@ -2714,7 +2717,7 @@ qdio_free(struct ccw_device *cdev)
2714 2717
2715 down(&irq_ptr->setting_up_sema); 2718 down(&irq_ptr->setting_up_sema);
2716 2719
2717 sprintf(dbf_text,"qfqs%4x",irq_ptr->irq); 2720 sprintf(dbf_text,"qfqs%4x",irq_ptr->schid.sch_no);
2718 QDIO_DBF_TEXT1(0,trace,dbf_text); 2721 QDIO_DBF_TEXT1(0,trace,dbf_text);
2719 QDIO_DBF_TEXT0(0,setup,dbf_text); 2722 QDIO_DBF_TEXT0(0,setup,dbf_text);
2720 2723
@@ -2862,13 +2865,13 @@ qdio_establish_irq_check_for_errors(struct ccw_device *cdev, int cstat,
2862 irq_ptr = cdev->private->qdio_data; 2865 irq_ptr = cdev->private->qdio_data;
2863 2866
2864 if (cstat || (dstat & ~(DEV_STAT_CHN_END|DEV_STAT_DEV_END))) { 2867 if (cstat || (dstat & ~(DEV_STAT_CHN_END|DEV_STAT_DEV_END))) {
2865 sprintf(dbf_text,"ick1%4x",irq_ptr->irq); 2868 sprintf(dbf_text,"ick1%4x",irq_ptr->schid.sch_no);
2866 QDIO_DBF_TEXT2(1,trace,dbf_text); 2869 QDIO_DBF_TEXT2(1,trace,dbf_text);
2867 QDIO_DBF_HEX2(0,trace,&dstat,sizeof(int)); 2870 QDIO_DBF_HEX2(0,trace,&dstat,sizeof(int));
2868 QDIO_DBF_HEX2(0,trace,&cstat,sizeof(int)); 2871 QDIO_DBF_HEX2(0,trace,&cstat,sizeof(int));
2869 QDIO_PRINT_ERR("received check condition on establish " \ 2872 QDIO_PRINT_ERR("received check condition on establish " \
2870 "queues on irq 0x%x (cs=x%x, ds=x%x).\n", 2873 "queues on irq 0x%x (cs=x%x, ds=x%x).\n",
2871 irq_ptr->irq,cstat,dstat); 2874 irq_ptr->schid.sch_no,cstat,dstat);
2872 qdio_set_state(irq_ptr,QDIO_IRQ_STATE_ERR); 2875 qdio_set_state(irq_ptr,QDIO_IRQ_STATE_ERR);
2873 } 2876 }
2874 2877
@@ -2878,7 +2881,7 @@ qdio_establish_irq_check_for_errors(struct ccw_device *cdev, int cstat,
2878 QDIO_DBF_HEX2(0,setup,&cstat, sizeof(cstat)); 2881 QDIO_DBF_HEX2(0,setup,&cstat, sizeof(cstat));
2879 QDIO_PRINT_ERR("establish queues on irq %04x: didn't get " 2882 QDIO_PRINT_ERR("establish queues on irq %04x: didn't get "
2880 "device end: dstat=%02x, cstat=%02x\n", 2883 "device end: dstat=%02x, cstat=%02x\n",
2881 irq_ptr->irq, dstat, cstat); 2884 irq_ptr->schid.sch_no, dstat, cstat);
2882 qdio_set_state(irq_ptr, QDIO_IRQ_STATE_ERR); 2885 qdio_set_state(irq_ptr, QDIO_IRQ_STATE_ERR);
2883 return 1; 2886 return 1;
2884 } 2887 }
@@ -2890,7 +2893,7 @@ qdio_establish_irq_check_for_errors(struct ccw_device *cdev, int cstat,
2890 QDIO_PRINT_ERR("establish queues on irq %04x: got " 2893 QDIO_PRINT_ERR("establish queues on irq %04x: got "
2891 "the following devstat: dstat=%02x, " 2894 "the following devstat: dstat=%02x, "
2892 "cstat=%02x\n", 2895 "cstat=%02x\n",
2893 irq_ptr->irq, dstat, cstat); 2896 irq_ptr->schid.sch_no, dstat, cstat);
2894 qdio_set_state(irq_ptr, QDIO_IRQ_STATE_ERR); 2897 qdio_set_state(irq_ptr, QDIO_IRQ_STATE_ERR);
2895 return 1; 2898 return 1;
2896 } 2899 }
@@ -2905,7 +2908,7 @@ qdio_establish_handle_irq(struct ccw_device *cdev, int cstat, int dstat)
2905 2908
2906 irq_ptr = cdev->private->qdio_data; 2909 irq_ptr = cdev->private->qdio_data;
2907 2910
2908 sprintf(dbf_text,"qehi%4x",cdev->private->irq); 2911 sprintf(dbf_text,"qehi%4x",cdev->private->sch_no);
2909 QDIO_DBF_TEXT0(0,setup,dbf_text); 2912 QDIO_DBF_TEXT0(0,setup,dbf_text);
2910 QDIO_DBF_TEXT0(0,trace,dbf_text); 2913 QDIO_DBF_TEXT0(0,trace,dbf_text);
2911 2914
@@ -2924,7 +2927,7 @@ qdio_initialize(struct qdio_initialize *init_data)
2924 int rc; 2927 int rc;
2925 char dbf_text[15]; 2928 char dbf_text[15];
2926 2929
2927 sprintf(dbf_text,"qini%4x",init_data->cdev->private->irq); 2930 sprintf(dbf_text,"qini%4x",init_data->cdev->private->sch_no);
2928 QDIO_DBF_TEXT0(0,setup,dbf_text); 2931 QDIO_DBF_TEXT0(0,setup,dbf_text);
2929 QDIO_DBF_TEXT0(0,trace,dbf_text); 2932 QDIO_DBF_TEXT0(0,trace,dbf_text);
2930 2933
@@ -2945,7 +2948,7 @@ qdio_allocate(struct qdio_initialize *init_data)
2945 struct qdio_irq *irq_ptr; 2948 struct qdio_irq *irq_ptr;
2946 char dbf_text[15]; 2949 char dbf_text[15];
2947 2950
2948 sprintf(dbf_text,"qalc%4x",init_data->cdev->private->irq); 2951 sprintf(dbf_text,"qalc%4x",init_data->cdev->private->sch_no);
2949 QDIO_DBF_TEXT0(0,setup,dbf_text); 2952 QDIO_DBF_TEXT0(0,setup,dbf_text);
2950 QDIO_DBF_TEXT0(0,trace,dbf_text); 2953 QDIO_DBF_TEXT0(0,trace,dbf_text);
2951 if ( (init_data->no_input_qs>QDIO_MAX_QUEUES_PER_IRQ) || 2954 if ( (init_data->no_input_qs>QDIO_MAX_QUEUES_PER_IRQ) ||
@@ -3018,7 +3021,7 @@ int qdio_fill_irq(struct qdio_initialize *init_data)
3018 3021
3019 irq_ptr->int_parm=init_data->int_parm; 3022 irq_ptr->int_parm=init_data->int_parm;
3020 3023
3021 irq_ptr->irq = init_data->cdev->private->irq; 3024 irq_ptr->schid = ccw_device_get_subchannel_id(init_data->cdev);
3022 irq_ptr->no_input_qs=init_data->no_input_qs; 3025 irq_ptr->no_input_qs=init_data->no_input_qs;
3023 irq_ptr->no_output_qs=init_data->no_output_qs; 3026 irq_ptr->no_output_qs=init_data->no_output_qs;
3024 3027
@@ -3038,7 +3041,7 @@ int qdio_fill_irq(struct qdio_initialize *init_data)
3038 QDIO_DBF_HEX1(0,setup,&irq_ptr->dev_st_chg_ind,sizeof(void*)); 3041 QDIO_DBF_HEX1(0,setup,&irq_ptr->dev_st_chg_ind,sizeof(void*));
3039 if (!irq_ptr->dev_st_chg_ind) { 3042 if (!irq_ptr->dev_st_chg_ind) {
3040 QDIO_PRINT_WARN("no indicator location available " \ 3043 QDIO_PRINT_WARN("no indicator location available " \
3041 "for irq 0x%x\n",irq_ptr->irq); 3044 "for irq 0x%x\n",irq_ptr->schid.sch_no);
3042 qdio_release_irq_memory(irq_ptr); 3045 qdio_release_irq_memory(irq_ptr);
3043 return -ENOBUFS; 3046 return -ENOBUFS;
3044 } 3047 }
@@ -3169,7 +3172,7 @@ qdio_establish(struct qdio_initialize *init_data)
3169 tiqdio_set_delay_target(irq_ptr,TIQDIO_DELAY_TARGET); 3172 tiqdio_set_delay_target(irq_ptr,TIQDIO_DELAY_TARGET);
3170 } 3173 }
3171 3174
3172 sprintf(dbf_text,"qest%4x",cdev->private->irq); 3175 sprintf(dbf_text,"qest%4x",cdev->private->sch_no);
3173 QDIO_DBF_TEXT0(0,setup,dbf_text); 3176 QDIO_DBF_TEXT0(0,setup,dbf_text);
3174 QDIO_DBF_TEXT0(0,trace,dbf_text); 3177 QDIO_DBF_TEXT0(0,trace,dbf_text);
3175 3178
@@ -3197,7 +3200,7 @@ qdio_establish(struct qdio_initialize *init_data)
3197 } 3200 }
3198 QDIO_PRINT_WARN("establish queues on irq %04x: do_IO " \ 3201 QDIO_PRINT_WARN("establish queues on irq %04x: do_IO " \
3199 "returned %i, next try returned %i\n", 3202 "returned %i, next try returned %i\n",
3200 irq_ptr->irq,result,result2); 3203 irq_ptr->schid.sch_no,result,result2);
3201 result=result2; 3204 result=result2;
3202 if (result) 3205 if (result)
3203 ccw_device_set_timeout(cdev, 0); 3206 ccw_device_set_timeout(cdev, 0);
@@ -3270,7 +3273,7 @@ qdio_activate(struct ccw_device *cdev, int flags)
3270 goto out; 3273 goto out;
3271 } 3274 }
3272 3275
3273 sprintf(dbf_text,"qact%4x", irq_ptr->irq); 3276 sprintf(dbf_text,"qact%4x", irq_ptr->schid.sch_no);
3274 QDIO_DBF_TEXT2(0,setup,dbf_text); 3277 QDIO_DBF_TEXT2(0,setup,dbf_text);
3275 QDIO_DBF_TEXT2(0,trace,dbf_text); 3278 QDIO_DBF_TEXT2(0,trace,dbf_text);
3276 3279
@@ -3297,7 +3300,7 @@ qdio_activate(struct ccw_device *cdev, int flags)
3297 } 3300 }
3298 QDIO_PRINT_WARN("activate queues on irq %04x: do_IO " \ 3301 QDIO_PRINT_WARN("activate queues on irq %04x: do_IO " \
3299 "returned %i, next try returned %i\n", 3302 "returned %i, next try returned %i\n",
3300 irq_ptr->irq,result,result2); 3303 irq_ptr->schid.sch_no,result,result2);
3301 result=result2; 3304 result=result2;
3302 } 3305 }
3303 3306
@@ -3509,7 +3512,7 @@ do_QDIO(struct ccw_device *cdev,unsigned int callflags,
3509#ifdef CONFIG_QDIO_DEBUG 3512#ifdef CONFIG_QDIO_DEBUG
3510 char dbf_text[20]; 3513 char dbf_text[20];
3511 3514
3512 sprintf(dbf_text,"doQD%04x",cdev->private->irq); 3515 sprintf(dbf_text,"doQD%04x",cdev->private->sch_no);
3513 QDIO_DBF_TEXT3(0,trace,dbf_text); 3516 QDIO_DBF_TEXT3(0,trace,dbf_text);
3514#endif /* CONFIG_QDIO_DEBUG */ 3517#endif /* CONFIG_QDIO_DEBUG */
3515 3518