diff --git a/drivers/net/wan/lmc/main.c b/drivers/net/wan/lmc/main.c
index bd7def0..1231d7c 100644
--- a/drivers/net/wan/lmc/main.c
+++ b/drivers/net/wan/lmc/main.c
@@ -75,8 +75,14 @@
 static int LMC_PKT_BUF_SZ = 1542;
 
 static DEFINE_PCI_DEVICE_TABLE(lmc_pci_tbl) = {
-	{ PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_FAST,
-	  PCI_VENDOR_ID_LMC, PCI_ANY_ID },
+	{PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_FAST, PCI_VENDOR_ID_LMC,
+	 PCI_DEVICE_ID_LMC_SSI, .driver_data = (long)&lmc_ssi_media},
+	{PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_FAST, PCI_VENDOR_ID_LMC,
+	 PCI_DEVICE_ID_LMC_HSSI, .driver_data = (long)&lmc_hssi_media},
+	{PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_FAST, PCI_VENDOR_ID_LMC,
+	 PCI_DEVICE_ID_LMC_DS3, .driver_data = (long)&lmc_ds3_media},
+	{PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_FAST, PCI_VENDOR_ID_LMC,
+	 PCI_DEVICE_ID_LMC_T1, .driver_data = (long)&lmc_t1_media},
 	{ 0 }
 };
 
@@ -167,7 +173,7 @@ int lmc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 		spin_lock_irqsave(&sc->lock, flags);
 		sc->xinfo.Magic0 = 0xBEEFCAFE;
 
-		sc->xinfo.PciCardType = sc->cardtype;
+		sc->xinfo.PciCardType = sc->media->cardtype;
 		sc->xinfo.PciSlotNumber = 0;
 		sc->xinfo.DriverMajorVersion = DRIVER_MAJOR_VERSION;
 		sc->xinfo.DriverMinorVersion = DRIVER_MINOR_VERSION;
@@ -190,7 +196,7 @@ int lmc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 
 	case LMCIOCGETLMCSTATS:
 		spin_lock_irqsave(&sc->lock, flags);
