diff options
-rw-r--r-- | drivers/net/atp.c | 19 | ||||
-rw-r--r-- | drivers/net/plip.c | 16 | ||||
-rw-r--r-- | drivers/net/starfire.c | 4 |
3 files changed, 20 insertions, 19 deletions
diff --git a/drivers/net/atp.c b/drivers/net/atp.c index 1d6b74c5d6c9..ea493ce23982 100644 --- a/drivers/net/atp.c +++ b/drivers/net/atp.c | |||
@@ -802,21 +802,22 @@ static void net_rx(struct net_device *dev) | |||
802 | 802 | ||
803 | static void read_block(long ioaddr, int length, unsigned char *p, int data_mode) | 803 | static void read_block(long ioaddr, int length, unsigned char *p, int data_mode) |
804 | { | 804 | { |
805 | |||
806 | if (data_mode <= 3) { /* Mode 0 or 1 */ | 805 | if (data_mode <= 3) { /* Mode 0 or 1 */ |
807 | outb(Ctrl_LNibRead, ioaddr + PAR_CONTROL); | 806 | outb(Ctrl_LNibRead, ioaddr + PAR_CONTROL); |
808 | outb(length == 8 ? RdAddr | HNib | MAR : RdAddr | MAR, | 807 | outb(length == 8 ? RdAddr | HNib | MAR : RdAddr | MAR, |
809 | ioaddr + PAR_DATA); | 808 | ioaddr + PAR_DATA); |
810 | if (data_mode <= 1) { /* Mode 0 or 1 */ | 809 | if (data_mode <= 1) { /* Mode 0 or 1 */ |
811 | do *p++ = read_byte_mode0(ioaddr); while (--length > 0); | 810 | do { *p++ = read_byte_mode0(ioaddr); } while (--length > 0); |
812 | } else /* Mode 2 or 3 */ | 811 | } else { /* Mode 2 or 3 */ |
813 | do *p++ = read_byte_mode2(ioaddr); while (--length > 0); | 812 | do { *p++ = read_byte_mode2(ioaddr); } while (--length > 0); |
814 | } else if (data_mode <= 5) | 813 | } |
815 | do *p++ = read_byte_mode4(ioaddr); while (--length > 0); | 814 | } else if (data_mode <= 5) { |
816 | else | 815 | do { *p++ = read_byte_mode4(ioaddr); } while (--length > 0); |
817 | do *p++ = read_byte_mode6(ioaddr); while (--length > 0); | 816 | } else { |
817 | do { *p++ = read_byte_mode6(ioaddr); } while (--length > 0); | ||
818 | } | ||
818 | 819 | ||
819 | outb(EOC+HNib+MAR, ioaddr + PAR_DATA); | 820 | outb(EOC+HNib+MAR, ioaddr + PAR_DATA); |
820 | outb(Ctrl_SelData, ioaddr + PAR_CONTROL); | 821 | outb(Ctrl_SelData, ioaddr + PAR_CONTROL); |
821 | } | 822 | } |
822 | 823 | ||
diff --git a/drivers/net/plip.c b/drivers/net/plip.c index 5d904f73345f..ed8582ea7e54 100644 --- a/drivers/net/plip.c +++ b/drivers/net/plip.c | |||
@@ -638,14 +638,14 @@ plip_receive_packet(struct net_device *dev, struct net_local *nl, | |||
638 | 638 | ||
639 | case PLIP_PK_DATA: | 639 | case PLIP_PK_DATA: |
640 | lbuf = rcv->skb->data; | 640 | lbuf = rcv->skb->data; |
641 | do | 641 | do { |
642 | if (plip_receive(nibble_timeout, dev, | 642 | if (plip_receive(nibble_timeout, dev, |
643 | &rcv->nibble, &lbuf[rcv->byte])) | 643 | &rcv->nibble, &lbuf[rcv->byte])) |
644 | return TIMEOUT; | 644 | return TIMEOUT; |
645 | while (++rcv->byte < rcv->length.h); | 645 | } while (++rcv->byte < rcv->length.h); |
646 | do | 646 | do { |
647 | rcv->checksum += lbuf[--rcv->byte]; | 647 | rcv->checksum += lbuf[--rcv->byte]; |
648 | while (rcv->byte); | 648 | } while (rcv->byte); |
649 | rcv->state = PLIP_PK_CHECKSUM; | 649 | rcv->state = PLIP_PK_CHECKSUM; |
650 | 650 | ||
651 | case PLIP_PK_CHECKSUM: | 651 | case PLIP_PK_CHECKSUM: |
@@ -816,14 +816,14 @@ plip_send_packet(struct net_device *dev, struct net_local *nl, | |||
816 | snd->checksum = 0; | 816 | snd->checksum = 0; |
817 | 817 | ||
818 | case PLIP_PK_DATA: | 818 | case PLIP_PK_DATA: |
819 | do | 819 | do { |
820 | if (plip_send(nibble_timeout, dev, | 820 | if (plip_send(nibble_timeout, dev, |
821 | &snd->nibble, lbuf[snd->byte])) | 821 | &snd->nibble, lbuf[snd->byte])) |
822 | return TIMEOUT; | 822 | return TIMEOUT; |
823 | while (++snd->byte < snd->length.h); | 823 | } while (++snd->byte < snd->length.h); |
824 | do | 824 | do { |
825 | snd->checksum += lbuf[--snd->byte]; | 825 | snd->checksum += lbuf[--snd->byte]; |
826 | while (snd->byte); | 826 | } while (snd->byte); |
827 | snd->state = PLIP_PK_CHECKSUM; | 827 | snd->state = PLIP_PK_CHECKSUM; |
828 | 828 | ||
829 | case PLIP_PK_CHECKSUM: | 829 | case PLIP_PK_CHECKSUM: |
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c index 1902f4fabde1..f54ac2389da2 100644 --- a/drivers/net/starfire.c +++ b/drivers/net/starfire.c | |||
@@ -880,9 +880,9 @@ static int mdio_read(struct net_device *dev, int phy_id, int location) | |||
880 | void __iomem *mdio_addr = np->base + MIICtrl + (phy_id<<7) + (location<<2); | 880 | void __iomem *mdio_addr = np->base + MIICtrl + (phy_id<<7) + (location<<2); |
881 | int result, boguscnt=1000; | 881 | int result, boguscnt=1000; |
882 | /* ??? Should we add a busy-wait here? */ | 882 | /* ??? Should we add a busy-wait here? */ |
883 | do | 883 | do { |
884 | result = readl(mdio_addr); | 884 | result = readl(mdio_addr); |
885 | while ((result & 0xC0000000) != 0x80000000 && --boguscnt > 0); | 885 | } while ((result & 0xC0000000) != 0x80000000 && --boguscnt > 0); |
886 | if (boguscnt == 0) | 886 | if (boguscnt == 0) |
887 | return 0; | 887 | return 0; |
888 | if ((result & 0xffff) == 0xffff) | 888 | if ((result & 0xffff) == 0xffff) |