Lines Matching defs:mode

213 /* Terminate a negotiated mode. */
220 switch (port->ieee1284.mode) {
224 /* Terminate from EPP mode. */
295 port->ieee1284.mode = IEEE1284_MODE_COMPAT;
298 pr_debug("%s: In compatibility (forward idle) mode\n", port->name);
303 * parport_negotiate - negotiate an IEEE 1284 mode
305 * @mode: mode to negotiate to
307 * Use this to negotiate to a particular IEEE 1284 transfer mode.
308 * The @mode parameter should be one of the constants in
312 * negotiation to the mode specified, -1 if the peripheral is not
317 int parport_negotiate (struct parport *port, int mode)
320 if (mode == IEEE1284_MODE_COMPAT)
325 int m = mode & ~IEEE1284_ADDR;
332 if (port->ieee1284.mode == mode)
336 if ((port->ieee1284.mode & ~IEEE1284_ADDR) == (mode & ~IEEE1284_ADDR)){
337 port->ieee1284.mode = mode;
341 /* Go to compatibility forward idle mode */
342 if (port->ieee1284.mode != IEEE1284_MODE_COMPAT)
345 if (mode == IEEE1284_MODE_COMPAT)
346 /* Compatibility mode: no negotiation. */
349 switch (mode) {
361 if (mode & IEEE1284_EXT_LINK)
423 port->name, mode, port->ops->read_status (port));
431 if (mode && !xflag) {
434 port->name, mode);
440 if (mode & IEEE1284_EXT_LINK) {
441 m = mode & 0x7f;
471 port->name, mode,
482 /* Extended mode not supported. */
483 pr_debug("%s: Extended mode 0x%02x not supported\n",
484 port->name, mode);
493 pr_debug("%s: In mode 0x%02x\n", port->name, mode);
494 port->ieee1284.mode = mode;
497 if (!(mode & IEEE1284_EXT_LINK) && (m & IEEE1284_MODE_ECP)) {
515 } else switch (mode) {
572 * specified, using the IEEE 1284 transfer mode most recently
574 * mode supports forward transfers (host to peripheral).
589 int mode = port->ieee1284.mode;
590 int addr = mode & IEEE1284_ADDR;
594 mode &= ~(IEEE1284_DEVICEID | IEEE1284_ADDR);
596 /* Use the mode we're in. */
597 switch (mode) {
603 pr_debug("%s: Using compatibility mode\n", port->name);
608 pr_debug("%s: Using EPP mode\n", port->name);
616 pr_debug("%s: Using software-emulated EPP mode\n", port->name);
625 pr_debug("%s: Using ECP mode\n", port->name);
634 pr_debug("%s: Using software-emulated ECP mode\n", port->name);
645 pr_debug("%s: Unknown mode 0x%02x\n",
646 port->name, port->ieee1284.mode);
663 * specified, using the IEEE 1284 transfer mode most recently
665 * mode supports reverse transfers (peripheral to host).
680 int mode = port->physport->ieee1284.mode;
681 int addr = mode & IEEE1284_ADDR;
685 mode &= ~(IEEE1284_DEVICEID | IEEE1284_ADDR);
687 /* Use the mode we're in. */
688 switch (mode) {
690 /* if we can tri-state use BYTE mode instead of NIBBLE mode,
691 * if that fails, revert to NIBBLE mode -- ought to store somewhere
692 * the device's ability to do BYTE mode reverse transfers, so we don't
697 /* got into BYTE mode OK */
698 pr_debug("%s: Using byte mode\n", port->name);
707 pr_debug("%s: Using nibble mode\n", port->name);
712 pr_debug("%s: Using byte mode\n", port->name);
717 pr_debug("%s: Using EPP mode\n", port->name);
725 pr_debug("%s: Using software-emulated EPP mode\n", port->name);
734 pr_debug("%s: Using ECP mode\n", port->name);
739 pr_debug("%s: Using software-emulated ECP mode\n", port->name);
744 pr_debug("%s: Unknown mode 0x%02x\n",
745 port->name, port->physport->ieee1284.mode);