MFi386: sys/isa/sio.c revision 1.301, 1.336, 1.337, 1.338, 1.339 and 1.342.

Removed unnecessary PnP moden entries.
This commit is contained in:
nyan 2001-09-16 05:33:07 +00:00
parent d80c40a1b1
commit c6bf00383f
2 changed files with 122 additions and 138 deletions

View File

@ -1001,6 +1001,8 @@ static struct pci_ids pci_ids[] = {
{ 0x100812b9, "3COM PCI FaxModem", 0x10 },
{ 0x048011c1, "Lucent kermit based PCI Modem", 0x14 },
{ 0x0000151f, "SmartLink 5634PCV SurfRider", 0x10 },
{ 0x01101407, "Koutech IOFLEX-2S PCI Dual Port Serial", 0x10 },
{ 0x01111407, "Koutech IOFLEX-2S PCI Dual Port Serial", 0x10 },
/* { 0xXXXXXXXX, "Xircom Cardbus modem", 0x10 }, */
{ 0x00000000, NULL, 0 }
};
@ -1070,68 +1072,6 @@ sio_pci_probe(dev)
#endif /* NPCI > 0 */
static struct isa_pnp_id sio_ids[] = {
{0x0005d041, "Standard PC COM port"}, /* PNP0500 */
{0x0105d041, "16550A-compatible COM port"}, /* PNP0501 */
{0x0205d041, "Multiport serial device (non-intelligent 16550)"}, /* PNP0502 */
{0x1005d041, "Generic IRDA-compatible device"}, /* PNP0510 */
{0x1105d041, "Generic IRDA-compatible device"}, /* PNP0511 */
/* Devices that do not have a compatid */
{0x7602a904, NULL}, /* AEI0276 - 56K v.90 Fax Modem (LKT) */
{0x00007905, NULL}, /* AKY0000 - 56K Plug&Play Modem */
{0x01405407, NULL}, /* AZT4001 - AZT3000 PnP SOUND DEVICE, MODEM */
{0x56039008, NULL}, /* BDP0356 - Best Data 56x2 */
{0x36339008, NULL}, /* BDP3336 - Best Data Prods. 336F */
{0x0014490a, NULL}, /* BRI1400 - Boca 33.6 PnP */
{0x0015490a, NULL}, /* BRI1500 - Internal Fax Data */
{0x0034490a, NULL}, /* BRI3400 - Internal ACF Modem */
{0x0094490a, NULL}, /* BRI9400 - Boca K56Flex PnP */
{0x00b4490a, NULL}, /* BRIB400 - Boca 56k PnP */
{0x0030320d, NULL}, /* CIR3000 - Cirrus Logic V43 */
{0x0100440e, NULL}, /* CRD0001 - Cardinal MVP288IV ? */
{0x1200c31e, NULL}, /* GVC0012 - VF1128HV-R9 (win modem?) */
{0x0303c31e, NULL}, /* GVC0303 - MaxTech 33.6 PnP D/F/V */
{0x0505c31e, NULL}, /* GVC0505 - GVC 56k Faxmodem */
{0x0050c31e, NULL}, /* GVC5000 - some GVC modem */
{0x3800f91e, NULL}, /* GWY0038 - Telepath with v.90 */
{0x9062f91e, NULL}, /* GWY6290 - Telepath with x2 Technology */
{0x0000f435, NULL}, /* MOT0000 - Motorola ModemSURFR 33.6 Intern */
{0x5015f435, NULL}, /* MOT1550 - Motorola ModemSURFR 56K Modem */
{0xf015f435, NULL}, /* MOT15F0 - Motorola VoiceSURFR 56K Modem */
{0x6045f435, NULL}, /* MOT4560 - Motorola ? */
{0x61e7a338, NULL}, /* NECE761 - 33.6Modem */
{0x39804f3f, NULL}, /* OZO8039 - Zoom 56k flex */
{0x3024a341, NULL}, /* PMC2430 - Pace 56 Voice Internal Modem */
{0x1000eb49, NULL}, /* ROK0010 - Rockwell ? */
{0x5002734a, NULL}, /* RSS0250 - 5614Jx3(G) Internal Modem */
{0xc100ad4d, NULL}, /* SMM00C1 - Leopard 56k PnP */
{0x9012b04e, NULL}, /* SUP1290 - Supra ? */
{0x1013b04e, NULL}, /* SUP1310 - SupraExpress 336i PnP */
{0x8013b04e, NULL}, /* SUP1380 - SupraExpress 288i PnP Voice */
{0x8113b04e, NULL}, /* SUP1381 - SupraExpress 336i PnP Voice */
{0x5016b04e, NULL}, /* SUP1650 - Supra 336i Sp Intl */
{0x7420b04e, NULL}, /* SUP2070 - Supra ? */
{0x8020b04e, NULL}, /* SUP2080 - Supra ? */
{0x8420b04e, NULL}, /* SUP2084 - SupraExpress 56i PnP */
{0x7121b04e, NULL}, /* SUP2171 - SupraExpress 56i Sp? */
{0x8024b04e, NULL}, /* SUP2480 - Supra ? */
{0x01007256, NULL}, /* USR0001 - U.S. Robotics Inc., Sportster W */
{0x02007256, NULL}, /* USR0002 - U.S. Robotics Inc. Sportster 33. */
{0x04007256, NULL}, /* USR0004 - USR Sportster 14.4k */
{0x06007256, NULL}, /* USR0006 - USR Sportster 33.6k */
{0x11007256, NULL}, /* USR0011 - USR ? */
{0x01017256, NULL}, /* USR0101 - USR ? */
{0x30207256, NULL}, /* USR2030 - U.S.Robotics Inc. Sportster 560 */
{0x50207256, NULL}, /* USR2050 - U.S.Robotics Inc. Sportster 33. */
{0x70207256, NULL}, /* USR2070 - U.S.Robotics Inc. Sportster 560 */
{0x30307256, NULL}, /* USR3030 - U.S. Robotics 56K FAX INT */
{0x31307256, NULL}, /* USR3031 - U.S. Robotics 56K FAX INT */
{0x50307256, NULL}, /* USR3050 - U.S. Robotics 56K FAX INT */
{0x70307256, NULL}, /* USR3070 - U.S. Robotics 56K Voice INT */
{0x90307256, NULL}, /* USR3090 - USR ? */
{0x90917256, NULL}, /* USR9190 - USR 56k Voice INT */
{0x0300695c, NULL}, /* WCI0003 - Fax/Voice/Modem/Speakphone/Asvd */
{0x01a0896a, NULL}, /* ZTIA001 - Zoom Internal V90 Faxmodem */
{0x61f7896a, NULL}, /* ZTIF761 - Zoom ComStar 33.6 */
#ifdef PC98
{0x0100e4a5, "RSA-98III"},
#endif
@ -1526,11 +1466,13 @@ sioprobe(dev, xrid)
} else {
/* Unknown, Just omit this chip.. XXX */
result = ENXIO;
sio_setreg(com, com_mcr, 0);
}
} else {
/* OK. this is well-known guys */
CLR_FLAG(dev, COM_C_IIR_TXRDYBUG);
}
sio_setreg(com, com_ier, 0);
sio_setreg(com, com_cfcr, CFCR_8BITS);
mtx_unlock_spin(&sio_lock);
bus_release_resource(dev, SYS_RES_IOPORT, rid, port);
@ -2118,10 +2060,20 @@ determined_type: ;
com->irqres, INTR_TYPE_TTY,
siointr, com, &com->cookie);
if (ret == 0)
device_printf(dev, "unable to activate interrupt in fast mode - using normal mode");
device_printf(dev, "unable to activate interrupt in fast mode - using normal mode\n");
}
if (ret)
device_printf(dev, "could not activate interrupt\n");
#if defined(DDB) && (defined(BREAK_TO_DEBUGGER) || \
defined(ALT_BREAK_TO_DEBUGGER))
/*
* Enable interrupts for early break-to-debugger support
* on the console.
*/
if (ret == 0 && unit == comconsole)
outb(siocniobase + com_ier, IER_ERXRDY | IER_ERLS |
IER_EMSC);
#endif
}
return (0);
@ -2421,24 +2373,32 @@ comhardclose(com)
else
#endif
sio_setreg(com, com_cfcr, com->cfcr_image &= ~CFCR_SBREAK);
tp = com->tp;
#if defined(DDB) && (defined(BREAK_TO_DEBUGGER) || \
defined(ALT_BREAK_TO_DEBUGGER))
/*
* Leave interrupts enabled and don't clear DTR if this is the
* console. This allows us to detect break-to-debugger events
* while the console device is closed.
*/
if (com->unit != comconsole)
#endif
{
#ifdef PC98
int tmp;
int tmp;
if (IS_8251(com->pc98_if_type))
com_int_TxRx_disable(com);
else
sio_setreg(com, com_ier, 0);
if (com->pc98_if_type == COM_IF_RSA98III)
outb(com->rsabase + rsa_ier, 0x00);
#else
sio_setreg(com, com_ier, 0);
#endif
tp = com->tp;
#ifdef PC98
if (IS_8251(com->pc98_if_type))
tmp = pc98_get_modem_status(com) & TIOCM_CAR;
else
tmp = com->prev_modem_status & MSR_DCD;
#else
sio_setreg(com, com_ier, 0);
#endif
if (tp->t_cflag & HUPCL
/*
@ -2877,6 +2837,35 @@ status_read:;
recv_data = 0;
else
recv_data = inb(com->data_port);
#if defined(DDB) && defined(ALT_BREAK_TO_DEBUGGER)
/*
* Solaris implements a new BREAK which is initiated
* by a character sequence CR ~ ^b which is similar
* to a familiar pattern used on Sun servers by the
* Remote Console.
*/
#define KEY_CRTLB 2 /* ^B */
#define KEY_CR 13 /* CR '\r' */
#define KEY_TILDE 126 /* ~ */
if (com->unit == comconsole) {
static int brk_state1 = 0, brk_state2 = 0;
if (recv_data == KEY_CR) {
brk_state1 = recv_data;
brk_state2 = 0;
} else if (brk_state1 == KEY_CR && (recv_data == KEY_TILDE || recv_data == KEY_CRTLB)) {
if (recv_data == KEY_TILDE)
brk_state2 = recv_data;
else if (brk_state2 == KEY_TILDE && recv_data == KEY_CRTLB) {
breakpoint();
brk_state1 = brk_state2 = 0;
goto cont;
} else
brk_state2 = 0;
} else
brk_state1 = 0;
}
#endif
if (line_status & (LSR_BI | LSR_FE | LSR_PE)) {
/*
* Don't store BI if IGNBRK or FE/PE if IGNPAR.
@ -4632,6 +4621,9 @@ siogdbputc(c)
#endif
DRIVER_MODULE(sio, isa, sio_isa_driver, sio_devclass, 0, 0);
#ifndef PC98
DRIVER_MODULE(sio, acpi, sio_isa_driver, sio_devclass, 0, 0);
#endif
#if NCARD > 0
DRIVER_MODULE(sio, pccard, sio_pccard_driver, sio_devclass, 0, 0);
#endif

View File

@ -1001,6 +1001,8 @@ static struct pci_ids pci_ids[] = {
{ 0x100812b9, "3COM PCI FaxModem", 0x10 },
{ 0x048011c1, "Lucent kermit based PCI Modem", 0x14 },
{ 0x0000151f, "SmartLink 5634PCV SurfRider", 0x10 },
{ 0x01101407, "Koutech IOFLEX-2S PCI Dual Port Serial", 0x10 },
{ 0x01111407, "Koutech IOFLEX-2S PCI Dual Port Serial", 0x10 },
/* { 0xXXXXXXXX, "Xircom Cardbus modem", 0x10 }, */
{ 0x00000000, NULL, 0 }
};
@ -1070,68 +1072,6 @@ sio_pci_probe(dev)
#endif /* NPCI > 0 */
static struct isa_pnp_id sio_ids[] = {
{0x0005d041, "Standard PC COM port"}, /* PNP0500 */
{0x0105d041, "16550A-compatible COM port"}, /* PNP0501 */
{0x0205d041, "Multiport serial device (non-intelligent 16550)"}, /* PNP0502 */
{0x1005d041, "Generic IRDA-compatible device"}, /* PNP0510 */
{0x1105d041, "Generic IRDA-compatible device"}, /* PNP0511 */
/* Devices that do not have a compatid */
{0x7602a904, NULL}, /* AEI0276 - 56K v.90 Fax Modem (LKT) */
{0x00007905, NULL}, /* AKY0000 - 56K Plug&Play Modem */
{0x01405407, NULL}, /* AZT4001 - AZT3000 PnP SOUND DEVICE, MODEM */
{0x56039008, NULL}, /* BDP0356 - Best Data 56x2 */
{0x36339008, NULL}, /* BDP3336 - Best Data Prods. 336F */
{0x0014490a, NULL}, /* BRI1400 - Boca 33.6 PnP */
{0x0015490a, NULL}, /* BRI1500 - Internal Fax Data */
{0x0034490a, NULL}, /* BRI3400 - Internal ACF Modem */
{0x0094490a, NULL}, /* BRI9400 - Boca K56Flex PnP */
{0x00b4490a, NULL}, /* BRIB400 - Boca 56k PnP */
{0x0030320d, NULL}, /* CIR3000 - Cirrus Logic V43 */
{0x0100440e, NULL}, /* CRD0001 - Cardinal MVP288IV ? */
{0x1200c31e, NULL}, /* GVC0012 - VF1128HV-R9 (win modem?) */
{0x0303c31e, NULL}, /* GVC0303 - MaxTech 33.6 PnP D/F/V */
{0x0505c31e, NULL}, /* GVC0505 - GVC 56k Faxmodem */
{0x0050c31e, NULL}, /* GVC5000 - some GVC modem */
{0x3800f91e, NULL}, /* GWY0038 - Telepath with v.90 */
{0x9062f91e, NULL}, /* GWY6290 - Telepath with x2 Technology */
{0x0000f435, NULL}, /* MOT0000 - Motorola ModemSURFR 33.6 Intern */
{0x5015f435, NULL}, /* MOT1550 - Motorola ModemSURFR 56K Modem */
{0xf015f435, NULL}, /* MOT15F0 - Motorola VoiceSURFR 56K Modem */
{0x6045f435, NULL}, /* MOT4560 - Motorola ? */
{0x61e7a338, NULL}, /* NECE761 - 33.6Modem */
{0x39804f3f, NULL}, /* OZO8039 - Zoom 56k flex */
{0x3024a341, NULL}, /* PMC2430 - Pace 56 Voice Internal Modem */
{0x1000eb49, NULL}, /* ROK0010 - Rockwell ? */
{0x5002734a, NULL}, /* RSS0250 - 5614Jx3(G) Internal Modem */
{0xc100ad4d, NULL}, /* SMM00C1 - Leopard 56k PnP */
{0x9012b04e, NULL}, /* SUP1290 - Supra ? */
{0x1013b04e, NULL}, /* SUP1310 - SupraExpress 336i PnP */
{0x8013b04e, NULL}, /* SUP1380 - SupraExpress 288i PnP Voice */
{0x8113b04e, NULL}, /* SUP1381 - SupraExpress 336i PnP Voice */
{0x5016b04e, NULL}, /* SUP1650 - Supra 336i Sp Intl */
{0x7420b04e, NULL}, /* SUP2070 - Supra ? */
{0x8020b04e, NULL}, /* SUP2080 - Supra ? */
{0x8420b04e, NULL}, /* SUP2084 - SupraExpress 56i PnP */
{0x7121b04e, NULL}, /* SUP2171 - SupraExpress 56i Sp? */
{0x8024b04e, NULL}, /* SUP2480 - Supra ? */
{0x01007256, NULL}, /* USR0001 - U.S. Robotics Inc., Sportster W */
{0x02007256, NULL}, /* USR0002 - U.S. Robotics Inc. Sportster 33. */
{0x04007256, NULL}, /* USR0004 - USR Sportster 14.4k */
{0x06007256, NULL}, /* USR0006 - USR Sportster 33.6k */
{0x11007256, NULL}, /* USR0011 - USR ? */
{0x01017256, NULL}, /* USR0101 - USR ? */
{0x30207256, NULL}, /* USR2030 - U.S.Robotics Inc. Sportster 560 */
{0x50207256, NULL}, /* USR2050 - U.S.Robotics Inc. Sportster 33. */
{0x70207256, NULL}, /* USR2070 - U.S.Robotics Inc. Sportster 560 */
{0x30307256, NULL}, /* USR3030 - U.S. Robotics 56K FAX INT */
{0x31307256, NULL}, /* USR3031 - U.S. Robotics 56K FAX INT */
{0x50307256, NULL}, /* USR3050 - U.S. Robotics 56K FAX INT */
{0x70307256, NULL}, /* USR3070 - U.S. Robotics 56K Voice INT */
{0x90307256, NULL}, /* USR3090 - USR ? */
{0x90917256, NULL}, /* USR9190 - USR 56k Voice INT */
{0x0300695c, NULL}, /* WCI0003 - Fax/Voice/Modem/Speakphone/Asvd */
{0x01a0896a, NULL}, /* ZTIA001 - Zoom Internal V90 Faxmodem */
{0x61f7896a, NULL}, /* ZTIF761 - Zoom ComStar 33.6 */
#ifdef PC98
{0x0100e4a5, "RSA-98III"},
#endif
@ -1526,11 +1466,13 @@ sioprobe(dev, xrid)
} else {
/* Unknown, Just omit this chip.. XXX */
result = ENXIO;
sio_setreg(com, com_mcr, 0);
}
} else {
/* OK. this is well-known guys */
CLR_FLAG(dev, COM_C_IIR_TXRDYBUG);
}
sio_setreg(com, com_ier, 0);
sio_setreg(com, com_cfcr, CFCR_8BITS);
mtx_unlock_spin(&sio_lock);
bus_release_resource(dev, SYS_RES_IOPORT, rid, port);
@ -2118,10 +2060,20 @@ determined_type: ;
com->irqres, INTR_TYPE_TTY,
siointr, com, &com->cookie);
if (ret == 0)
device_printf(dev, "unable to activate interrupt in fast mode - using normal mode");
device_printf(dev, "unable to activate interrupt in fast mode - using normal mode\n");
}
if (ret)
device_printf(dev, "could not activate interrupt\n");
#if defined(DDB) && (defined(BREAK_TO_DEBUGGER) || \
defined(ALT_BREAK_TO_DEBUGGER))
/*
* Enable interrupts for early break-to-debugger support
* on the console.
*/
if (ret == 0 && unit == comconsole)
outb(siocniobase + com_ier, IER_ERXRDY | IER_ERLS |
IER_EMSC);
#endif
}
return (0);
@ -2421,24 +2373,32 @@ comhardclose(com)
else
#endif
sio_setreg(com, com_cfcr, com->cfcr_image &= ~CFCR_SBREAK);
tp = com->tp;
#if defined(DDB) && (defined(BREAK_TO_DEBUGGER) || \
defined(ALT_BREAK_TO_DEBUGGER))
/*
* Leave interrupts enabled and don't clear DTR if this is the
* console. This allows us to detect break-to-debugger events
* while the console device is closed.
*/
if (com->unit != comconsole)
#endif
{
#ifdef PC98
int tmp;
int tmp;
if (IS_8251(com->pc98_if_type))
com_int_TxRx_disable(com);
else
sio_setreg(com, com_ier, 0);
if (com->pc98_if_type == COM_IF_RSA98III)
outb(com->rsabase + rsa_ier, 0x00);
#else
sio_setreg(com, com_ier, 0);
#endif
tp = com->tp;
#ifdef PC98
if (IS_8251(com->pc98_if_type))
tmp = pc98_get_modem_status(com) & TIOCM_CAR;
else
tmp = com->prev_modem_status & MSR_DCD;
#else
sio_setreg(com, com_ier, 0);
#endif
if (tp->t_cflag & HUPCL
/*
@ -2877,6 +2837,35 @@ status_read:;
recv_data = 0;
else
recv_data = inb(com->data_port);
#if defined(DDB) && defined(ALT_BREAK_TO_DEBUGGER)
/*
* Solaris implements a new BREAK which is initiated
* by a character sequence CR ~ ^b which is similar
* to a familiar pattern used on Sun servers by the
* Remote Console.
*/
#define KEY_CRTLB 2 /* ^B */
#define KEY_CR 13 /* CR '\r' */
#define KEY_TILDE 126 /* ~ */
if (com->unit == comconsole) {
static int brk_state1 = 0, brk_state2 = 0;
if (recv_data == KEY_CR) {
brk_state1 = recv_data;
brk_state2 = 0;
} else if (brk_state1 == KEY_CR && (recv_data == KEY_TILDE || recv_data == KEY_CRTLB)) {
if (recv_data == KEY_TILDE)
brk_state2 = recv_data;
else if (brk_state2 == KEY_TILDE && recv_data == KEY_CRTLB) {
breakpoint();
brk_state1 = brk_state2 = 0;
goto cont;
} else
brk_state2 = 0;
} else
brk_state1 = 0;
}
#endif
if (line_status & (LSR_BI | LSR_FE | LSR_PE)) {
/*
* Don't store BI if IGNBRK or FE/PE if IGNPAR.
@ -4632,6 +4621,9 @@ siogdbputc(c)
#endif
DRIVER_MODULE(sio, isa, sio_isa_driver, sio_devclass, 0, 0);
#ifndef PC98
DRIVER_MODULE(sio, acpi, sio_isa_driver, sio_devclass, 0, 0);
#endif
#if NCARD > 0
DRIVER_MODULE(sio, pccard, sio_pccard_driver, sio_devclass, 0, 0);
#endif