[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cdi-devel] [PATCH 2/5] e1000: Improve debugging code
Fix a debug output format string: The buffer address is 64 bits.
Also avoid printing a warning for Tx Queue Empty interrupts, these are
normal and expected.
Signed-off-by: Kevin Wolf <kevin@xxxxxxxxxx>
---
e1000/device.c | 4 ++--
e1000/device.h | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/e1000/device.c b/e1000/device.c
index 26a9233..ac9bc2d 100644
--- a/e1000/device.c
+++ b/e1000/device.c
@@ -386,7 +386,7 @@ static void reset_nic(struct e1000_device* netcard)
netcard->rx_desc[i].buffer = PHYS(netcard, rx_buffer[i * RX_BUFFER_SIZE]);
#ifdef DEBUG
- printf("e1000: [%d] Rx: Buffer @ phys %08x, Desc @ phys %08x\n",
+ printf("e1000: [%d] Rx: Buffer @ phys %08llx, Desc @ phys %08x\n",
i,
netcard->rx_desc[i].buffer,
PHYS(netcard, rx_desc[i]));
@@ -637,7 +637,7 @@ static void e1000_handle_interrupt(struct cdi_device* device)
reg_outl(netcard, REG_RXDESC_TAIL, netcard->rx_cur_buffer);
}
- } else if (icr & ICR_TRANSMIT) {
+ } else if (icr & (ICR_TRANSMIT | ICR_TXQE)) {
// Nichts zu tun
} else if (icr & ICR_LINK_CHANGE) {
printf("e1000: Link %s\n",
diff --git a/e1000/device.h b/e1000/device.h
index 657192d..ff73135 100644
--- a/e1000/device.h
+++ b/e1000/device.h
@@ -105,6 +105,7 @@ enum {
enum {
ICR_TRANSMIT = (1 << 0),
+ ICR_TXQE = (1 << 1), /* TX Queue Empty */
ICR_LINK_CHANGE = (1 << 2),
ICR_RECEIVE = (1 << 7),
};
--
2.1.4