Skip to content

Commit

Permalink
drivers: net: atp: fix various indentation issues
Browse files Browse the repository at this point in the history
There are various lines that have indentation issues, fix these.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Colin Ian King authored and David S. Miller committed Jan 16, 2019
1 parent 9fb0969 commit eedfb22
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions drivers/net/ethernet/realtek/atp.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,14 +454,14 @@ static void hardware_init(struct net_device *dev)
{
struct net_local *lp = netdev_priv(dev);
long ioaddr = dev->base_addr;
int i;
int i;

/* Turn off the printer multiplexer on the 8012. */
for (i = 0; i < 8; i++)
outb(mux_8012[i], ioaddr + PAR_DATA);
write_reg_high(ioaddr, CMR1, CMR1h_RESET);

for (i = 0; i < 6; i++)
for (i = 0; i < 6; i++)
write_reg_byte(ioaddr, PAR0 + i, dev->dev_addr[i]);

write_reg_high(ioaddr, CMR2, lp->addr_mode);
Expand All @@ -471,15 +471,15 @@ static void hardware_init(struct net_device *dev)
(read_nibble(ioaddr, CMR2_h) >> 3) & 0x0f);
}

write_reg(ioaddr, CMR2, CMR2_IRQOUT);
write_reg_high(ioaddr, CMR1, CMR1h_RxENABLE | CMR1h_TxENABLE);
write_reg(ioaddr, CMR2, CMR2_IRQOUT);
write_reg_high(ioaddr, CMR1, CMR1h_RxENABLE | CMR1h_TxENABLE);

/* Enable the interrupt line from the serial port. */
outb(Ctrl_SelData + Ctrl_IRQEN, ioaddr + PAR_CONTROL);

/* Unmask the interesting interrupts. */
write_reg(ioaddr, IMR, ISR_RxOK | ISR_TxErr | ISR_TxOK);
write_reg_high(ioaddr, IMR, ISRh_RxErr);
write_reg(ioaddr, IMR, ISR_RxOK | ISR_TxErr | ISR_TxOK);
write_reg_high(ioaddr, IMR, ISRh_RxErr);

lp->tx_unit_busy = 0;
lp->pac_cnt_in_tx_buf = 0;
Expand Down Expand Up @@ -610,10 +610,12 @@ static irqreturn_t atp_interrupt(int irq, void *dev_instance)
write_reg(ioaddr, CMR2, CMR2_NULL);
write_reg(ioaddr, IMR, 0);

if (net_debug > 5) printk(KERN_DEBUG "%s: In interrupt ", dev->name);
while (--boguscount > 0) {
if (net_debug > 5)
printk(KERN_DEBUG "%s: In interrupt ", dev->name);
while (--boguscount > 0) {
int status = read_nibble(ioaddr, ISR);
if (net_debug > 5) printk("loop status %02x..", status);
if (net_debug > 5)
printk("loop status %02x..", status);

if (status & (ISR_RxOK<<3)) {
handled = 1;
Expand All @@ -640,7 +642,8 @@ static irqreturn_t atp_interrupt(int irq, void *dev_instance)
} while (--boguscount > 0);
} else if (status & ((ISR_TxErr + ISR_TxOK)<<3)) {
handled = 1;
if (net_debug > 6) printk("handling Tx done..");
if (net_debug > 6)
printk("handling Tx done..");
/* Clear the Tx interrupt. We should check for too many failures
and reinitialize the adapter. */
write_reg(ioaddr, ISR, ISR_TxErr + ISR_TxOK);
Expand Down Expand Up @@ -680,7 +683,7 @@ static irqreturn_t atp_interrupt(int irq, void *dev_instance)
break;
} else
break;
}
}

/* This following code fixes a rare (and very difficult to track down)
problem where the adapter forgets its ethernet address. */
Expand All @@ -694,7 +697,7 @@ static irqreturn_t atp_interrupt(int irq, void *dev_instance)
}

/* Tell the adapter that it can go back to using the output line as IRQ. */
write_reg(ioaddr, CMR2, CMR2_IRQOUT);
write_reg(ioaddr, CMR2, CMR2_IRQOUT);
/* Enable the physical interrupt line, which is sure to be low until.. */
outb(Ctrl_SelData + Ctrl_IRQEN, ioaddr + PAR_CONTROL);
/* .. we enable the interrupt sources. */
Expand Down

0 comments on commit eedfb22

Please sign in to comment.