diff options
Diffstat (limited to 'drivers/net/atp.c')
-rw-r--r-- | drivers/net/atp.c | 19 |
1 files changed, 10 insertions, 9 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 | ||