summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1995-11-26 17:13:23 +0000
committerbde <bde@FreeBSD.org>1995-11-26 17:13:23 +0000
commit6416fe008a59fa4eed3abbb0b7abbefe85f5d204 (patch)
treea5a7c5bda6bc6054f7eeffe3c795fd6c9a91b90a /sys/i386
parentfb91b3e1a96f0045538b4067ea71b836f55c6b2c (diff)
downloadFreeBSD-src-6416fe008a59fa4eed3abbb0b7abbefe85f5d204.zip
FreeBSD-src-6416fe008a59fa4eed3abbb0b7abbefe85f5d204.tar.gz
Fixed setting of speed B0 - don't output a bogus divisor of 0 and a
random prescaler, just hang up. This may fix hangup problems with mgetty.
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/isa/cy.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/i386/isa/cy.c b/sys/i386/isa/cy.c
index 0b90ac0..ce0816c 100644
--- a/sys/i386/isa/cy.c
+++ b/sys/i386/isa/cy.c
@@ -27,7 +27,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: cy.c,v 1.17 1995/11/04 13:23:31 bde Exp $
+ * $Id: cy.c,v 1.18 1995/11/04 17:07:14 bde Exp $
*/
#include "cy.h"
@@ -1675,10 +1675,14 @@ comparam(tp, t)
else
(void)commctl(com, TIOCM_DTR, DMBIS);
- cd_outb(iobase, CD1400_RBPR, idivisor);
- cd_outb(iobase, CD1400_RCOR, iprescaler);
- cd_outb(iobase, CD1400_TBPR, odivisor);
- cd_outb(iobase, CD1400_TCOR, oprescaler);
+ if (idivisor != 0) {
+ cd_outb(iobase, CD1400_RBPR, idivisor);
+ cd_outb(iobase, CD1400_RCOR, iprescaler);
+ }
+ if (odivisor != 0) {
+ cd_outb(iobase, CD1400_TBPR, odivisor);
+ cd_outb(iobase, CD1400_TCOR, oprescaler);
+ }
/*
* channel control
OpenPOWER on IntegriCloud