aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/dm9000.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
index 952e10d686ec..0b0f1c407a7e 100644
--- a/drivers/net/dm9000.c
+++ b/drivers/net/dm9000.c
@@ -888,19 +888,22 @@ dm9000_rx(struct net_device *dev)
888 dev_dbg(db->dev, "RST: RX Len:%x\n", RxLen); 888 dev_dbg(db->dev, "RST: RX Len:%x\n", RxLen);
889 } 889 }
890 890
891 if (rxhdr.RxStatus & 0xbf) { 891 /* rxhdr.RxStatus is identical to RSR register. */
892 if (rxhdr.RxStatus & (RSR_FOE | RSR_CE | RSR_AE |
893 RSR_PLE | RSR_RWTO |
894 RSR_LCS | RSR_RF)) {
892 GoodPacket = false; 895 GoodPacket = false;
893 if (rxhdr.RxStatus & 0x01) { 896 if (rxhdr.RxStatus & RSR_FOE) {
894 if (netif_msg_rx_err(db)) 897 if (netif_msg_rx_err(db))
895 dev_dbg(db->dev, "fifo error\n"); 898 dev_dbg(db->dev, "fifo error\n");
896 dev->stats.rx_fifo_errors++; 899 dev->stats.rx_fifo_errors++;
897 } 900 }
898 if (rxhdr.RxStatus & 0x02) { 901 if (rxhdr.RxStatus & RSR_CE) {
899 if (netif_msg_rx_err(db)) 902 if (netif_msg_rx_err(db))
900 dev_dbg(db->dev, "crc error\n"); 903 dev_dbg(db->dev, "crc error\n");
901 dev->stats.rx_crc_errors++; 904 dev->stats.rx_crc_errors++;
902 } 905 }
903 if (rxhdr.RxStatus & 0x80) { 906 if (rxhdr.RxStatus & RSR_RF) {
904 if (netif_msg_rx_err(db)) 907 if (netif_msg_rx_err(db))
905 dev_dbg(db->dev, "length error\n"); 908 dev_dbg(db->dev, "length error\n");
906 dev->stats.rx_length_errors++; 909 dev->stats.rx_length_errors++;
@@ -1067,7 +1070,7 @@ dm9000_phy_read(struct net_device *dev, int phy_reg_unused, int reg)
1067 /* Fill the phyxcer register into REG_0C */ 1070 /* Fill the phyxcer register into REG_0C */
1068 iow(db, DM9000_EPAR, DM9000_PHY | reg); 1071 iow(db, DM9000_EPAR, DM9000_PHY | reg);
1069 1072
1070 iow(db, DM9000_EPCR, 0xc); /* Issue phyxcer read command */ 1073 iow(db, DM9000_EPCR, EPCR_ERPRR | EPCR_EPOS); /* Issue phyxcer read command */
1071 1074
1072 writeb(reg_save, db->io_addr); 1075 writeb(reg_save, db->io_addr);
1073 spin_unlock_irqrestore(&db->lock,flags); 1076 spin_unlock_irqrestore(&db->lock,flags);
@@ -1118,7 +1121,7 @@ dm9000_phy_write(struct net_device *dev,
1118 iow(db, DM9000_EPDRL, value); 1121 iow(db, DM9000_EPDRL, value);
1119 iow(db, DM9000_EPDRH, value >> 8); 1122 iow(db, DM9000_EPDRH, value >> 8);
1120 1123
1121 iow(db, DM9000_EPCR, 0xa); /* Issue phyxcer write command */ 1124 iow(db, DM9000_EPCR, EPCR_EPOS | EPCR_ERPRW); /* Issue phyxcer write command */
1122 1125
1123 writeb(reg_save, db->io_addr); 1126 writeb(reg_save, db->io_addr);
1124 spin_unlock_irqrestore(&db->lock, flags); 1127 spin_unlock_irqrestore(&db->lock, flags);