[PATCH] dead code removed in hp100
for mode 2 (memory-mapped) we always set ->mem_ptr_virt; dead code removed. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -1718,17 +1718,10 @@ static int hp100_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||||||
hp100_outw(i, FRAGMENT_LEN); /* and first/only fragment length */
|
hp100_outw(i, FRAGMENT_LEN); /* and first/only fragment length */
|
||||||
|
|
||||||
if (lp->mode == 2) { /* memory mapped */
|
if (lp->mode == 2) { /* memory mapped */
|
||||||
if (lp->mem_ptr_virt) { /* high pci memory was remapped */
|
/* Note: The J2585B needs alignment to 32bits here! */
|
||||||
/* Note: The J2585B needs alignment to 32bits here! */
|
memcpy_toio(lp->mem_ptr_virt, skb->data, (skb->len + 3) & ~3);
|
||||||
memcpy_toio(lp->mem_ptr_virt, skb->data, (skb->len + 3) & ~3);
|
if (!ok_flag)
|
||||||
if (!ok_flag)
|
memset_io(lp->mem_ptr_virt, 0, HP100_MIN_PACKET_SIZE - skb->len);
|
||||||
memset_io(lp->mem_ptr_virt, 0, HP100_MIN_PACKET_SIZE - skb->len);
|
|
||||||
} else {
|
|
||||||
/* Note: The J2585B needs alignment to 32bits here! */
|
|
||||||
isa_memcpy_toio(lp->mem_ptr_phys, skb->data, (skb->len + 3) & ~3);
|
|
||||||
if (!ok_flag)
|
|
||||||
isa_memset_io(lp->mem_ptr_phys, 0, HP100_MIN_PACKET_SIZE - skb->len);
|
|
||||||
}
|
|
||||||
} else { /* programmed i/o */
|
} else { /* programmed i/o */
|
||||||
outsl(ioaddr + HP100_REG_DATA32, skb->data,
|
outsl(ioaddr + HP100_REG_DATA32, skb->data,
|
||||||
(skb->len + 3) >> 2);
|
(skb->len + 3) >> 2);
|
||||||
@@ -1798,10 +1791,7 @@ static void hp100_rx(struct net_device *dev)
|
|||||||
/* First we get the header, which contains information about the */
|
/* First we get the header, which contains information about the */
|
||||||
/* actual length of the received packet. */
|
/* actual length of the received packet. */
|
||||||
if (lp->mode == 2) { /* memory mapped mode */
|
if (lp->mode == 2) { /* memory mapped mode */
|
||||||
if (lp->mem_ptr_virt) /* if memory was remapped */
|
header = readl(lp->mem_ptr_virt);
|
||||||
header = readl(lp->mem_ptr_virt);
|
|
||||||
else
|
|
||||||
header = isa_readl(lp->mem_ptr_phys);
|
|
||||||
} else /* programmed i/o */
|
} else /* programmed i/o */
|
||||||
header = hp100_inl(DATA32);
|
header = hp100_inl(DATA32);
|
||||||
|
|
||||||
@@ -1833,13 +1823,9 @@ static void hp100_rx(struct net_device *dev)
|
|||||||
ptr = skb->data;
|
ptr = skb->data;
|
||||||
|
|
||||||
/* Now transfer the data from the card into that area */
|
/* Now transfer the data from the card into that area */
|
||||||
if (lp->mode == 2) {
|
if (lp->mode == 2)
|
||||||
if (lp->mem_ptr_virt)
|
memcpy_fromio(ptr, lp->mem_ptr_virt,pkt_len);
|
||||||
memcpy_fromio(ptr, lp->mem_ptr_virt,pkt_len);
|
else /* io mapped */
|
||||||
/* Note alignment to 32bit transfers */
|
|
||||||
else
|
|
||||||
isa_memcpy_fromio(ptr, lp->mem_ptr_phys, pkt_len);
|
|
||||||
} else /* io mapped */
|
|
||||||
insl(ioaddr + HP100_REG_DATA32, ptr, pkt_len >> 2);
|
insl(ioaddr + HP100_REG_DATA32, ptr, pkt_len >> 2);
|
||||||
|
|
||||||
skb->protocol = eth_type_trans(skb, dev);
|
skb->protocol = eth_type_trans(skb, dev);
|
||||||
|
Reference in New Issue
Block a user