ppb_msq.c (71705a23fc7376283e04d755fcafddb0cdb92417) | ppb_msq.c (bc35c17446fab005a7e11b67b9004736f1c8498b) |
---|---|
1/*- 2 * Copyright (c) 1998 Nicolas Souchu 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 1998 Nicolas Souchu 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $Id: ppb_msq.c,v 1.2 1998/09/13 18:26:26 nsouch Exp $ | 26 * $Id: ppb_msq.c,v 1.3 1998/09/20 14:41:54 nsouch Exp $ |
27 * 28 */ 29#include <machine/stdarg.h> 30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/kernel.h> 34 --- 232 unchanged lines hidden (view full) --- 267 switch (mi->opcode) { 268 case MS_OP_PUT: 269 case MS_OP_GET: 270 271 /* attempt to choose the best mode for the device */ 272 xfer = mode2xfer(dev, mi->opcode); 273 274 /* figure out if we should use ieee1284 code */ | 27 * 28 */ 29#include <machine/stdarg.h> 30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/kernel.h> 34 --- 232 unchanged lines hidden (view full) --- 267 switch (mi->opcode) { 268 case MS_OP_PUT: 269 case MS_OP_GET: 270 271 /* attempt to choose the best mode for the device */ 272 xfer = mode2xfer(dev, mi->opcode); 273 274 /* figure out if we should use ieee1284 code */ |
275 if (!xfer->loop) 276 panic("%s: IEEE1284 code not supported", 277 __FUNCTION__); | 275 if (!xfer->loop) { 276 if (mi->opcode == MS_OP_PUT) { 277 if ((error = ppb->ppb_link->adapter->write( 278 ppb->ppb_link->adapter_unit, 279 (char *)mi->arg[0].p, 280 mi->arg[1].i, 0))) 281 goto error; |
278 | 282 |
283 INCR_PC; 284 goto next; 285 } else 286 panic("%s: IEEE1284 read not supported", __FUNCTION__); 287 } 288 |
|
279 /* XXX should use ppb_MS_init_msq() */ 280 initxfer[0].arg[0].p = mi->arg[0].p; 281 initxfer[1].arg[0].i = mi->arg[1].i; 282 283 /* initialize transfer */ 284 ppb_MS_microseq(dev, initxfer, &error); 285 286 if (error) --- 17 unchanged lines hidden (view full) --- 304 break; 305 306 default: 307 /* executing microinstructions at ppc level is 308 * faster. This is the default if the microinstr 309 * is unknown here 310 */ 311 if ((error = ppb->ppb_link->adapter->exec_microseq( | 289 /* XXX should use ppb_MS_init_msq() */ 290 initxfer[0].arg[0].p = mi->arg[0].p; 291 initxfer[1].arg[0].i = mi->arg[1].i; 292 293 /* initialize transfer */ 294 ppb_MS_microseq(dev, initxfer, &error); 295 296 if (error) --- 17 unchanged lines hidden (view full) --- 314 break; 315 316 default: 317 /* executing microinstructions at ppc level is 318 * faster. This is the default if the microinstr 319 * is unknown here 320 */ 321 if ((error = ppb->ppb_link->adapter->exec_microseq( |
312 dev->id_unit, &mi))) | 322 ppb->ppb_link->adapter_unit, 323 &mi))) |
313 goto error; 314 break; 315 } | 324 goto error; 325 break; 326 } |
327 next: |
|
316 } 317error: 318 return (error); 319} 320 | 328 } 329error: 330 return (error); 331} 332 |