Commit bcef46b8 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] padto - fix hp100.c using skb_padto, fix warning

parent 98fafaea
...@@ -1556,6 +1556,12 @@ static int hp100_start_xmit_bm(struct sk_buff *skb, struct net_device *dev) ...@@ -1556,6 +1556,12 @@ static int hp100_start_xmit_bm(struct sk_buff *skb, struct net_device *dev)
if (skb->len <= 0) if (skb->len <= 0)
return 0; return 0;
if (skb->len < ETH_ZLEN && lp->chip == HP100_CHIPID_SHASTA) {
skb = skb_padto(skb, ETH_ZLEN);
if (skb == NULL)
return 0;
}
/* Get Tx ring tail pointer */ /* Get Tx ring tail pointer */
if (lp->txrtail->next == lp->txrhead) { if (lp->txrtail->next == lp->txrhead) {
/* No memory. */ /* No memory. */
...@@ -2097,6 +2103,7 @@ static void hp100_misc_interrupt(struct net_device *dev) ...@@ -2097,6 +2103,7 @@ static void hp100_misc_interrupt(struct net_device *dev)
struct hp100_private *lp = (struct hp100_private *) dev->priv; struct hp100_private *lp = (struct hp100_private *) dev->priv;
#ifdef HP100_DEBUG_B #ifdef HP100_DEBUG_B
int ioaddr = dev->base_addr;
hp100_outw(0x4216, TRACE); hp100_outw(0x4216, TRACE);
printk("hp100: %s: misc_interrupt\n", dev->name); printk("hp100: %s: misc_interrupt\n", dev->name);
#endif #endif
...@@ -2536,6 +2543,11 @@ static int hp100_sense_lan(struct net_device *dev) ...@@ -2536,6 +2543,11 @@ static int hp100_sense_lan(struct net_device *dev)
return HP100_LAN_10; return HP100_LAN_10;
if (val_10 & HP100_AUI_ST) { /* have we BNC or AUI onboard? */ if (val_10 & HP100_AUI_ST) { /* have we BNC or AUI onboard? */
/*
* This can be overriden by dos utility, so if this has no effect,
* perhaps you need to download that utility from HP and set card
* back to "auto detect".
*/
val_10 |= HP100_AUI_SEL | HP100_LOW_TH; val_10 |= HP100_AUI_SEL | HP100_LOW_TH;
hp100_page(MAC_CTRL); hp100_page(MAC_CTRL);
hp100_outb(val_10, 10_LAN_CFG_1); hp100_outb(val_10, 10_LAN_CFG_1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment