From d628fa28fa832f1c193fb84d28d01ac47239a782 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Thu, 14 Aug 2014 16:01:38 +0000 Subject: [PATCH] Delete pp_isadma. It isn't use, and the code that used it has been commented out (temporarily) since 1998 when this driver hit the tree. Also, no need to compute the ethernet header and then never use it. --- sys/dev/cs/if_cs.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/sys/dev/cs/if_cs.c b/sys/dev/cs/if_cs.c index 502c2b34be7..e247fe2adbb 100644 --- a/sys/dev/cs/if_cs.c +++ b/sys/dev/cs/if_cs.c @@ -264,7 +264,7 @@ cs_cs89x0_probe(device_t dev) uint16_t id; char chip_revision; uint16_t eeprom_buff[CHKSUM_LEN]; - int chip_type, pp_isaint, pp_isadma; + int chip_type, pp_isaint; sc->dev = dev; error = cs_alloc_port(dev, 0, CS_89x0_IO_PORTS); @@ -299,11 +299,9 @@ cs_cs89x0_probe(device_t dev) if (chip_type == CS8900) { pp_isaint = PP_CS8900_ISAINT; - pp_isadma = PP_CS8900_ISADMA; sc->send_cmd = TX_CS8900_AFTER_ALL; } else { pp_isaint = PP_CS8920_ISAINT; - pp_isadma = PP_CS8920_ISADMA; sc->send_cmd = TX_CS8920_AFTER_ALL; } @@ -381,17 +379,6 @@ cs_cs89x0_probe(device_t dev) if (!(sc->flags & CS_NO_IRQ)) cs_writereg(sc, pp_isaint, irq); - /* - * Temporary disabled - * - if (drq>0) - cs_writereg(sc, pp_isadma, drq); - else { - device_printf(dev, "incorrect drq\n",); - return (0); - } - */ - if (bootverbose) device_printf(dev, "CS89%c0%s rev %c media%s%s%s\n", chip_type == CS8900 ? '0' : '2', @@ -702,7 +689,6 @@ cs_get_packet(struct cs_softc *sc) { struct ifnet *ifp = sc->ifp; int status, length; - struct ether_header *eh; struct mbuf *m; #ifdef CS_DEBUG @@ -746,8 +732,6 @@ cs_get_packet(struct cs_softc *sc) bus_read_multi_2(sc->port_res, RX_FRAME_PORT, mtod(m, uint16_t *), (length + 1) >> 1); - eh = mtod(m, struct ether_header *); - #ifdef CS_DEBUG for (i=0;im_data+i)));