-		if (sc->cardtype == LMC_CARDTYPE_T1) {
+		if (sc->media->cardtype == LMC_CARDTYPE_T1) {
 			lmc_mii_writereg(sc, 0, 17, T1FRAMER_FERR_LSB);
 			sc->extra_stats.framingBitErrorCount +=
 				lmc_mii_readreg(sc, 0, 18) & 0xff;
@@ -235,7 +241,7 @@ int lmc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 		sc->extra_stats.check = STATCHECK;
 		sc->extra_stats.version_size = (DRIVER_VERSION << 16) +
 			sizeof(sc->netdev->stats) + sizeof(sc->extra_stats);
-		sc->extra_stats.cardtype = sc->cardtype;
+		sc->extra_stats.cardtype = sc->media->cardtype;
 		spin_unlock_irqrestore(&sc->lock, flags);
 		ret = 0;
 		break;
@@ -283,7 +289,7 @@ int lmc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 		break;
 
 	case LMCIOCT1CONTROL:
-		if (sc->cardtype != LMC_CARDTYPE_T1) {
+		if (sc->media->cardtype != LMC_CARDTYPE_T1) {
 			ret = -EOPNOTSUPP;
 			break;
 		}
@@ -708,10 +714,8 @@ static int __devinit lmc_init_one(struct pci_dev *pdev,
 {
 	struct card *sc;
 	struct net_device *dev;
-	u16 subdevice;
-	u16 AdapModelNum;
+	u16 model;
 	int err;
-	static int cards_found;
 
 	/* lmc_trace(dev, "lmc_init_one in"); */
 
@@ -768,34 +772,10 @@ static int __devinit lmc_init_one(struct pci_dev *pdev,
 		goto err_hdlcdev;
 	}
 
-	sc->cardtype = LMC_CARDTYPE_UNKNOWN;
 	sc->timing = LMC_CTL_CLOCK_SOURCE_EXT;
+	sc->media = (struct media*)ent->driver_data;
 
-	switch (subdevice) {
-	case PCI_DEVICE_ID_LMC_HSSI:
-		dev_info(&pdev->dev, "%s = LMC HSSI\n", dev->name);
-		sc->cardtype = LMC_CARDTYPE_HSSI;
-		sc->media = &lmc_hssi_media;
-		break;
-	case PCI_DEVICE_ID_LMC_DS3:
-		dev_info(&pdev->dev, "%s = LMC DS3\n", dev->name);
-		sc->cardtype = LMC_CARDTYPE_DS3;
-		sc->media = &lmc_ds3_media;
-		break;
-	case PCI_DEVICE_ID_LMC_SSI:
-		dev_info(&pdev->dev, "%s = LMC SSI\n", dev->name);
-		sc->cardtype = LMC_CARDTYPE_SSI;
-		sc->media = &lmc_ssi_media;
-		break;
-	case PCI_DEVICE_ID_LMC_T1:
-		dev_info(&pdev->dev, "%s = LMC T1\n", dev->name);
-		sc->cardtype = LMC_CARDTYPE_T1;
-		sc->media = &lmc_t1_media;
-		break;
-	default:
-		dev_warn(&pdev->dev, "%s = LMC UNKNOWN CARD!\n", dev->name);
-		break;
-	}
+	dev_info(&pdev->dev, "%s = LMC %s\n", dev->name, sc->media->name);
 
 	lmc_initcsrs(sc, dev->base_addr, 8);
 
@@ -809,27 +789,18 @@ static int __devinit lmc_init_one(struct pci_dev *pdev,
 
 	/* verify that the PCI Sub System ID matches the Adapter Model number
 	   from the MII register */
-	AdapModelNum = (lmc_mii_readreg(sc, 0, 3) & 0x3f0) >> 4;
-
-	if ((AdapModelNum != LMC_ADAP_T1 || /* detect LMC1200 */
-	     subdevice != PCI_DEVICE_ID_LMC_T1) &&
-	    (AdapModelNum != LMC_ADAP_SSI || /* detect LMC1000 */
-	     subdevice != PCI_DEVICE_ID_LMC_SSI) &&
-	    (AdapModelNum != LMC_ADAP_DS3 || /* detect LMC5245 */
-	     subdevice != PCI_DEVICE_ID_LMC_DS3) &&
-	    (AdapModelNum != LMC_ADAP_HSSI || /* detect LMC5200 */
-	     subdevice != PCI_DEVICE_ID_LMC_HSSI))
-		printk(KERN_WARNING "%s: Model number (%d) miscompare for PCI"
-		       " Subsystem ID = 0x%04x\n",
-		       dev->name, AdapModelNum, subdevice);
-
-	/* reset clock */
-	LMC_CSR_WRITE(sc, csr_gp_timer, 0xFFFFFFFFUL);
+	model = (lmc_mii_readreg(sc, 0, 3) & 0x3F0) >> 4;
+
+	if (model != sc->media->mii_type)
+		dev_warn(&pdev->dev, "%s: Invalid model number (%d)",
+			 dev->name, model);
+
+	LMC_CSR_WRITE(sc, csr_gp_timer, 0xFFFFFFFFUL); /* reset clock */
 
 	sc->extra_stats.check = STATCHECK;
 	sc->extra_stats.version_size = (DRIVER_VERSION << 16) +
 		sizeof(sc->netdev->stats) + sizeof(sc->extra_stats);
-	sc->extra_stats.cardtype = sc->cardtype;
+	sc->extra_stats.cardtype = sc->media->cardtype;
 
 	sc->ok = 0;
 	sc->last_link_status = 0;
diff --git a/drivers/net/wan/lmc/media.c b/drivers/net/wan/lmc/media.c
index fde275a..ecf0f2a 100644
--- a/drivers/net/wan/lmc/media.c
+++ b/drivers/net/wan/lmc/media.c
@@ -906,7 +906,10 @@ static void lmc_t1_default(struct card * const sc)
 }
 
 
-struct media lmc_ssi_media = {
+struct media lmc_ssi_media = { /* LMC1000 */
+	.name = "SSI",
+	.cardtype = LMC_CARDTYPE_SSI,
+	.mii_type = LMC_ADAP_SSI,
 	.init = lmc_ssi_init,
 	.defaults = lmc_ssi_default,
 	.set_status = lmc_ssi_set_status,
@@ -918,7 +921,10 @@ struct media lmc_ssi_media = {
 	.watchdog = lmc_ssi_watchdog,
 };
 
-struct media lmc_hssi_media = {
+struct media lmc_hssi_media = { /* LMC5200 */
+	.name = "HSSI",
+	.cardtype = LMC_CARDTYPE_HSSI,
+	.mii_type = LMC_ADAP_HSSI,
 	.init = lmc_hssi_init,
 	.defaults = lmc_hssi_default,
 	.set_status = lmc_hssi_set_status,
@@ -928,7 +934,10 @@ struct media lmc_hssi_media = {
 	.set_crc_length = lmc_hssi_set_crc_length,
 };
 
-struct media lmc_ds3_media = {
+struct media lmc_ds3_media = { /* LMC5245 */
+	.name = "DS3",
+	.cardtype = LMC_CARDTYPE_DS3,
+	.mii_type = LMC_ADAP_DS3,
 	.init = lmc_ds3_init,
 	.defaults = lmc_ds3_default,
 	.set_status = lmc_ds3_set_status,
@@ -938,7 +947,10 @@ struct media lmc_ds3_media = {
 	.set_crc_length = lmc_ds3_set_crc_length,
 };
 
-struct media lmc_t1_media = {
+struct media lmc_t1_media = { /* LMC1200 */
+	.name = "T1",
+	.cardtype = LMC_CARDTYPE_T1,
+	.mii_type = LMC_ADAP_T1,
 	.init = lmc_t1_init,
 	.defaults = lmc_t1_default,
 	.set_status = lmc_t1_set_status,
diff --git a/drivers/net/wan/lmc/var.h b/drivers/net/wan/lmc/var.h
index 729ab9f..971f5d6 100644
--- a/drivers/net/wan/lmc/var.h
+++ b/drivers/net/wan/lmc/var.h
@@ -195,6 +195,8 @@ struct media {
 	void (* set_crc_length)(struct card * const, int);
 	void (* set_circuit_type)(struct card * const, int);
 	void (* watchdog)(struct card * const);
+	char * const name;
+	int cardtype, mii_type;
 };
 
 #define STATCHECK 0xBEEFCAFE
@@ -292,7 +294,6 @@ struct card {
 	u16 miireg16;
 	int ok;
 	int last_link_status;
-	int cardtype;
 	u32 last_frameerr;
 	struct media *media;
 	struct timer_list timer;
