mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jean Tourrilhes <jt@bougret.hpl.hp.com>
To: Jeff Garzik <jgarzik@pobox.com>,
	Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: [PATCH 2.5 IrDA] tekram-sir driver fix
Date: Fri, 8 Aug 2003 11:54:48 -0700	[thread overview]
Message-ID: <20030808185448.GG13274@bougret.hpl.hp.com> (raw)

ir260_tekram-sir.diff :
~~~~~~~~~~~~~~~~~~~~~
		<Patch from Martin Diehl>
	o [CORRECT] Update tekram-sir dongle driver to common power-settling


diff -u -p linux/drivers/net/irda/tekram-sir.d2.c linux/drivers/net/irda/tekram-sir.c
--- linux/drivers/net/irda/tekram-sir.d2.c	Fri Aug  8 10:29:24 2003
+++ linux/drivers/net/irda/tekram-sir.c	Fri Aug  8 10:32:46 2003
@@ -71,38 +71,20 @@ void __exit tekram_sir_cleanup(void)
 	irda_unregister_dongle(&tekram);
 }
 
-#define TEKRAM_STATE_POWERED	(SIRDEV_STATE_DONGLE_OPEN + 1)
-
 static int tekram_open(struct sir_dev *dev)
 {
-	unsigned delay = 0;
-	unsigned next_state = dev->fsm.substate;
 	struct qos_info *qos = &dev->qos;
 
 	IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
 
-	switch(dev->fsm.substate) {
-
-	case SIRDEV_STATE_DONGLE_OPEN:
-		dev->set_dtr_rts(dev, TRUE, TRUE);
-		next_state = TEKRAM_STATE_POWERED;
-		delay = 50;
-		break;
-
-	case TEKRAM_STATE_POWERED:
-		qos->baud_rate.bits &= IR_9600|IR_19200|IR_38400|IR_57600|IR_115200;
-		qos->min_turn_time.bits = 0x01; /* Needs at least 10 ms */	
-		irda_qos_bits_to_value(qos);
-		return 0;
-
-	default:
-		ERROR("%s - undefined state\n", __FUNCTION__);
-		return -EINVAL;
-	}
+	dev->set_dtr_rts(dev, TRUE, TRUE);
+	qos->baud_rate.bits &= IR_9600|IR_19200|IR_38400|IR_57600|IR_115200;
+	qos->min_turn_time.bits = 0x01; /* Needs at least 10 ms */	
+	irda_qos_bits_to_value(qos);
 
-	dev->fsm.substate = next_state;
+	/* irda thread waits 50 msec for power settling */
 
-	return delay;
+	return 0;
 }
 
 static int tekram_close(struct sir_dev *dev)

                 reply	other threads:[~2003-08-08 19:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030808185448.GG13274@bougret.hpl.hp.com \
    --to=jt@bougret.hpl.hp.com \
    --cc=jgarzik@pobox.com \
    --cc=jt@hpl.hp.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®