[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[tyndur-devel] [PATCH 3/5] pcnet: tyndur-spezifischer Code
! pcnet: tyndur-spezifischen Code in #ifdef
! pcnet: Unnoetiger tyndur-spezifischer Code entfernt
Signed-off-by: Kevin Wolf <kevin@xxxxxxxxxx>
---
src/modules/cdi/pcnet/main.c | 6 ++++++
src/modules/cdi/pcnet/pcnet.c | 10 ----------
2 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/src/modules/cdi/pcnet/main.c b/src/modules/cdi/pcnet/main.c
index c3b75a8..d8a77f6 100644
--- a/src/modules/cdi/pcnet/main.c
+++ b/src/modules/cdi/pcnet/main.c
@@ -52,8 +52,10 @@ static struct {
static const char* driver_name = "pcnet";
+#ifdef TYNDUR
// FIXME: LOST-spezifisch
uint32_t string_to_ip(char* ip);
+#endif
static void process_parameter(struct module_options* options, char* param);
static int pcnet_driver_init(int argc, char* argv[]);
@@ -118,7 +120,9 @@ static int pcnet_driver_init(int argc, char* argv[])
memset(device, 0, sizeof(struct pcnet_device));
device->pci = dev;
+#ifdef TYNDUR
device->net.ip = options.ip;
+#endif
cdi_list_push(driver.net.drv.devices, device);
} else {
cdi_pci_device_destroy(dev);
@@ -133,6 +137,7 @@ static int pcnet_driver_init(int argc, char* argv[])
static void process_parameter(struct module_options* options, char* param)
{
+#ifdef TYNDUR
printf("pcnet-Parameter: %s\n", param);
if (strncmp(param, "ip=", 3) == 0) {
@@ -142,6 +147,7 @@ static void process_parameter(struct module_options* options, char* param)
} else {
printf("Unbekannter Parameter %s\n", param);
}
+#endif
}
/**
diff --git a/src/modules/cdi/pcnet/pcnet.c b/src/modules/cdi/pcnet/pcnet.c
index 6e0ce51..8bccbf4 100644
--- a/src/modules/cdi/pcnet/pcnet.c
+++ b/src/modules/cdi/pcnet/pcnet.c
@@ -37,7 +37,6 @@
#include "cdi/io.h"
#include <stdio.h>
-#include <syscall.h>
static void pcnet_handle_interrupt(struct cdi_device* device);
static void pcnet_reset(struct pcnet_device *netcard);
@@ -118,8 +117,6 @@ void pcnet_remove_device(struct cdi_device* device)
void pcnet_send_packet
(struct cdi_net_device* device, void* data, size_t size)
{
-// p();
-
struct pcnet_device *netcard = (struct pcnet_device*) device;
if (netcard->last_transmit_descriptor > 7)netcard->last_transmit_descriptor = 0;
@@ -140,14 +137,10 @@ void pcnet_send_packet
++netcard->last_transmit_descriptor;
if (netcard->last_transmit_descriptor == 8)netcard->last_transmit_descriptor = 0;
-
-// v();
}
static void pcnet_handle_interrupt(struct cdi_device* device)
{
-// p();
-
struct pcnet_device* netcard = (struct pcnet_device*) device;
if (netcard->init_wait_for_irq == 1)
@@ -156,7 +149,6 @@ static void pcnet_handle_interrupt(struct cdi_device* device)
pcnet_write_csr(netcard, CSR_STATUS, csr0);
DEBUG_MSG("Interrupt (wait for irq)");
netcard->init_wait_for_irq = 0;
-// v();
return;
}
@@ -216,8 +208,6 @@ static void pcnet_handle_interrupt(struct cdi_device* device)
// Clear the interrupt request
pcnet_write_csr(netcard, CSR_STATUS, STATUS_INTERRUPT_ENABLE | STATUS_RECEIVE_INTERRUPT);
}
-
-// v();
}
static void pcnet_reset(struct pcnet_device *netcard)
--
1.6.0.2