From: Anthony Liguori <anthony@codemonkey.ws>
To: malc <av1474@comtv.ru>
Cc: qemu-devel@nongnu.org, bifferos <bifferos@yahoo.co.uk>
Subject: Re: [Qemu-devel] [PATCH] Add support for r6040 NIC
Date: Tue, 30 Aug 2011 20:59:12 -0500 [thread overview]
Message-ID: <4E5D9570.1030201@codemonkey.ws> (raw)
In-Reply-To: <alpine.LNX.2.00.1108310527290.3538@linmac>
On 08/30/2011 08:30 PM, malc wrote:
> On Tue, 30 Aug 2011, Anthony Liguori wrote:
>
>> This won't even come close to passing checkpatch.pl
>
> Have you actually tried?
Sigh. I was hoping checkpatch.pl was more useful than it appears to be.
At any rate, the patch doesn't follow CODING_STYLE.
Regards,
Anthony Liguori
>
>>
>> Regards,
>>
>> Anthony Liguori
>>
>> On 08/30/2011 08:05 PM, bifferos wrote:
>>>
>>> Signed-off-by: Mark Kelly<mark@bifferos.com>
>>> diff --git a/Makefile.objs b/Makefile.objs
>>> index 6991a9f..7d87503 100644
>>> --- a/Makefile.objs
>>> +++ b/Makefile.objs
>>> @@ -240,6 +240,7 @@ hw-obj-$(CONFIG_PCNET_PCI) += pcnet-pci.o
>>> hw-obj-$(CONFIG_PCNET_COMMON) += pcnet.o
>>> hw-obj-$(CONFIG_E1000_PCI) += e1000.o
>>> hw-obj-$(CONFIG_RTL8139_PCI) += rtl8139.o
>>> +hw-obj-$(CONFIG_R6040_PCI) += r6040.o
>>>
>>> hw-obj-$(CONFIG_SMC91C111) += smc91c111.o
>>> hw-obj-$(CONFIG_LAN9118) += lan9118.o
>>> diff --git a/default-configs/pci.mak b/default-configs/pci.mak
>>> index 22bd350..d2ea7a2 100644
>>> --- a/default-configs/pci.mak
>>> +++ b/default-configs/pci.mak
>>> @@ -10,6 +10,7 @@ CONFIG_PCNET_PCI=y
>>> CONFIG_PCNET_COMMON=y
>>> CONFIG_LSI_SCSI_PCI=y
>>> CONFIG_RTL8139_PCI=y
>>> +CONFIG_R6040_PCI=y
>>> CONFIG_E1000_PCI=y
>>> CONFIG_IDE_CORE=y
>>> CONFIG_IDE_QDEV=y
>>> diff --git a/hw/pci.c b/hw/pci.c
>>> index b904a4e..7e12935 100644
>>> --- a/hw/pci.c
>>> +++ b/hw/pci.c
>>> @@ -1527,6 +1527,7 @@ static const char * const pci_nic_models[] = {
>>> "rtl8139",
>>> "e1000",
>>> "pcnet",
>>> + "r6040",
>>> "virtio",
>>> NULL
>>> };
>>> @@ -1539,6 +1540,7 @@ static const char * const pci_nic_names[] = {
>>> "rtl8139",
>>> "e1000",
>>> "pcnet",
>>> + "r6040",
>>> "virtio-net-pci",
>>> NULL
>>> };
>>> diff --git a/hw/r6040.c b/hw/r6040.c
>>> new file mode 100644
>>> index 0000000..83587e7
>>> --- /dev/null
>>> +++ b/hw/r6040.c
>>> @@ -0,0 +1,627 @@
>>> +/*
>>> + Emulation of r6040 ethernet controller found in a number of SoCs.
>>> + Copyright (c) 2011 Mark Kelly, mark@bifferos.com
>
> This doesn't spell out under which conditions this can be used by
> people other than Mark Kelly.
>
>>> +
>>> + This has been written using the R8610[1] and ip101a[2] datasheets.
>>> +
>>> + ICs with the embedded controller include R8610, R3210, AMRISC20000
>>> + and Vortex86SX
>>> +
>>> + The emulation seems good enough to fool Linux 2.6.37.6. It is
>>> + not perfect, but has proven useful.
>>> +
>>> + [1] http://www.sima.com.tw/download/R8610_D06_20051003.pdf
>>> + [2] http://www.icplus.com.tw/pp-IP101A.html
>>> + */
>>> +
>>> +#include "hw.h"
>>> +#include "pci.h"
>>> +#include "net.h"
>>> +#include "loader.h"
>>> +#include "sysemu.h"
>>> +#include "qemu-timer.h"
>>> +
>>> +/* #define DEBUG_R6040 1 */
>>> +
>>> +
>>> +#if defined DEBUG_R6040
>>> +#define DPRINTF(fmt, ...) \
>>> + do { fprintf(stderr, "R6040: " fmt, ## __VA_ARGS__); } while (0)
>>> +#else
>>> +static inline GCC_FMT_ATTR(1, 2) int DPRINTF(const char *fmt, ...)
>>> +{
>>> + return 0;
>>> +}
>>> +#endif
>>> +
>>> +
>>> +/* Cast in order of appearance. _W prevfix means it's used to index the
>
> prefix (though suffix is even better)
>
> [..snip..]
>
next prev parent reply other threads:[~2011-08-31 1:59 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-31 1:05 [Qemu-devel] [PATCH] Add support for r6040 NIC bifferos
2011-08-31 1:17 ` Anthony Liguori
2011-08-31 1:30 ` malc
2011-08-31 1:59 ` Anthony Liguori [this message]
2011-08-31 13:17 ` malc
2011-08-31 13:30 ` Anthony Liguori
2011-08-31 13:39 ` malc
2011-08-31 13:40 ` Anthony Liguori
2011-08-31 13:51 ` malc
2011-08-31 14:29 ` Anthony Liguori
2011-08-31 14:35 ` malc
2011-08-31 16:06 ` Anthony Liguori
2011-08-31 16:24 ` malc
2011-08-31 18:35 ` Blue Swirl
2011-08-31 18:37 ` malc
2011-08-31 17:59 ` Edgar E. Iglesias
2011-08-31 18:46 ` Blue Swirl
2011-08-31 18:58 ` Edgar E. Iglesias
2011-08-31 18:48 ` Anthony Liguori
2011-08-31 19:12 ` Edgar E. Iglesias
2011-08-31 19:18 ` Edgar E. Iglesias
2011-08-31 19:23 ` Anthony Liguori
2011-08-31 19:52 ` Blue Swirl
2011-08-31 18:30 ` Blue Swirl
2011-08-31 21:23 ` bifferos
2011-09-01 7:39 ` Markus Armbruster
2011-09-01 21:49 ` Anthony Liguori
2011-09-03 9:44 ` Blue Swirl
2011-09-01 10:42 ` Gerd Hoffmann
2011-08-31 13:35 ` bifferos
2011-08-31 20:03 ` [Qemu-devel] [PATCH v2] " bifferos
2011-09-01 8:43 ` [Qemu-devel] [PATCH] " Avi Kivity
2011-09-01 20:02 ` bifferos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E5D9570.1030201@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=av1474@comtv.ru \
--cc=bifferos@yahoo.co.uk \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).