* [Qemu-devel] [PATCH v1 1/3] e1000: emulate auto-negotiation during external link status change
2014-06-16 17:29 [Qemu-devel] [PATCH v1 0/3] e1000: link auto-negotiation fixes Gabriel L. Somlo
@ 2014-06-16 17:29 ` Gabriel L. Somlo
2014-06-19 13:51 ` Michael S. Tsirkin
2014-06-16 17:29 ` [Qemu-devel] [PATCH v1 2/3] e1000: improve auto-negotiation reporting via mii-tool Gabriel L. Somlo
` (4 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Gabriel L. Somlo @ 2014-06-16 17:29 UTC (permalink / raw)
To: qemu-devel; +Cc: romain, mst, agraf, stefanha, pbonzini, afaerber
This patch emulates auto-negotiation when the network link status
is modified externally (i.e. via "set_link <id> off/on").
Also, a couple of cleanup items regarding the PHY status register:
- unset AUTONEG_COMPLETE during link_down()
- set AUTONEG_COMPLETE during autoneg_timer() only if we actually
brought the link up.
Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
---
hw/net/e1000.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/hw/net/e1000.c b/hw/net/e1000.c
index 57bdffd..f0070ca 100644
--- a/hw/net/e1000.c
+++ b/hw/net/e1000.c
@@ -175,6 +175,7 @@ e1000_link_down(E1000State *s)
{
s->mac_reg[STATUS] &= ~E1000_STATUS_LU;
s->phy_reg[PHY_STATUS] &= ~MII_SR_LINK_STATUS;
+ s->phy_reg[PHY_STATUS] &= ~MII_SR_AUTONEG_COMPLETE;
}
static void
@@ -197,7 +198,6 @@ set_phy_ctrl(E1000State *s, int index, uint16_t val)
}
if ((val & MII_CR_AUTO_NEG_EN) && (val & MII_CR_RESTART_AUTO_NEG)) {
e1000_link_down(s);
- s->phy_reg[PHY_STATUS] &= ~MII_SR_AUTONEG_COMPLETE;
DBGOUT(PHY, "Start link auto negotiation\n");
timer_mod(s->autoneg_timer, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + 500);
}
@@ -209,9 +209,9 @@ e1000_autoneg_timer(void *opaque)
E1000State *s = opaque;
if (!qemu_get_queue(s->nic)->link_down) {
e1000_link_up(s);
+ s->phy_reg[PHY_STATUS] |= MII_SR_AUTONEG_COMPLETE;
+ DBGOUT(PHY, "Auto negotiation is completed\n");
}
- s->phy_reg[PHY_STATUS] |= MII_SR_AUTONEG_COMPLETE;
- DBGOUT(PHY, "Auto negotiation is completed\n");
}
static void (*phyreg_writeops[])(E1000State *, int, uint16_t) = {
@@ -853,7 +853,15 @@ e1000_set_link_status(NetClientState *nc)
if (nc->link_down) {
e1000_link_down(s);
} else {
- e1000_link_up(s);
+ if (s->phy_reg[PHY_CTRL] & MII_CR_AUTO_NEG_EN &&
+ s->phy_reg[PHY_CTRL] & MII_CR_RESTART_AUTO_NEG &&
+ !(s->phy_reg[PHY_STATUS] & MII_SR_AUTONEG_COMPLETE)) {
+ /* emulate auto-negotiation if supported */
+ timer_mod(s->autoneg_timer,
+ qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + 500);
+ } else {
+ e1000_link_up(s);
+ }
}
if (s->mac_reg[STATUS] != old_status)
--
1.9.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH v1 1/3] e1000: emulate auto-negotiation during external link status change
2014-06-16 17:29 ` [Qemu-devel] [PATCH v1 1/3] e1000: emulate auto-negotiation during external link status change Gabriel L. Somlo
@ 2014-06-19 13:51 ` Michael S. Tsirkin
0 siblings, 0 replies; 13+ messages in thread
From: Michael S. Tsirkin @ 2014-06-19 13:51 UTC (permalink / raw)
To: Gabriel L. Somlo; +Cc: romain, agraf, qemu-devel, stefanha, pbonzini, afaerber
On Mon, Jun 16, 2014 at 01:29:09PM -0400, Gabriel L. Somlo wrote:
> This patch emulates auto-negotiation when the network link status
> is modified externally (i.e. via "set_link <id> off/on").
>
> Also, a couple of cleanup items regarding the PHY status register:
> - unset AUTONEG_COMPLETE during link_down()
> - set AUTONEG_COMPLETE during autoneg_timer() only if we actually
> brought the link up.
>
> Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
> ---
> hw/net/e1000.c | 16 ++++++++++++----
> 1 file changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/hw/net/e1000.c b/hw/net/e1000.c
> index 57bdffd..f0070ca 100644
> --- a/hw/net/e1000.c
> +++ b/hw/net/e1000.c
> @@ -175,6 +175,7 @@ e1000_link_down(E1000State *s)
> {
> s->mac_reg[STATUS] &= ~E1000_STATUS_LU;
> s->phy_reg[PHY_STATUS] &= ~MII_SR_LINK_STATUS;
> + s->phy_reg[PHY_STATUS] &= ~MII_SR_AUTONEG_COMPLETE;
> }
>
> static void
> @@ -197,7 +198,6 @@ set_phy_ctrl(E1000State *s, int index, uint16_t val)
> }
> if ((val & MII_CR_AUTO_NEG_EN) && (val & MII_CR_RESTART_AUTO_NEG)) {
> e1000_link_down(s);
> - s->phy_reg[PHY_STATUS] &= ~MII_SR_AUTONEG_COMPLETE;
> DBGOUT(PHY, "Start link auto negotiation\n");
> timer_mod(s->autoneg_timer, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + 500);
> }
> @@ -209,9 +209,9 @@ e1000_autoneg_timer(void *opaque)
> E1000State *s = opaque;
> if (!qemu_get_queue(s->nic)->link_down) {
> e1000_link_up(s);
> + s->phy_reg[PHY_STATUS] |= MII_SR_AUTONEG_COMPLETE;
> + DBGOUT(PHY, "Auto negotiation is completed\n");
> }
> - s->phy_reg[PHY_STATUS] |= MII_SR_AUTONEG_COMPLETE;
> - DBGOUT(PHY, "Auto negotiation is completed\n");
> }
>
> static void (*phyreg_writeops[])(E1000State *, int, uint16_t) = {
> @@ -853,7 +853,15 @@ e1000_set_link_status(NetClientState *nc)
> if (nc->link_down) {
> e1000_link_down(s);
> } else {
> - e1000_link_up(s);
> + if (s->phy_reg[PHY_CTRL] & MII_CR_AUTO_NEG_EN &&
> + s->phy_reg[PHY_CTRL] & MII_CR_RESTART_AUTO_NEG &&
> + !(s->phy_reg[PHY_STATUS] & MII_SR_AUTONEG_COMPLETE)) {
I think we also must test E1000_FLAG_AUTONEG in s->compat_flags.
No?
> + /* emulate auto-negotiation if supported */
> + timer_mod(s->autoneg_timer,
> + qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + 500);
> + } else {
> + e1000_link_up(s);
> + }
> }
>
> if (s->mac_reg[STATUS] != old_status)
> --
> 1.9.3
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH v1 2/3] e1000: improve auto-negotiation reporting via mii-tool
2014-06-16 17:29 [Qemu-devel] [PATCH v1 0/3] e1000: link auto-negotiation fixes Gabriel L. Somlo
2014-06-16 17:29 ` [Qemu-devel] [PATCH v1 1/3] e1000: emulate auto-negotiation during external link status change Gabriel L. Somlo
@ 2014-06-16 17:29 ` Gabriel L. Somlo
2014-06-16 17:29 ` [Qemu-devel] [PATCH v1 3/3] e1000: signal guest on successful link auto-negotiation Gabriel L. Somlo
` (3 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: Gabriel L. Somlo @ 2014-06-16 17:29 UTC (permalink / raw)
To: qemu-devel; +Cc: romain, mst, agraf, stefanha, pbonzini, afaerber
Using mii-tool (on F20-live), the following output is produced:
SIOCGMIIREG on ens3 failed: Input/output error
ens3: no autonegotiation, 1000baseT-FD flow-control, link ok
The first line (SIOCGMIIREG error) is due to mii-tool's inability
to read the PHY auto-negotiation expansion register.
On the second line, "no autonegotiation" is wrong, and caused by
the absence of a flag in the link partner ability register which
would indicate that our link partner has acked us. This flag not
documented in the Intel e1000 manual (bit shown as "reserved"),
but mii-tool uses it as LPA_LPACK from /usr/include/linux/mii.h.
This patch adds read access to PHY_AUTONEG_EXP and defines the
link partner ack flag, allowing mii-tool to generate output as
normally expected:
ens3: negotiated 1000baseT-FD flow-control, link ok
Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
---
Checkpatch generates two errors for this patch, related to where
PHY_AUTONEG_EXP is added to phy_regcap:
ERROR: code indent should never use tabs
#56: FILE: hw/net/e1000.c:232:
+ [PHY_ID2] = PHY_R,^I^I[M88E1000_PHY_SPEC_STATUS] = PHY_R,$
ERROR: space prohibited before open square bracket '['
#56: FILE: hw/net/e1000.c:232:
+ [PHY_ID2] = PHY_R, [M88E1000_PHY_SPEC_STATUS] = PHY_R,
total: 2 errors, 0 warnings, 32 lines checked
I merely added a comma at the end of the [PHY_ID2]... line, so I can
add the entry for PHY_AUTONEG_EXP. Tabs are there in all previous
lines, so not much of a choice unless we want to rat-hole into replacing
tabs everywhere first...
Thanks,
Gabriel
hw/net/e1000.c | 5 ++++-
hw/net/e1000_regs.h | 3 +++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/hw/net/e1000.c b/hw/net/e1000.c
index f0070ca..04e4044 100644
--- a/hw/net/e1000.c
+++ b/hw/net/e1000.c
@@ -176,6 +176,7 @@ e1000_link_down(E1000State *s)
s->mac_reg[STATUS] &= ~E1000_STATUS_LU;
s->phy_reg[PHY_STATUS] &= ~MII_SR_LINK_STATUS;
s->phy_reg[PHY_STATUS] &= ~MII_SR_AUTONEG_COMPLETE;
+ s->phy_reg[PHY_LP_ABILITY] &= ~MII_LPAR_LPACK;
}
static void
@@ -209,6 +210,7 @@ e1000_autoneg_timer(void *opaque)
E1000State *s = opaque;
if (!qemu_get_queue(s->nic)->link_down) {
e1000_link_up(s);
+ s->phy_reg[PHY_LP_ABILITY] |= MII_LPAR_LPACK;
s->phy_reg[PHY_STATUS] |= MII_SR_AUTONEG_COMPLETE;
DBGOUT(PHY, "Auto negotiation is completed\n");
}
@@ -227,7 +229,8 @@ static const char phy_regcap[0x20] = {
[PHY_CTRL] = PHY_RW, [PHY_1000T_CTRL] = PHY_RW,
[PHY_LP_ABILITY] = PHY_R, [PHY_1000T_STATUS] = PHY_R,
[PHY_AUTONEG_ADV] = PHY_RW, [M88E1000_RX_ERR_CNTR] = PHY_R,
- [PHY_ID2] = PHY_R, [M88E1000_PHY_SPEC_STATUS] = PHY_R
+ [PHY_ID2] = PHY_R, [M88E1000_PHY_SPEC_STATUS] = PHY_R,
+ [PHY_AUTONEG_EXP] = PHY_R,
};
/* PHY_ID2 documented in 8254x_GBe_SDM.pdf, pp. 250 */
diff --git a/hw/net/e1000_regs.h b/hw/net/e1000_regs.h
index 13ac671..60b96aa 100644
--- a/hw/net/e1000_regs.h
+++ b/hw/net/e1000_regs.h
@@ -384,6 +384,9 @@
#define MII_SR_100X_FD_CAPS 0x4000 /* 100X Full Duplex Capable */
#define MII_SR_100T4_CAPS 0x8000 /* 100T4 Capable */
+/* PHY Link Partner Ability Register */
+#define MII_LPAR_LPACK 0x4000 /* Acked by link partner */
+
/* Interrupt Cause Read */
#define E1000_ICR_TXDW 0x00000001 /* Transmit desc written back */
#define E1000_ICR_TXQE 0x00000002 /* Transmit Queue empty */
--
1.9.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH v1 3/3] e1000: signal guest on successful link auto-negotiation
2014-06-16 17:29 [Qemu-devel] [PATCH v1 0/3] e1000: link auto-negotiation fixes Gabriel L. Somlo
2014-06-16 17:29 ` [Qemu-devel] [PATCH v1 1/3] e1000: emulate auto-negotiation during external link status change Gabriel L. Somlo
2014-06-16 17:29 ` [Qemu-devel] [PATCH v1 2/3] e1000: improve auto-negotiation reporting via mii-tool Gabriel L. Somlo
@ 2014-06-16 17:29 ` Gabriel L. Somlo
2014-06-16 22:35 ` [Qemu-devel] [PATCH v1 0/3] e1000: link auto-negotiation fixes Alexander Graf
` (2 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: Gabriel L. Somlo @ 2014-06-16 17:29 UTC (permalink / raw)
To: qemu-devel; +Cc: romain, mst, agraf, stefanha, pbonzini, afaerber
Generate a link status change interrupt once link auto-netotiation
is successfully completed. This does not affect Linux and Windows
(XP and 7 tested) in any way, but is needed by the stock OS X driver
(AppleIntel8254XEthernet.kext), which would otherwise fail to notice
the link status change event.
Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
---
While Windows and Linux e1000 drivers (and, apparently, the open-source
AppleIntelE1000.kext from SourceForge) don't need an LSC interrupt to
detect when the link comes on (maybe because they're polling for it, I'd
have to look through the source to be 100% sure), Apple's stock, "out of
the box" e1000 driver (AppleIntel8254XEthernet.kext) will not become
aware of the link status change unless we send it an interrupt.
I believe it's not an unreasonable thing to do, and it's definitely not
something that happens in the BIOS, as I previously (mistakenly) thought...
As I mentioned in the commit blurb above, Linux and Windows don't mind the
additional LSC interrupt (not that they should, but just making sure... :).
Finally, it may be better to simply move e1000_autoneg_timer() to somewhere
*after* set_ics() in the source file, to avoid the forward-reference, but
I figured I'd keep the visual noise to a minimum for now...
Thanks,
Gabriel
hw/net/e1000.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/net/e1000.c b/hw/net/e1000.c
index 04e4044..0c9b472 100644
--- a/hw/net/e1000.c
+++ b/hw/net/e1000.c
@@ -204,6 +204,8 @@ set_phy_ctrl(E1000State *s, int index, uint16_t val)
}
}
+static void set_ics(E1000State *s, int index, uint32_t val);
+
static void
e1000_autoneg_timer(void *opaque)
{
@@ -213,6 +215,7 @@ e1000_autoneg_timer(void *opaque)
s->phy_reg[PHY_LP_ABILITY] |= MII_LPAR_LPACK;
s->phy_reg[PHY_STATUS] |= MII_SR_AUTONEG_COMPLETE;
DBGOUT(PHY, "Auto negotiation is completed\n");
+ set_ics(s, 0, E1000_ICS_LSC); /* signal link status change to guest */
}
}
--
1.9.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH v1 0/3] e1000: link auto-negotiation fixes
2014-06-16 17:29 [Qemu-devel] [PATCH v1 0/3] e1000: link auto-negotiation fixes Gabriel L. Somlo
` (2 preceding siblings ...)
2014-06-16 17:29 ` [Qemu-devel] [PATCH v1 3/3] e1000: signal guest on successful link auto-negotiation Gabriel L. Somlo
@ 2014-06-16 22:35 ` Alexander Graf
2014-06-17 4:31 ` Paolo Bonzini
2014-06-18 10:19 ` Stefan Hajnoczi
2014-06-19 13:54 ` Michael S. Tsirkin
5 siblings, 1 reply; 13+ messages in thread
From: Alexander Graf @ 2014-06-16 22:35 UTC (permalink / raw)
To: Gabriel L. Somlo, qemu-devel; +Cc: pbonzini, romain, afaerber, stefanha, mst
On 16.06.14 19:29, Gabriel L. Somlo wrote:
> This series contains a few fixes and improvements in the emulation
> of link auto-negotiation:
>
> - use auto-negotiation when the link is bounced externally (e.g. via
> set_link <foo> down/up on the qemu monitor command line).
>
> - allow mii_tool on linux access to all the phy registers and flags
> it requires in order to report a successfully auto-negotiated link.
>
> - inject LSC interrupt upon successful link auto-negotiation (required
> by stock OS X e1000 driver).
>
> See additional prose following commit logs in 2/3 (making up excuses
> for checkpatch error) and 3/3 (further thoughts on OS X vs. Linux/Windows
> re. auto-negotiation and LSC injection).
Looks very reasonable and straight forward to me.
Reviewed-by: Alexander Graf <agraf@suse.de>
Alex
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH v1 0/3] e1000: link auto-negotiation fixes
2014-06-16 22:35 ` [Qemu-devel] [PATCH v1 0/3] e1000: link auto-negotiation fixes Alexander Graf
@ 2014-06-17 4:31 ` Paolo Bonzini
2014-06-17 6:33 ` Alexander Graf
0 siblings, 1 reply; 13+ messages in thread
From: Paolo Bonzini @ 2014-06-17 4:31 UTC (permalink / raw)
To: Alexander Graf, Gabriel L. Somlo, qemu-devel
Cc: romain, afaerber, stefanha, mst
Il 17/06/2014 00:35, Alexander Graf ha scritto:
>
> On 16.06.14 19:29, Gabriel L. Somlo wrote:
>> This series contains a few fixes and improvements in the emulation
>> of link auto-negotiation:
>>
>> - use auto-negotiation when the link is bounced externally (e.g. via
>> set_link <foo> down/up on the qemu monitor command line).
>>
>> - allow mii_tool on linux access to all the phy registers and flags
>> it requires in order to report a successfully auto-negotiated link.
>>
>> - inject LSC interrupt upon successful link auto-negotiation (required
>> by stock OS X e1000 driver).
>>
>> See additional prose following commit logs in 2/3 (making up excuses
>> for checkpatch error) and 3/3 (further thoughts on OS X vs. Linux/Windows
>> re. auto-negotiation and LSC injection).
>
> Looks very reasonable and straight forward to me.
>
> Reviewed-by: Alexander Graf <agraf@suse.de>
Would you pick it up and send a pull request for it?
Paolo
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH v1 0/3] e1000: link auto-negotiation fixes
2014-06-17 4:31 ` Paolo Bonzini
@ 2014-06-17 6:33 ` Alexander Graf
2014-06-17 8:06 ` Paolo Bonzini
2014-06-17 10:48 ` Michael S. Tsirkin
0 siblings, 2 replies; 13+ messages in thread
From: Alexander Graf @ 2014-06-17 6:33 UTC (permalink / raw)
To: Paolo Bonzini
Cc: romain@dolbeau.org, mst@redhat.com, qemu-devel@nongnu.org,
Gabriel L. Somlo, stefanha@redhat.com, afaerber@suse.de
> Am 17.06.2014 um 06:31 schrieb Paolo Bonzini <pbonzini@redhat.com>:
>
> Il 17/06/2014 00:35, Alexander Graf ha scritto:
>>
>>> On 16.06.14 19:29, Gabriel L. Somlo wrote:
>>> This series contains a few fixes and improvements in the emulation
>>> of link auto-negotiation:
>>>
>>> - use auto-negotiation when the link is bounced externally (e.g. via
>>> set_link <foo> down/up on the qemu monitor command line).
>>>
>>> - allow mii_tool on linux access to all the phy registers and flags
>>> it requires in order to report a successfully auto-negotiated link.
>>>
>>> - inject LSC interrupt upon successful link auto-negotiation (required
>>> by stock OS X e1000 driver).
>>>
>>> See additional prose following commit logs in 2/3 (making up excuses
>>> for checkpatch error) and 3/3 (further thoughts on OS X vs. Linux/Windows
>>> re. auto-negotiation and LSC injection).
>>
>> Looks very reasonable and straight forward to me.
>>
>> Reviewed-by: Alexander Graf <agraf@suse.de>
>
> Would you pick it up and send a pull request for it?
Is e1000 / networking unmaintained?
Alex
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH v1 0/3] e1000: link auto-negotiation fixes
2014-06-17 6:33 ` Alexander Graf
@ 2014-06-17 8:06 ` Paolo Bonzini
2014-06-17 10:48 ` Michael S. Tsirkin
1 sibling, 0 replies; 13+ messages in thread
From: Paolo Bonzini @ 2014-06-17 8:06 UTC (permalink / raw)
To: Alexander Graf
Cc: romain@dolbeau.org, mst@redhat.com, qemu-devel@nongnu.org,
Gabriel L. Somlo, stefanha@redhat.com, afaerber@suse.de
Il 17/06/2014 08:33, Alexander Graf ha scritto:
>>> >> Looks very reasonable and straight forward to me.
>>> >>
>>> >> Reviewed-by: Alexander Graf <agraf@suse.de>
>> >
>> > Would you pick it up and send a pull request for it?
> Is e1000 / networking unmaintained?
Doh, it's obviously Stefan's area.
Paolo
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH v1 0/3] e1000: link auto-negotiation fixes
2014-06-17 6:33 ` Alexander Graf
2014-06-17 8:06 ` Paolo Bonzini
@ 2014-06-17 10:48 ` Michael S. Tsirkin
2014-06-17 10:50 ` Alexander Graf
1 sibling, 1 reply; 13+ messages in thread
From: Michael S. Tsirkin @ 2014-06-17 10:48 UTC (permalink / raw)
To: Alexander Graf
Cc: romain@dolbeau.org, qemu-devel@nongnu.org, Gabriel L. Somlo,
stefanha@redhat.com, Paolo Bonzini, afaerber@suse.de
On Tue, Jun 17, 2014 at 08:33:00AM +0200, Alexander Graf wrote:
>
>
> > Am 17.06.2014 um 06:31 schrieb Paolo Bonzini <pbonzini@redhat.com>:
> >
> > Il 17/06/2014 00:35, Alexander Graf ha scritto:
> >>
> >>> On 16.06.14 19:29, Gabriel L. Somlo wrote:
> >>> This series contains a few fixes and improvements in the emulation
> >>> of link auto-negotiation:
> >>>
> >>> - use auto-negotiation when the link is bounced externally (e.g. via
> >>> set_link <foo> down/up on the qemu monitor command line).
> >>>
> >>> - allow mii_tool on linux access to all the phy registers and flags
> >>> it requires in order to report a successfully auto-negotiated link.
> >>>
> >>> - inject LSC interrupt upon successful link auto-negotiation (required
> >>> by stock OS X e1000 driver).
> >>>
> >>> See additional prose following commit logs in 2/3 (making up excuses
> >>> for checkpatch error) and 3/3 (further thoughts on OS X vs. Linux/Windows
> >>> re. auto-negotiation and LSC injection).
> >>
> >> Looks very reasonable and straight forward to me.
> >>
> >> Reviewed-by: Alexander Graf <agraf@suse.de>
> >
> > Would you pick it up and send a pull request for it?
>
> Is e1000 / networking unmaintained?
>
> Alex
It isn't - both me and Stefan merge patches there.
It hasn't been a full day since patch was posted,
and I was unwell yesterday.
Why the query? Is there any urgency?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH v1 0/3] e1000: link auto-negotiation fixes
2014-06-17 10:48 ` Michael S. Tsirkin
@ 2014-06-17 10:50 ` Alexander Graf
0 siblings, 0 replies; 13+ messages in thread
From: Alexander Graf @ 2014-06-17 10:50 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: romain@dolbeau.org, qemu-devel@nongnu.org, Gabriel L. Somlo,
stefanha@redhat.com, Paolo Bonzini, afaerber@suse.de
On 17.06.14 12:48, Michael S. Tsirkin wrote:
> On Tue, Jun 17, 2014 at 08:33:00AM +0200, Alexander Graf wrote:
>>
>>> Am 17.06.2014 um 06:31 schrieb Paolo Bonzini <pbonzini@redhat.com>:
>>>
>>> Il 17/06/2014 00:35, Alexander Graf ha scritto:
>>>>> On 16.06.14 19:29, Gabriel L. Somlo wrote:
>>>>> This series contains a few fixes and improvements in the emulation
>>>>> of link auto-negotiation:
>>>>>
>>>>> - use auto-negotiation when the link is bounced externally (e.g. via
>>>>> set_link <foo> down/up on the qemu monitor command line).
>>>>>
>>>>> - allow mii_tool on linux access to all the phy registers and flags
>>>>> it requires in order to report a successfully auto-negotiated link.
>>>>>
>>>>> - inject LSC interrupt upon successful link auto-negotiation (required
>>>>> by stock OS X e1000 driver).
>>>>>
>>>>> See additional prose following commit logs in 2/3 (making up excuses
>>>>> for checkpatch error) and 3/3 (further thoughts on OS X vs. Linux/Windows
>>>>> re. auto-negotiation and LSC injection).
>>>> Looks very reasonable and straight forward to me.
>>>>
>>>> Reviewed-by: Alexander Graf <agraf@suse.de>
>>> Would you pick it up and send a pull request for it?
>> Is e1000 / networking unmaintained?
>>
>> Alex
> It isn't - both me and Stefan merge patches there.
> It hasn't been a full day since patch was posted,
> and I was unwell yesterday.
> Why the query? Is there any urgency?
No urgency at all, probably just a misunderstanding on Paolos side that
I'm reviewing non-PPC patches for a change ;).
Alex
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH v1 0/3] e1000: link auto-negotiation fixes
2014-06-16 17:29 [Qemu-devel] [PATCH v1 0/3] e1000: link auto-negotiation fixes Gabriel L. Somlo
` (3 preceding siblings ...)
2014-06-16 22:35 ` [Qemu-devel] [PATCH v1 0/3] e1000: link auto-negotiation fixes Alexander Graf
@ 2014-06-18 10:19 ` Stefan Hajnoczi
2014-06-19 13:54 ` Michael S. Tsirkin
5 siblings, 0 replies; 13+ messages in thread
From: Stefan Hajnoczi @ 2014-06-18 10:19 UTC (permalink / raw)
To: Gabriel L. Somlo
Cc: romain, mst, agraf, qemu-devel, stefanha, pbonzini, afaerber
[-- Attachment #1: Type: text/plain, Size: 1415 bytes --]
On Mon, Jun 16, 2014 at 01:29:08PM -0400, Gabriel L. Somlo wrote:
> This series contains a few fixes and improvements in the emulation
> of link auto-negotiation:
>
> - use auto-negotiation when the link is bounced externally (e.g. via
> set_link <foo> down/up on the qemu monitor command line).
>
> - allow mii_tool on linux access to all the phy registers and flags
> it requires in order to report a successfully auto-negotiated link.
>
> - inject LSC interrupt upon successful link auto-negotiation (required
> by stock OS X e1000 driver).
>
> See additional prose following commit logs in 2/3 (making up excuses
> for checkpatch error) and 3/3 (further thoughts on OS X vs. Linux/Windows
> re. auto-negotiation and LSC injection).
>
> Thanks much,
> Gabriel
>
> Gabriel L. Somlo (3):
> e1000: emulate auto-negotiation during external link status change
> e1000: improve auto-negotiation reporting via mii-tool
> e1000: signal guest on successful link auto-negotiation
>
> hw/net/e1000.c | 24 +++++++++++++++++++-----
> hw/net/e1000_regs.h | 3 +++
> 2 files changed, 22 insertions(+), 5 deletions(-)
From my limited e1000 understanding and some checking against the
datasheet:
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Since Michael Tsirkin's attention has been drawn, I'll leave this series
for him to review and merge.
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH v1 0/3] e1000: link auto-negotiation fixes
2014-06-16 17:29 [Qemu-devel] [PATCH v1 0/3] e1000: link auto-negotiation fixes Gabriel L. Somlo
` (4 preceding siblings ...)
2014-06-18 10:19 ` Stefan Hajnoczi
@ 2014-06-19 13:54 ` Michael S. Tsirkin
5 siblings, 0 replies; 13+ messages in thread
From: Michael S. Tsirkin @ 2014-06-19 13:54 UTC (permalink / raw)
To: Gabriel L. Somlo; +Cc: romain, agraf, qemu-devel, stefanha, pbonzini, afaerber
On Mon, Jun 16, 2014 at 01:29:08PM -0400, Gabriel L. Somlo wrote:
> This series contains a few fixes and improvements in the emulation
> of link auto-negotiation:
>
> - use auto-negotiation when the link is bounced externally (e.g. via
> set_link <foo> down/up on the qemu monitor command line).
>
> - allow mii_tool on linux access to all the phy registers and flags
> it requires in order to report a successfully auto-negotiated link.
>
> - inject LSC interrupt upon successful link auto-negotiation (required
> by stock OS X e1000 driver).
>
> See additional prose following commit logs in 2/3 (making up excuses
> for checkpatch error) and 3/3 (further thoughts on OS X vs. Linux/Windows
> re. auto-negotiation and LSC injection).
>
> Thanks much,
> Gabriel
Looks good to me.
We should be careful to bring link immediately up and not to run the
timer if running in legacy pc compatibility mode:
QEMU 1.3 does not support link auto-negotiation emulation, so if we
migrate during auto negotiation, after migration the link will be
down.
> Gabriel L. Somlo (3):
> e1000: emulate auto-negotiation during external link status change
> e1000: improve auto-negotiation reporting via mii-tool
> e1000: signal guest on successful link auto-negotiation
>
> hw/net/e1000.c | 24 +++++++++++++++++++-----
> hw/net/e1000_regs.h | 3 +++
> 2 files changed, 22 insertions(+), 5 deletions(-)
>
> --
> 1.9.3
^ permalink raw reply [flat|nested] 13+ messages in thread