Fix RID calculation. The RID is really the BAR for PCI cards,

so the index needs to be translated into an offset. While we
did add the offset (0x10), we forgot to account for the width.

Tested by: Thomas Vogt
MFC after: 3 days
This commit is contained in:
Marcel Moolenaar 2008-05-16 14:57:48 +00:00
parent 13d4b2b0bc
commit c1163871f6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=179050

View file

@ -1116,7 +1116,7 @@ puc_config_timedia(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port,
*res = (port == 1 || port == 3) ? 8 : 0;
return (0);
case PUC_CFG_GET_RID:
*res = 0x10 + ((port > 3) ? port - 2 : port >> 1);
*res = 0x10 + ((port > 3) ? port - 2 : port >> 1) * 4;
return (0);
case PUC_CFG_GET_TYPE:
*res = PUC_TYPE_SERIAL;