X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fs390%2Fcio%2Fcio.c;h=b6e4d3402b36345b219d62618010ed382e47fd59;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=fa6f0b105f76f7a62f12949b684ea2b8b6b0a357;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index fa6f0b105..b6e4d3402 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c @@ -1,7 +1,7 @@ /* * drivers/s390/cio/cio.c * S/390 common I/O routines -- low level i/o calls - * $Revision: 1.128 $ + * $Revision: 1.130 $ * * Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH, * IBM Corporation @@ -175,9 +175,10 @@ cio_start_handle_notoper(struct subchannel *sch, __u8 lpm) } int -cio_start (struct subchannel *sch, /* subchannel structure */ - struct ccw1 * cpa, /* logical channel prog addr */ - __u8 lpm) /* logical path mask */ +cio_start_key (struct subchannel *sch, /* subchannel structure */ + struct ccw1 * cpa, /* logical channel prog addr */ + __u8 lpm, /* logical path mask */ + __u8 key) /* storage key */ { char dbf_txt[15]; int ccode; @@ -200,12 +201,12 @@ cio_start (struct subchannel *sch, /* subchannel structure */ sch->orb.c64 = 1; sch->orb.i2k = 0; #endif + sch->orb.key = key >> 4; + /* issue "Start Subchannel" */ sch->orb.cpa = (__u32) __pa (cpa); - - /* - * Issue "Start subchannel" and process condition code - */ ccode = ssch (sch->irq, &sch->orb); + + /* process condition code */ sprintf (dbf_txt, "ccode:%d", ccode); CIO_TRACE_EVENT (4, dbf_txt); @@ -224,6 +225,12 @@ cio_start (struct subchannel *sch, /* subchannel structure */ } } +int +cio_start (struct subchannel *sch, struct ccw1 *cpa, __u8 lpm) +{ + return cio_start_key(sch, cpa, lpm, default_storage_key); +} + /* * resume suspended I/O operation */ @@ -813,9 +820,10 @@ __clear_subchannel_easy(unsigned int schid) } extern void do_reipl(unsigned long devno); -/* Make sure all subchannels are quiet before we re-ipl an lpar. */ + +/* Clear all subchannels. */ void -reipl(unsigned long devno) +clear_all_subchannels(void) { unsigned int schid; @@ -823,7 +831,7 @@ reipl(unsigned long devno) for (schid=0;schid<=highest_subchannel;schid++) { struct schib schib; if (stsch(schid, &schib)) - goto out; + break; /* break out of the loop */ if (!schib.pmcw.ena) continue; switch(__disable_subchannel_easy(schid, &schib)) { @@ -832,11 +840,17 @@ reipl(unsigned long devno) break; default: /* -EBUSY */ if (__clear_subchannel_easy(schid)) - break; /* give up... */ + break; /* give up... jump out of switch */ stsch(schid, &schib); __disable_subchannel_easy(schid, &schib); } } -out: +} + +/* Make sure all subchannels are quiet before we re-ipl an lpar. */ +void +reipl(unsigned long devno) +{ + clear_all_subchannels(); do_reipl(devno); }