Skip to content

Commit

Permalink
tlan: Fix bugs introduced by the last tlan cleanup patch
Browse files Browse the repository at this point in the history
Fix two bugs introduced by the commit
c659c38 ("tlan: Code cleanup:
checkpatch.pl is relatively happy now.") In that change,
TLAN_CSTAT_READY was considered as a bit mask containing a single bit
set while it was actually had two set instead.

Many thanks to Dan Carpenter for finding the mistake.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sakari Ailus authored and David S. Miller committed Feb 13, 2011
1 parent 1765a57 commit f45437e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/tlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1522,7 +1522,8 @@ static u32 tlan_handle_tx_eof(struct net_device *dev, u16 host_int)
head_list = priv->tx_list + priv->tx_head;
head_list_phys = priv->tx_list_dma
+ sizeof(struct tlan_list)*priv->tx_head;
if (head_list->c_stat & TLAN_CSTAT_READY) {
if ((head_list->c_stat & TLAN_CSTAT_READY)
== TLAN_CSTAT_READY) {
outl(head_list_phys, dev->base_addr + TLAN_CH_PARM);
ack |= TLAN_HC_GO;
} else {
Expand Down Expand Up @@ -1766,7 +1767,8 @@ static u32 tlan_handle_tx_eoc(struct net_device *dev, u16 host_int)
head_list = priv->tx_list + priv->tx_head;
head_list_phys = priv->tx_list_dma
+ sizeof(struct tlan_list)*priv->tx_head;
if (head_list->c_stat & TLAN_CSTAT_READY) {
if ((head_list->c_stat & TLAN_CSTAT_READY)
== TLAN_CSTAT_READY) {
netif_stop_queue(dev);
outl(head_list_phys, dev->base_addr + TLAN_CH_PARM);
ack |= TLAN_HC_GO;
Expand Down

0 comments on commit f45437e

Please sign in to comment.