|
@@ -802,21 +802,22 @@ static void net_rx(struct net_device *dev)
|
|
|
|
|
|
static void read_block(long ioaddr, int length, unsigned char *p, int data_mode)
|
|
static void read_block(long ioaddr, int length, unsigned char *p, int data_mode)
|
|
{
|
|
{
|
|
-
|
|
|
|
if (data_mode <= 3) { /* Mode 0 or 1 */
|
|
if (data_mode <= 3) { /* Mode 0 or 1 */
|
|
outb(Ctrl_LNibRead, ioaddr + PAR_CONTROL);
|
|
outb(Ctrl_LNibRead, ioaddr + PAR_CONTROL);
|
|
outb(length == 8 ? RdAddr | HNib | MAR : RdAddr | MAR,
|
|
outb(length == 8 ? RdAddr | HNib | MAR : RdAddr | MAR,
|
|
ioaddr + PAR_DATA);
|
|
ioaddr + PAR_DATA);
|
|
if (data_mode <= 1) { /* Mode 0 or 1 */
|
|
if (data_mode <= 1) { /* Mode 0 or 1 */
|
|
- do *p++ = read_byte_mode0(ioaddr); while (--length > 0);
|
|
|
|
- } else /* Mode 2 or 3 */
|
|
|
|
- do *p++ = read_byte_mode2(ioaddr); while (--length > 0);
|
|
|
|
- } else if (data_mode <= 5)
|
|
|
|
- do *p++ = read_byte_mode4(ioaddr); while (--length > 0);
|
|
|
|
- else
|
|
|
|
- do *p++ = read_byte_mode6(ioaddr); while (--length > 0);
|
|
|
|
|
|
+ do { *p++ = read_byte_mode0(ioaddr); } while (--length > 0);
|
|
|
|
+ } else { /* Mode 2 or 3 */
|
|
|
|
+ do { *p++ = read_byte_mode2(ioaddr); } while (--length > 0);
|
|
|
|
+ }
|
|
|
|
+ } else if (data_mode <= 5) {
|
|
|
|
+ do { *p++ = read_byte_mode4(ioaddr); } while (--length > 0);
|
|
|
|
+ } else {
|
|
|
|
+ do { *p++ = read_byte_mode6(ioaddr); } while (--length > 0);
|
|
|
|
+ }
|
|
|
|
|
|
- outb(EOC+HNib+MAR, ioaddr + PAR_DATA);
|
|
|
|
|
|
+ outb(EOC+HNib+MAR, ioaddr + PAR_DATA);
|
|
outb(Ctrl_SelData, ioaddr + PAR_CONTROL);
|
|
outb(Ctrl_SelData, ioaddr + PAR_CONTROL);
|
|
}
|
|
}
|
|
|
|
|