Пример #1
0
static void
simscsi_sg_readwrite (struct scsi_cmnd *sc, int mode, unsigned long offset)
{
	int i;
	struct scatterlist *sl;
	struct disk_stat stat;
	struct disk_req req;

	stat.fd = desc[sc->device->id];

	scsi_for_each_sg(sc, sl, scsi_sg_count(sc), i) {
		req.addr = __pa(sg_virt(sl));
		req.len  = sl->length;
		if (DBG)
			printk("simscsi_sg_%s @ %lx (off %lx) use_sg=%d len=%d\n",
			       mode == SSC_READ ? "read":"write", req.addr, offset,
			       scsi_sg_count(sc) - i, sl->length);
		ia64_ssc(stat.fd, 1, __pa(&req), offset, mode);
		ia64_ssc(__pa(&stat), 0, 0, 0, SSC_WAIT_COMPLETION);

		/* should not happen in our case */
		if (stat.count != req.len) {
			sc->result = DID_ERROR << 16;
			return;
		}
		offset +=  sl->length;
	}
Пример #2
0
static  void receive_chars(struct tty_struct *tty)
{
	unsigned char ch;
	static unsigned char seen_esc = 0;

	while ( (ch = ia64_ssc(0, 0, 0, 0, SSC_GETCHAR)) ) {
		if ( ch == 27 && seen_esc == 0 ) {
			seen_esc = 1;
			continue;
		} else {
			if ( seen_esc==1 && ch == 'O' ) {
				seen_esc = 2;
				continue;
			} else if ( seen_esc == 2 ) {
				if ( ch == 'P' ) /* F1 */
					show_state();
#ifdef CONFIG_MAGIC_SYSRQ
				if ( ch == 'S' ) { /* F4 */
					do
						ch = ia64_ssc(0, 0, 0, 0,
							      SSC_GETCHAR);
					while (!ch);
<<<<<<< HEAD
					handle_sysrq(ch);
=======
					handle_sysrq(ch, NULL);
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
				}
#endif
				seen_esc = 0;
				continue;
			}
Пример #3
0
static void receive_chars(struct tty_struct *tty)
{
	unsigned char ch;
	static unsigned char seen_esc = 0;

	while ( (ch = ia64_ssc(0, 0, 0, 0, SSC_GETCHAR)) ) {
		if (ch == 27 && seen_esc == 0) {
			seen_esc = 1;
			continue;
		} else if (seen_esc == 1 && ch == 'O') {
			seen_esc = 2;
			continue;
		} else if (seen_esc == 2) {
			if (ch == 'P') /* F1 */
				show_state();
#ifdef CONFIG_MAGIC_SYSRQ
			if (ch == 'S') { /* F4 */
				do {
					ch = ia64_ssc(0, 0, 0, 0, SSC_GETCHAR);
				} while (!ch);
				handle_sysrq(ch);
			}
#endif
			seen_esc = 0;
			continue;
		}
		seen_esc = 0;

		if (tty_insert_flip_char(tty, ch, TTY_NORMAL) == 0)
			break;
	}
	tty_flip_buffer_push(tty);
}
Пример #4
0
static void
simcons_write (struct console *cons, const char *buf, unsigned count)
{
	unsigned long ch;

	while (count-- > 0) {
		ch = *buf++;
		ia64_ssc(ch, 0, 0, 0, SSC_PUTCHAR);
		if (ch == '\n')
		  ia64_ssc('\r', 0, 0, 0, SSC_PUTCHAR);
	}
}
Пример #5
0
static int
simcons_wait_key (struct console *cons)
{
	char ch;

	do {
		ch = ia64_ssc(0, 0, 0, 0, SSC_GETCHAR);
	} while (ch == '\0');
	return ch;
}
Пример #6
0
static  void receive_chars(struct tty_struct *tty, struct pt_regs *regs)
{
    unsigned char ch;
    static unsigned char seen_esc = 0;

    while ( (ch = ia64_ssc(0, 0, 0, 0, SSC_GETCHAR)) ) {
        if ( ch == 27 && seen_esc == 0 ) {
            seen_esc = 1;
            continue;
        } else {
            if ( seen_esc==1 && ch == 'O' ) {
                seen_esc = 2;
                continue;
            } else if ( seen_esc == 2 ) {
                if ( ch == 'P' ) show_state();		/* F1 key */
#ifdef CONFIG_KDB
                if ( ch == 'S' )
                    kdb(KDB_REASON_KEYBOARD, 0, (kdb_eframe_t) regs);
#endif

                seen_esc = 0;
                continue;
            }
        }
        seen_esc = 0;
        if (tty->flip.count >= TTY_FLIPBUF_SIZE) break;

        *tty->flip.char_buf_ptr = ch;

        *tty->flip.flag_buf_ptr = 0;

        tty->flip.flag_buf_ptr++;
        tty->flip.char_buf_ptr++;
        tty->flip.count++;
    }
    tty_flip_buffer_push(tty);
}
Пример #7
0
void
ia64_ctl_trace (long on)
{
	ia64_ssc(on, 0, 0, 0, SSC_CTL_TRACE);
}
Пример #8
0
void
ia64_ssc_connect_irq (long intr, long irq)
{
	ia64_ssc(intr, irq, 0, 0, SSC_CONNECT_INTERRUPT);
}
Пример #9
0
>>>>>>> ae1773bb70f3d7cf73324ce8fba787e01d8fa9f2
ia64_ctl_trace (long on)
{
	ia64_ssc(on, 0, 0, 0, SSC_CTL_TRACE);
}