コード例 #1
0
ファイル: isicom.c プロジェクト: cywzl/spice4xen
static inline void kill_queue(struct isi_port *port, short queue)
{
	struct isi_board *card = port->card;
	unsigned long base = card->base;
	u16 channel = port->channel;

	if (!lock_card(card))
		return;

	outw(0x8000 | (channel << card->shift_count) | 0x02, base);
	outw((queue << 8) | 0x06, base);
	InterruptTheCard(base);
	unlock_card(card);
}
コード例 #2
0
ファイル: isicom.c プロジェクト: Tigrouzen/k1099
/* card->lock MUST NOT be held */
static inline void raise_dtr_rts(struct isi_port *port)
{
	struct isi_board *card = port->card;
	unsigned long base = card->base;
	u16 channel = port->channel;

	if (!lock_card(card))
		return;

	outw(0x8000 | (channel << card->shift_count) | 0x02, base);
	outw(0x0f04, base);
	InterruptTheCard(base);
	port->status |= (ISI_DTR | ISI_RTS);
	unlock_card(card);
}
コード例 #3
0
ファイル: isicom.c プロジェクト: cywzl/spice4xen
static inline void drop_dtr(struct isi_port *port)
{
	struct isi_board *card = port->card;
	unsigned long base = card->base;
	u16 channel = port->channel;

	if (!lock_card(card))
		return;

	outw(0x8000 | (channel << card->shift_count) | 0x02, base);
	outw(0x0404, base);
	InterruptTheCard(base);
	port->status &= ~ISI_DTR;
	unlock_card(card);
}
コード例 #4
0
static void isicom_dtr_rts(struct tty_port *port, int on)
{
	struct isi_port *ip = container_of(port, struct isi_port, port);
	struct isi_board *card = ip->card;
	unsigned long base = card->base;
	u16 channel = ip->channel;

	if (!lock_card(card))
		return;

	if (on) {
		outw(0x8000 | (channel << card->shift_count) | 0x02, base);
		outw(0x0f04, base);
		InterruptTheCard(base);
		ip->status |= (ISI_DTR | ISI_RTS);
	} else {
		outw(0x8000 | (channel << card->shift_count) | 0x02, base);
		outw(0x0C04, base);
		InterruptTheCard(base);
		ip->status &= ~(ISI_DTR | ISI_RTS);
	}
	unlock_card(card);
}