sio.c (91280) | sio.c (92401) |
---|---|
1/*- 2 * Copyright (c) 1991 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * | 1/*- 2 * Copyright (c) 1991 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * |
33 * $FreeBSD: head/sys/dev/sio/sio.c 91280 2002-02-26 03:46:14Z imp $ | 33 * $FreeBSD: head/sys/dev/sio/sio.c 92401 2002-03-16 04:26:46Z imp $ |
34 * from: @(#)com.c 7.5 (Berkeley) 5/16/91 35 * from: i386/isa sio.c,v 1.234 36 */ 37 38#include "opt_comconsole.h" 39#include "opt_compat.h" 40#include "opt_ddb.h" 41#include "opt_sio.h" --- 624 unchanged lines hidden (view full) --- 666 * Turn off loopback mode so that the interrupt gate works again 667 * (MCR_IENABLE was hidden). This should leave the device driving 668 * an interrupt line high. It doesn't matter if the interrupt 669 * line oscillates while we are not looking at it, since interrupts 670 * are disabled. 671 */ 672/* EXTRA DELAY? */ 673 sio_setreg(com, com_mcr, mcr_image); | 34 * from: @(#)com.c 7.5 (Berkeley) 5/16/91 35 * from: i386/isa sio.c,v 1.234 36 */ 37 38#include "opt_comconsole.h" 39#include "opt_compat.h" 40#include "opt_ddb.h" 41#include "opt_sio.h" --- 624 unchanged lines hidden (view full) --- 666 * Turn off loopback mode so that the interrupt gate works again 667 * (MCR_IENABLE was hidden). This should leave the device driving 668 * an interrupt line high. It doesn't matter if the interrupt 669 * line oscillates while we are not looking at it, since interrupts 670 * are disabled. 671 */ 672/* EXTRA DELAY? */ 673 sio_setreg(com, com_mcr, mcr_image); |
674 675 /* 676 * It seems my Xircom CBEM56G Cardbus modem wants to be reset 677 * to 8 bits *again*, or else probe test 0 will fail. 678 * gwk@sgi.com, 4/19/2001 679 */ 680 sio_setreg(com, com_cfcr, CFCR_8BITS); |
|
674 675 /* 676 * Some pcmcia cards have the "TXRDY bug", so we check everyone 677 * for IIR_TXRDY implementation ( Palido 321s, DC-1S... ) 678 */ 679 if (noprobe) { 680 /* Reading IIR register twice */ 681 for (fn = 0; fn < 2; fn ++) { 682 DELAY(10000); 683 failures[6] = sio_getreg(com, com_iir); 684 } 685 /* Check IIR_TXRDY clear ? */ 686 result = 0; 687 if (failures[6] & IIR_TXRDY) { | 681 682 /* 683 * Some pcmcia cards have the "TXRDY bug", so we check everyone 684 * for IIR_TXRDY implementation ( Palido 321s, DC-1S... ) 685 */ 686 if (noprobe) { 687 /* Reading IIR register twice */ 688 for (fn = 0; fn < 2; fn ++) { 689 DELAY(10000); 690 failures[6] = sio_getreg(com, com_iir); 691 } 692 /* Check IIR_TXRDY clear ? */ 693 result = 0; 694 if (failures[6] & IIR_TXRDY) { |
688 /* Nop, Double check with clearing IER */ | 695 /* No, Double check with clearing IER */ |
689 sio_setreg(com, com_ier, 0); 690 if (sio_getreg(com, com_iir) & IIR_NOPEND) { | 696 sio_setreg(com, com_ier, 0); 697 if (sio_getreg(com, com_iir) & IIR_NOPEND) { |
691 /* Ok. we're familia this gang */ | 698 /* Ok. We discovered TXRDY bug! */ |
692 SET_FLAG(dev, COM_C_IIR_TXRDYBUG); 693 } else { 694 /* Unknown, Just omit this chip.. XXX */ 695 result = ENXIO; 696 sio_setreg(com, com_mcr, 0); 697 } 698 } else { 699 /* OK. this is well-known guys */ --- 2485 unchanged lines hidden --- | 699 SET_FLAG(dev, COM_C_IIR_TXRDYBUG); 700 } else { 701 /* Unknown, Just omit this chip.. XXX */ 702 result = ENXIO; 703 sio_setreg(com, com_mcr, 0); 704 } 705 } else { 706 /* OK. this is well-known guys */ --- 2485 unchanged lines hidden --- |