david/ipxe
david
/
ipxe
Archived
1
0
Fork 0
Commit Graph

1264 Commits

Author SHA1 Message Date
Michael Brown a66fd8920d [usb] Add find_usb_bus_by_location() helper function
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-05-09 20:09:08 +01:00
Michael Brown b3de9664c7 [ehci] Poll child companion controllers after disowning port
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-05-09 20:09:08 +01:00
Michael Brown e4783add79 [usb] Maintain single lists of halted endpoints and changed ports
When an EHCI hotplug action results in the controller disowning the
port, it will result in a hotplug action on the corresponding UHCI or
OHCI controller.  Allow such hotplug actions to be carried out as part
of the same call to usb_step() or usb_register_bus(), by maintaining a
single central list of changed ports.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-05-09 20:08:50 +01:00
Michael Brown 5e1e2069fd [usb] Maintain a list of all USB buses
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-05-09 19:37:29 +01:00
Michael Brown f6604627ff [usb] Detect missed disconnections
The USB core will currently fail to detect disconnections if a new
device has attached by the time the port is examined in
usb_hotplug().

Fix by recording the fact that a disconnection has taken place
whenever the "connection status changed" (CSC) bit is observed to be
set.  (Whether the change represents a disconnection or a
reconnection, it indicates that the port has experienced some time of
being disconnected.)

Note that the time at which a disconnection can be detected varies by
hub type.  In particular: root hubs can observe the CSC bit when
polling, and so will record the disconnection before calling
usb_port_changed(), but USB hubs read the port status (and hence the
CSC bit) only during the call to hub_speed(), long after the call to
usb_port_changed().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-05-08 14:57:14 +01:00
Michael Brown b88ab14ba3 [pci] Provide PCI_CLASS() to calculate a scalar PCI class value
Rename PCI_CLASS() (which constructs a struct pci_class_id) to
PCI_CLASS_ID(), and provide PCI_CLASS() as a macro which constructs
the 24-bit scalar value of a PCI class code.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-05-08 14:57:12 +01:00
Michael Brown 50e703a534 [usb] Include setup packet within I/O buffer for message transfers
The USB API currently assumes that host controllers will have
immediate data buffer space available in which to store the setup
packet.  This is true for xHCI, partially true for EHCI (which happens
to have 12 bytes of padding in each transfer descriptor due to
alignment requirements), and not true at all for UHCI.

Include the setup packet within the I/O buffer passed to the host
controller's message() method, thereby eliminating the requirement for
host controllers to provide immediate data buffers.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-05-01 16:29:11 +01:00
Michael Brown 9aa8090d06 [base16] Add buffer size parameter to base16_encode() and base16_decode()
The current API for Base16 (and Base64) encoding requires the caller
to always provide sufficient buffer space.  This prevents the use of
the generic encoding/decoding functionality in some situations, such
as in formatting the hex setting types.

Implement a generic hex_encode() (based on the existing
format_hex_setting()), implement base16_encode() and base16_decode()
in terms of the more generic hex_encode() and hex_decode(), and update
all callers to provide the additional buffer length parameter.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-04-24 14:41:32 +01:00
Christian Hesse 1b56452121 [ath9k] Remove confusing logic inversion in an ANI variable
This changed in Linux kernel the same way in commit 7067e701
("ath9k_hw: remove confusing logic inversion in an ANI variable") by
Felix Fietkau.

Additionally this fixes "error: logical not is only applied to the
left hand side of comparison" with GCC 5.1.0.

Signed-off-by: Christian Hesse <mail@eworm.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-04-24 13:08:29 +01:00
Christian Hesse 5744c3e8cd [intel] Add PCI device IDs for Intel I218-LM and I218-V
I218-LM (rev 3) is found in Lenovo Thinkpad X250.  The remaining
device IDs are from linux/drivers/net/ethernet/intel/e1000e/hw.h

Signed-off-by: Christian Hesse <mail@eworm.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-04-22 13:57:52 +01:00
Michael Brown 2154af0077 [rtl818x] Obviate RTL_ROM() hack
Reported-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-04-22 11:05:19 +01:00
Michael Brown eda1c58358 [realtek] Do not attempt to access EEPROM on RTL8169 chips
On some RTL8169 onboard NICs (observed with a Lenovo ThinkPad 11e),
the EEPROM is not merely not present: any attempt to read from the
non-existent EEPROM will crash and reboot the system.

The equivalent code to read from the EEPROM was removed from the Linux
r8169 driver in 2009 with a comment suggesting that it was similarly
found to be unreliable on some systems.

Fix by accessing the EEPROM only on RTL8139 NICs, and assuming that
the MAC address will always be correctly preset on RTL8169 NICs.

Reported-by: Evan Prohaska <eprohaska@edkey.org>
Tested-by: Evan Prohaska <eprohaska@edkey.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-04-21 17:42:36 +01:00
Michael Brown 8958f62a1c [intel] Force RX polling on VMware emulated 82545em
The emulated Intel 82545em in some versions of VMware (observed with
ESXi v5.1) seems to sometimes fail to set the RXT0 bit in the
interrupt cause register (ICR), causing iPXE to stop receiving
packets.  Work around this problem (for the 82545em only) by always
polling the receive queue regardless of the state of the ICR.

Reported-by: Slava Bendersky <volga629@networklab.ca>
Tested-by: Slava Bendersky <volga629@networklab.ca>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-04-21 16:52:33 +01:00
Michael Brown 63dcab002e [intel] Report any unexpected interrupt causes
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-04-21 15:47:16 +01:00
Ed Swierk da990b8870 [intel] Update PCI device IDs for Intel 82599 and X540 10G NICs
Identifiers are based on defines in Linux ixgbe_type.h.

Descriptive names are based on
https://www-ssl.intel.com/content/www/us/en/ethernet-controllers/82599-10-gbe-controller-spec-update.html
and
https://www-ssl.intel.com/content/www/us/en/network-adapters/10-gigabit-network-adapters/ethernet-x540-spec-update.html

Signed-off-by: Ed Swierk <eswierk@skyportsystems.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-04-21 15:40:55 +01:00
Michael Brown fb31365db4 [prism2] Remove duplicate PCI_ROM() lines
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-04-15 11:38:10 +01:00
Michael Brown 532649aacf [eepro100] Remove duplicate PCI_ROM() line
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-04-15 11:38:10 +01:00
Michael Brown c6c7e78c42 [efi] Poll for TX completions only when there is an outstanding TX buffer
At least one NII implementation (in a Microsoft Surface tablet) seems
to fail to report the absence (sic) of TX completions properly.  Work
around this by checking for TX completions only when we expect to see
one.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-04-14 17:02:00 +01:00
Michael Brown 729c16ad5b [efi] Poll media status only if advertised as supported
Some NII implementations will fail the GET_STATUS operation if we
request the media status.  Fix by doing so only if GET_INIT_INFO
reported that media status is supported.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-04-14 16:44:37 +01:00
Michael Brown 914dd539b0 [efi] Provide a dummy data block in nii_initialise()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-04-14 16:21:37 +01:00
Michael Brown 867e3ee475 [xhci] Always reset root hub ports
In theory USB3 ports do not require a reset to enable the port.
Experimentation shows that this is sometimes required, particularly
when rerouting ports from EHCI to xHCI and switching speeds.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-04-13 14:37:15 +01:00
Laszlo Ersek b12b1b620f [virtio] Downgrade per-iobuf debug messages to DBGC2
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-04-10 21:18:42 +01:00
Michael Brown f557794ab3 [xhci] Support USB1 devices attached via transaction translators
xHCI provides a somewhat convoluted mechanism for specifying details
of a transaction translator.  Hubs must be marked as such in the
device slot context.  The only opportunity to do so is as part of a
Configure Endpoint command, which can be executed only when opening
the hub's interrupt endpoint.

We add a mechanism for host controllers to intercept the opening of
hub devices, providing xHCI with an opportunity to update the internal
device slot structure for the corresponding USB device to indicate
that the device is a hub.  We then include the hub-specific details in
the input context whenever any Configure Endpoint command is issued.

When a device is opened, we record the device slot and port for its
transaction translator (if any), and supply these as part of the
Address Device command.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-23 20:24:20 +00:00
Michael Brown 026b3446b9 [usb] Improve debug messages for failed control transactions
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-23 20:18:02 +00:00
Michael Brown b418af26d9 [ehci] Support USB1 devices attached via transaction translators
Support low-speed and full-speed devices attached to a USB2 hub.  Such
devices use a transaction translator (TT) within the USB2 hub, which
asynchronously initiates transactions on the lower-speed bus and
returns the result via a split completion on the high-speed bus.

We make the simplifying assumption that there will never be more than
sixteen active interrupt endpoints behind a single transaction
translator; this assumption allows us to schedule all periodic start
splits in microframe 0 and all periodic split completions in
microframes 2 and 3.  (We do not handle isochronous endpoints.)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-23 16:23:08 +00:00
Michael Brown 5486c947e2 [usb] Clear transaction translator buffers when applicable
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-23 16:22:55 +00:00
Michael Brown 9e88194655 [usb] Add clear_tt() hub method to clear transaction translator buffer
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-23 16:21:13 +00:00
Michael Brown de6f4e3ede [usb] Reset endpoints without waiting for a new transfer to be enqueued
The current endpoint reset logic defers the reset until the caller
attempts to enqueue a new transfer to that endpoint.  This is
insufficient when dealing with endpoints behind a transaction
translator, since the transaction translator is a resource shared
between multiple endpoints.

We cannot reset the endpoint as part of the completion handling, since
that would introduce recursive calls to usb_poll().  Instead, we
add the endpoint to a list of halted endpoints, and perform the reset
on the next call to usb_step().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-23 15:21:35 +00:00
Michael Brown 661189eede [xhci] Ring doorbell as part of endpoint reset
The endpoint may already have enqueued TRBs at the time that
xhci_endpoint_reset() is called.  Ring the doorbell to resume
processing these TRBs immediately, rather than waiting until the next
call to xhci_endpoint_message() or xhci_endpoint_stream().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-23 15:21:35 +00:00
Michael Brown acc27b9005 [usb] Fix USB timeouts to match specification
Several of the USB timeouts were chosen on the principle of "pick an
arbitrary but ridiculously large value, just to be safe".  It turns
out that some of the timeouts permitted by the USB specification are
even larger: for example, control transactions are allowed to take up
to five seconds to complete.

Fix up these USB timeout values to match those found in the USB2
specification.

Debugged-by: Robin Smidsrød <robin@smidsrod.no>
Tested-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-18 16:43:18 +00:00
Michael Brown 8370f87745 [ehci] Add support for EHCI host controllers
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-18 12:35:17 +00:00
Michael Brown ec0e2a7bd7 [xhci] Do not release ownership back to BIOS when booting an OS
xHCI (and EHCI) nominally provide a mechanism for releasing ownership
of the host controller back to the BIOS, which can then potentially
restore legacy USB keyboard functionality.

This is a rarely used code path, since most operating systems claim
ownership and never attempt to later return to the BIOS.  On some
systems (observed with a Lenovo X1 Carbon), this code path leads to
obscure and interesting bugs: if the xHCI and EHCI controllers are
both claimed and later released back to the BIOS, then a subsequent
call to INT 16,0305 to set the keyboard repeat rate to a non-default
value will lock the system.

Obscure though this sequence of operations may sound, it is exactly
what happens when using iPXE to boot a Linux kernel via a USB network
card.  There is old and probably unwanted code in Linux's
arch/x86/boot/main.c which sets the keyboard repeat rate (with the
accompanying comment "Set keyboard repeat rate (why?)").  When booting
Linux via a USB network card on a Lenovo X1 Carbon, the system
therefore locks up immediately after jumping to the kernel's entry
point.

Work around this problem by preventing the release of ownership back
to the BIOS if it is known that we are shutting down to boot an OS.
This should allow legacy USB keyboard functionality to be restored if
the user chooses to exit iPXE, while avoiding the rarely used code
paths (and corresponding BIOS bugs) if the user chooses instead to
boot an OS.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-18 12:35:16 +00:00
Michael Brown 3de0ffc887 [xhci] Forcibly disable SMIs if BIOS fails to release ownership
If the BIOS fails to gracefully release ownership of the xHCI
controller, we can forcibly claim it by disabling all SMIs via the
USB legacy support control/status register.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-16 20:38:48 +00:00
Michael Brown 838ab97ce3 [usb] Add functions for manual device address assignment
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-16 15:42:29 +00:00
Michael Brown 74f57016dc [ncm] Respect maximum transfer size of the bus
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-16 15:40:54 +00:00
Michael Brown 7b6765ff1b [usb] Add the concept of a USB bus maximum transfer size
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-16 15:40:53 +00:00
Michael Brown 7f80eb511e [smsc75xx] Move RX FIFO overflow message to DBGLVL_EXTRA
RX FIFO overflow is almost inevitable since the (usable) USB2 bus
bandwidth is approximately one quarter of the Ethernet bandwidth.
Avoid flooding the console with RX FIFO overflow messages in a
standard debug build.

With TCP SACK implemented, the RX FIFO overflow no longer causes a
catastrophic drop in throughput.  Experimentation shows that HTTP
downloads now progress at a fairly smooth 250Mbps, which is around the
maximum speed attainable for a USB2 NIC.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-11 23:14:43 +00:00
Michael Brown 69062bbc21 [smsc75xx] Add driver for SMSC/Microchip LAN75xx USB Ethernet NICs
This driver is functional but any downloads via a TCP-based protocol
tend to perform poorly.  The 1Gbps Ethernet line rate is substantially
higher than the 480Mbps (in practice around 280Mbps) provided by USB2,
and the device has only 32kB of internal buffer memory.  Our 256kB TCP
receive window therefore rapidly overflows the RX FIFO, leading to
multiple dropped packets (usually within the same TCP window) and
hence a low overall throughput.

Reducing the TCP window size so that the RX FIFO does not overflow
greatly increases throughput, but is not a general-purpose solution.

Further investigation is required to determine how other OSes
(e.g. Linux) cope with this scenario.  It is possible that
implementing TCP SACK would provide some benefit.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-11 13:38:38 +00:00
Michael Brown 6ad02e78bb [mii] Add generic mii_check_link() function
Most devices expose at least the link up/down status via a bit in a
MAC register, since the MAC generally already needs to know whether or
not the link is up.  Some devices (e.g. the SMSC75xx USB NIC) expose
this information to software only via the MII registers.

Provide a generic mii_check_link() implementation to check the BMSR
and report the link status via netdev_link_{up,down}().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-10 21:31:07 +00:00
Michael Brown 03e71d5d1a [legal] Relicense Davicom DM96xx drivers
Reported-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-10 00:12:39 +00:00
Michael Brown 1ae94c903d [dm96xx] Add driver for Davicom DM96xx USB Ethernet NICs
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-09 19:58:57 +00:00
Thomas Miletich 02bf4f16f3 [intel] Add PCI ID for I218-LM
Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-09 14:20:41 +00:00
Michael Brown 3eb91209d9 [xen] Set the "feature-rx-notify" flag for netfront devices
iPXE already sends RX notifications to the backend when needed, but
does not set the "feature-rx-notify" flag.  As of XenServer 6.5, this
flag is mandatory and omitting it will cause the backend to fail.

Fix by setting the "feature-rx-notify" flag, to inform the backend
that we will send notifications.

Reported-by: Shalom Bhooshi <shalom.bhooshi@citrix.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-09 08:52:03 +00:00
Michael Brown e905cdcce3 [xhci] Undo PCH-specific quirk fixes when removing device
Restore the original values of XUSB2PR and USB3PSSEN, in case we are
booting an OS with no support for xHCI.

Suggested-by: Dan Ellis <Dan.Ellis@displaylink.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-06 17:15:29 +00:00
Michael Brown ff320404d5 [xhci] Enable USB3 ports on Intel PCH8/PCH9 controllers
Intel PCH controllers default to routing USB2 ports to EHCI rather
than xHCI, and default to disabling SuperSpeed connections.
Manipulate the PCI configuration space registers as necessary to
reroute ports and enable SuperSpeed.

Originally-fixed-by: Dan Ellis <Dan.Ellis@displaylink.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-06 11:58:14 +00:00
Michael Brown 1a4e94a828 [legal] Relicense files under GPL2_OR_LATER_OR_UBDL
Relicense files with kind permission from

    Stefan Hajnoczi <stefanha@redhat.com>

alongside the contributors who have already granted such relicensing
permission.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-05 11:40:13 +00:00
Michael Brown fbc4ba4b4e [build] Fix the REQUIRE_SYMBOL mechanism
At some point in the past few years, binutils became more aggressive
at removing unused symbols.  To function as a symbol requirement, a
relocation record must now be in a section marked with @progbits and
must not be in a section which gets discarded during the link (either
via --gc-sections or via /DISCARD/).

Update REQUIRE_SYMBOL() to generate relocation records meeting these
criteria.  To minimise the impact upon the final binary size, we use
existing symbols (specified via the REQUIRING_SYMBOL() macro) as the
relocation targets where possible.  We use R_386_NONE or R_X86_64_NONE
relocation types to prevent any actual unwanted relocation taking
place.  Where no suitable symbol exists for REQUIRING_SYMBOL() (such
as in config.c), the macro PROVIDE_REQUIRING_SYMBOL() can be used to
generate a one-byte-long symbol to act as the relocation target.

If there are versions of binutils for which this approach fails, then
the fallback will probably involve killing off REQUEST_SYMBOL(),
redefining REQUIRE_SYMBOL() to use the current definition of
REQUEST_SYMBOL(), and postprocessing the linked ELF file with
something along the lines of "nm -u | wc -l" to check that there are
no undefined symbols remaining.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-05 00:59:38 +00:00
Michael Brown 86ae6e6c18 [build] Use REQUIRE_OBJECT() to drag in per-object configuration
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-05 00:57:44 +00:00
Michael Brown e399fc0d21 [pci] Rewrite unrelicensable portions of pci.h
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-03 00:08:41 +00:00
Michael Brown 06c8a27b74 [pci] Remove outdated and mostly-unused pci_ids.h file
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-02 21:37:45 +00:00
Michael Brown 01d16d821f [libc] Rewrite byte-swapping code
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-02 16:35:37 +00:00
Michael Brown 2f020a8df3 [legal] Relicense files under GPL2_OR_LATER_OR_UBDL
These files cannot be automatically relicensed by util/relicense.pl
since they either contain unusual but trivial contributions (such as
the addition of __nonnull function attributes), or contain lines
dating back to the initial git revision (and so require manual
knowledge of the code's origin).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-02 16:35:29 +00:00
Michael Brown 626ccf76ea [legal] Relicense files under GPL2_OR_LATER_OR_UBDL
Relicence files with kind permission from the following contributors:

  Alex Williamson <alex.williamson@redhat.com>
  Eduardo Habkost <ehabkost@redhat.com>
  Greg Jednaszewski <jednaszewski@gmail.com>
  H. Peter Anvin <hpa@zytor.com>
  Marin Hannache <git@mareo.fr>
  Robin Smidsrød <robin@smidsrod.no>
  Shao Miller <sha0.miller@gmail.com>
  Thomas Horsten <thomas@horsten.com>

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-02 14:50:42 +00:00
Michael Brown b6ee89ffb5 [legal] Relicense files under GPL2_OR_LATER_OR_UBDL
Relicense files for which I am the sole author (as identified by
util/relicense.pl).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-02 14:17:31 +00:00
Michael Brown 5e95a79241 [legal] Include full licence text for all GPL2_OR_LATER files
Add the standard warranty disclaimer and Free Software Foundation
address paragraphs to the licence text where these are not currently
present.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-26 17:59:53 +00:00
Michael Brown 645458e5a0 [xhci] Abort commands on timeout
When a command times out, abort it (via the Command Abort bit in the
Command Ring Control Register) so that subsequent commands may execute
as expected.

This improves robustness when a device fails to respond to the Set
Address command, since the subsequent Disable Slot command will now
succeed.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-18 11:10:55 +00:00
Michael Brown 88448de720 [xhci] Leak memory if controller fails to disable slot
If the Disable Slot command fails then the hardware may continue to
write to the slot context.  Leak the memory used by the slot context
to avoid future memory corruption.

This situation has been observed in practice when a Set Address
command fails, causing the command ring to become temporarily
unresponsive.

Note that there is no need to similarly leak memory on the failure
path in xhci_device_open(), since in the event of a failure the
hardware is never informed of the slot context address.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-18 09:32:50 +00:00
Michael Brown 320e786d3d [ncm] Use generic USB network device framework
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-17 01:21:54 +00:00
Michael Brown 5b9b5ced4e [ecm] Use generic USB network device framework
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-17 01:21:54 +00:00
Michael Brown a92fb8d9a5 [usb] Add generic USB network device framework
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-17 01:21:53 +00:00
Michael Brown 14fc311271 [ncm] Use generic refill framework for bulk IN and interrupt endpoints
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-15 23:13:41 +00:00
Michael Brown 1706ab7ff3 [ecm] Use generic refill framework for bulk IN and interrupt endpoints
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-13 01:12:24 +00:00
Michael Brown ebe433e795 [usb] Use generic refill framework for USB hub interrupt endpoints
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-13 01:10:57 +00:00
Michael Brown 17fc79425e [usb] Provide generic framework for refilling receive endpoints
Provide a generic framework for allocating, refilling, and optionally
recycling I/O buffers used by bulk IN and interrupt endpoints.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-13 01:10:51 +00:00
Michael Brown 6fe8f80418 [usb] Handle port status changes received after failing to find a driver
Commit a60f2dd ("[usb] Try multiple USB device configurations")
changed the behaviour of register_usb() such that if no drivers are
found then the device will be closed and the memory used will be
freed.

If a port status change subsequently occurs while the device is still
physically attached, then usb_hotplug() will see this as a new device
having been attached, since there is no device recorded as being
currently attached to the port.  This can lead to spurious hotplug
events (or even endless loops of hotplug events, if the process of
opening and closing the device happens to generate a port status
change).

Fix by using a separate flag to indicate that a device is physically
attached (even if we have no corresponding struct usb_device).

Reported-by: Dan Ellis <Dan.Ellis@displaylink.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-12 00:57:15 +00:00
Michael Brown 32d20fdd7e [xhci] Delay after (possibly) forcing port link state to RxDetect
Some xHCI controllers (observed with a Renesas Electronics PCIe USB3
card) seem to require a delay after forcing the link state of USB3
ports to RxDetect.  Omitting this delay causes strange behaviour
including system lockups.

Add an unconditional 20ms delay after writing the port link states.
This seems to be sufficient to avoid the problem.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-11 11:18:35 +00:00
Michael Brown 1bb9e88ba0 [ecm] Add support for CDC-ECM USB Ethernet devices
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-10 13:49:27 +00:00
Michael Brown 58c3e7f747 [usb] Allow usb_stream() to enforce a terminating short packet
Some USB endpoints require that a short packet be used to terminate
transfers, since they have no other way to determine message
boundaries.  If the message length happens to be an exact multiple of
the USB packet size, then this requires the use of an additional
zero-length packet.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-10 13:49:27 +00:00
Michael Brown 17aceb34da [usb] Parse endpoint descriptor bInterval field
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-10 01:14:22 +00:00
Michael Brown cf153f60a5 [usb] Handle CDC union functional descriptors
USB Communications Device Class devices may use a union functional
descriptor to group several interfaces into a function.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-09 16:34:55 +00:00
Michael Brown a60f2ddfeb [usb] Try multiple USB device configurations
Iterate over a USB device's available configurations until we find one
for which we have working drivers.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-09 14:46:22 +00:00
Michael Brown 2e72d100af [ncm] Reserve headroom in received packets
Some protocols (such as ARP) may modify the received packet and re-use
the same I/O buffer for transmission of a reply.  To allow this,
reserve sufficient headroom at the start of each received packet
buffer for our transmit datapath headers.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-06 15:46:43 +00:00
Michael Brown 2d3f2b2446 [ncm] Use large multi-packet buffers by default
Some devices have a very small number of internal buffers, and rely on
being able to pack multiple packets into each buffer.  Using 2048-byte
buffers on such devices produces throughput of around 100Mbps.  Using
a small number of much larger buffers (e.g. 32kB) increases the
throughput to around 780Mbps.  (The full 1Gbps is not reached because
the high RTT induced by the use of multi-packet buffers causes us to
saturate our 256kB TCP window.)

Since allocation of large buffers is very likely to fail, allocate the
buffer set only once when the device is opened and recycle buffers
immediately after use.  Received data is now always copied to
per-packet buffers.

If allocation of large buffers fails, fall back to allocating a larger
number of smaller buffers.  This will give reduced performance, but
the device will at least still be functional.

Share code between the interrupt and bulk IN endpoint handlers, since
the buffer handling is now very similar.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-06 09:54:04 +00:00
Michael Brown 66048e3214 [usb] Report xHCI host controller events
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-05 12:40:05 +00:00
Michael Brown cc5a27f9cb [ncm] Add support for CDC-NCM USB Ethernet devices
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-03 12:33:35 +00:00
Michael Brown fd53ada87c [usb] Add support for xHCI host controllers
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-03 12:33:28 +00:00
Michael Brown e17e771a13 [usb] Add basic support for USB hubs
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-03 12:19:52 +00:00
Michael Brown 018b13dcec [usb] Add basic support for USB devices
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-03 12:19:47 +00:00
Michael Brown 072d656a2f [pci] Allow drivers to specify a PCI class
Allow drivers to specify a supported PCI class code.  To save space in
the final binary, make this an attribute of the driver rather than an
attribute of a PCI device ID list entry.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-02 14:31:18 +00:00
Michael Brown 639632b059 [hyperv] Assume that VMBus xfer page ranges correspond to RNDIS messages
The (undocumented) VMBus protocol seems to allow for transfer
page-based packets where the data payload is split into an arbitrary
set of ranges within the transfer page set.

The RNDIS protocol includes a length field within the header of each
message, and it is known from observation that multiple RNDIS messages
can be concatenated into a single VMBus message.

iPXE currently assumes that the transfer page range boundaries are
entirely arbitrary, and uses the RNDIS header length to determine the
RNDIS message boundaries.

Windows Server 2012 R2 generates an RNDIS_INDICATE_STATUS_MSG for an
undocumented and unknown status code (0x40020006) with a malformed
RNDIS header length: the length does not cover the StatusBuffer
portion of the message.  This causes iPXE to report a malformed RNDIS
message and to discard any further RNDIS messages within the same
VMBus message.

The Linux Hyper-V driver assumes that the transfer page range
boundaries correspond to RNDIS message boundaries, and so does not
notice the malformed length field in the RNDIS header.

Match the behaviour of the Linux Hyper-V driver: assume that the
transfer page range boundaries correspond to the RNDIS message
boundaries and ignore the RNDIS header length.  This avoids triggering
the "malformed packet" error and also avoids unnecessary data copying:
since we now have one I/O buffer per RNDIS message, there is no longer
any need to use iob_split().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-12-20 21:33:53 +00:00
Michael Brown a69c9953ac [hyperv] Increase TX ring size
Empirical observation suggests that 32 is a sensible size to minimise
the number of deferred packet transmissions without overflowing the
VMBus transmit ring buffer.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-12-20 12:41:42 +00:00
Michael Brown 4e6821662c [hyperv] Receive all VMBus messages in a poll
Allow for elision of transmitted TCP ACKs by handling all received
VMBus messages in each network device poll operation.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-12-20 12:40:17 +00:00
Michael Brown cd68d93b6e [hyperv] Tear down NetVSC RX buffer GPADL after closing VMBus device
On Windows Server 2012 R2, the receive buffer teardown completion
message seems to occasionally be deferred until after the VMBus
channel has been closed.  This happens even if there are no packets
currently in the receive buffer.

Work around this problem by separating the revocation and teardown of
the receive buffer, and deferring the teardown until after the VMBus
channel has been closed.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-12-20 01:53:35 +00:00
Michael Brown ef16d0d2b3 [hyperv] Add support for NetVSC paravirtual network devices
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-12-18 16:27:37 +00:00
Michael Brown d08547309b [vmxnet3] Add profiling code to exclude time spent in the hypervisor
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-12-12 10:18:03 +00:00
Michael Brown a937615151 [intel] Use autoloaded MAC address instead of EEPROM MAC address
The i350 (and possibly other Intel NICs) have a non-trivial
correspondence between the PCI function number and the external
physical port number.  For example, the i350 has a "LAN Function Sel"
bit within the EEPROM which can invert the mapping so that function 0
becomes port 3, function 1 becomes port 2, etc.

Unfortunately the MAC addresses within the EEPROM are indexed by
physical port number rather than PCI function number.  The end result
is that when anything other than the default mapping is used, iPXE
will use the wrong address as the base MAC address.

Fix by using the autoloaded MAC address if it is valid, and falling
back to reading the MAC address directly from the EEPROM only if no
autoloaded address is available.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-10-31 15:24:40 +00:00
Michael Brown af17abf67f [efi] Include NII driver within "snp" and "snponly" build targets
End users almost certainly don't care whether the underlying interface
is SNP or NII/UNDI.  Try to minimise surprise and unnecessary
documentation by including the NII driver whenever the SNP driver is
requested.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-10-17 16:52:31 +01:00
Michael Brown feb3a0f7d5 [efi] Check for presence of UNDI in NII protocol
iPXE itself exposes a dummy NII protocol with no UNDI.  Avoid
potentially dereferencing a NULL pointer by checking for a non-zero
UNDI address.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-10-17 16:52:31 +01:00
Michael Brown 047baaba38 [efi] Add NII / UNDI driver
Some UEFI network drivers provide a software UNDI interface which is
exposed via the Network Interface Identifier Protocol (NII), rather
than providing a Simple Network Protocol (SNP).

The UEFI platform firmware will usually include the SnpDxe driver,
which attaches to NII and provides an SNP interface.  The SNP
interface is usually provided on the same handle as the underlying NII
device.  This causes problems for our EFI driver model: when
efi_driver_connect() detaches existing drivers from the handle it will
cause the SNP interface to be uninstalled, and so our SNP driver will
not be able to attach to the handle.  The platform firmware will
eventually reattach the SnpDxe driver and may attach us to the SNP
handle, but we have no way to prevent other drivers from attaching
first.

Fix by providing a driver which can attach directly to the NII
protocol, using the software UNDI interface to drive the network
device.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-10-16 14:13:20 +01:00
Michael Brown b9a5ff2b03 [efi] Generalise snpnet_dev_info() to efi_device_info()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-10-16 14:12:42 +01:00
Michael Brown b71e93bb71 [efi] Free transmit ring entry before calling netdev_tx_complete()
The snpnet driver uses netdev_tx_defer() and so must ensure that space
in the (single-entry) transmit descriptor ring is freed up before
calling netdev_tx_complete().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-10-16 14:12:42 +01:00
Anton D. Kachalov 86285d1d54 [intel] Add 8086:1557 card (Intel 82599 10G ethernet mezz)
Signed-off-by: Anton D. Kachalov <mouse@yandex-team.ru>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-10-03 13:22:09 +01:00
Jan Kiszka 0df7ce9641 [intel] Add I217-LM PCI ID
Add the ID for the LM variant and differentiate it from the I217-V.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-09-16 16:00:50 +01:00
Michael Brown 0ce3c97095 [efi] Allow for non-PCI snpnet devices
We currently require information about the underlying PCI device to
populate the snpnet device's name and description.  If the underlying
device is not a PCI device, this will fail and prevent the device from
being registered.

Fix by falling back to populating the device description with
information based on the EFI handle, if no PCI device information is
available.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-09-04 16:18:08 +01:00
Michael Brown 4c5b7945c3 [efi] Use the SNP protocol instance to match the SNP chainloading device
Some systems will install a child of the SNP device and use this as
our loaded image's device handle, duplicating the installation of the
underlying SNP protocol onto the child device handle.  On such
systems, we want to end up driving the parent device (and
disconnecting any other drivers, such as MNP, which may be attached to
the parent device).

Fix by recording the SNP protocol instance at initialisation time, and
using this to match against device handles (rather than simply
comparing the handles themselves).

Reported-by: Jarrod Johnson <jarrod.b.johnson@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-09-04 15:39:02 +01:00
Michael Brown ead70bf920 [intel] Apply PBS/PBA errata workaround only to ICH8 PCI device IDs
ICH8 devices have an errata which requires us to reconfigure the
packet buffer size (PBS) register, and correspondingly adjust the
packet buffer allocation (PBA) register.  The "Intel I/O Controller
Hub ICH8/9/10 and 82566/82567/82562V Software Developer's Manual"
notes for the PBS register that:

  10.4.20   Packet Buffer Size - PBS (01008h; R/W)

  Note: The default setting of this register is 20 KB and is
        incorrect. This register must be programmed to 16 KB.

  Initial value: 0014h
                 0018h (ICH9/ICH10)

It is unclear from this comment precisely which devices require the
workaround to be applied.  We currently attempt to err on the side of
caution: if we detect an initial value of either 0x14 or 0x18 then the
workaround will be applied.  If the workaround is applied
unnecessarily, then the effect should be just that we use less than
the full amount of the available packet buffer memory.

Unfortunately this approach does not play nicely with other device
drivers.  For example, the Linux e1000e driver will rewrite PBA while
assuming that PBS still contains the default value, which can result
in inconsistent values between the two registers, and a corresponding
inability to transmit or receive packets.  Even more unfortunately,
the contents of PBS and PBA are not reset by anything less than a
power cycle, meaning that this error condition will survive a hardware
reset.

The Linux driver (written and maintained by Intel) applies the PBS/PBA
errata workaround only for devices in the ICH8 family, identified via
the PCI device ID.  Adopt a similar approach, using the PCI_ROM()
driver data field to indicate when the workaround is required.

Reported-by: Donald Bindner <dbindner@truman.edu>
Debugged-by: Donald Bindner <dbindner@truman.edu>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-08-21 00:40:22 +01:00
Michael Brown d461b8ddf2 [intel] Display before and after values for both PBS and PBA
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-08-20 23:16:01 +01:00
Michael Brown c845740b88 [intel] Display PBS value when applying ICH errata workaround
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-08-20 22:59:54 +01:00
Michael Brown 3953ddd2ac [smc9000] Avoid using CONFIG as a preprocessor macro
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-08-19 14:38:27 +01:00
Michael Brown 8b2942a7db [xen] Cope with unexpected initial backend states
Under some circumstances (e.g. if iPXE itself is booted via iSCSI, or
after an unclean reboot), the backend may not be in the expected
InitWait state when iPXE starts up.

There is no generic reset mechanism for Xenbus devices.  Recent
versions of xen-netback will gracefully perform all of the required
steps if the frontend sets its state to Initialising.  Older versions
(such as that found in XenServer 6.2.0) require the frontend to
transition through Closed before reaching Initialising.

Add a reset mechanism for netfront devices which does the following:

 - read current backend state

 - if backend state is anything other than InitWait, then set the
   frontend state to Closed and wait for the backend to also reach
   Closed

 - set the frontend state to Initialising and wait for the backend to
   reach InitWait.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-08-14 00:14:51 +01:00
Michael Brown be79ca535a [xen] Use version 1 grant tables by default
Using version 1 grant tables limits guests to using 16TB of grantable
RAM, and prevents the use of subpage grants.  Some versions of the Xen
hypervisor refuse to allow the grant table version to be set after the
first grant references have been created, so the loaded operating
system may be stuck with whatever choice we make here.  We therefore
currently use version 2 grant tables, since they give the most
flexibility to the loaded OS.

Current versions (7.2.0) of the Windows PV drivers have no support for
version 2 grant tables, and will merrily create version 1 entries in
what the hypervisor believes to be a version 2 table.  This causes
some confusion.

Avoid this problem by attempting to use version 1 tables, since
otherwise we may render Windows unable to boot.

Play nicely with other potential bootloaders by accepting either
version 1 or version 2 grant tables (if we are unable to set our
requested version).

Note that the use of version 1 tables on a 64-bit system introduces a
possible failure path in which a frame number cannot fit into the
32-bit field within the v1 structure.  This in turn introduces
additional failure paths into netfront_transmit() and
netfront_refill_rx().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-08-13 19:21:42 +01:00
Michael Brown 5c4f1da2ce [efi] Generalise snpnet_pci_info() to efi_locate_device()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-08-06 14:27:45 +01:00
Curtis Larsen 2ce1c70166 [efi] Try various possible SNP receive filters
The behavior observed in the Apple EFI (1.10) RecieveFilters() call
is:

  - failure if any of the PROMISCUOUS or MULTICAST filters are
    included

  - success if only UNICAST is included, however the result is
    UNICAST|BROADCAST

  - success if only UNICAST and BROADCAST are included

  - if UNICAST, or UNICAST|BROADCAST are used, but the previous call
    tried (and failed) to set UNICAST|BROADCAST|MULTICAST, then the
    result is UNICAST|BROADCAST|MULTICAST

Work around this apparently broken SNP implementation by trying
RecieveFilterMask, then falling back to UNICAST|BROADCAST|MULTICAST,
then UNICAST|BROADCAST, and finally UNICAST.

Modified-by: Michael Brown <mcb30@ipxe.org>
Tested-by: Curtis Larsen <larsen@dixie.edu>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-08-05 23:10:34 +01:00
Michael Brown 7b3cc18462 [efi] Open device path protocol only at point of use
Some EFI 1.10 systems (observed on an Apple iMac) do not allow us to
open the device path protocol with an attribute of
EFI_OPEN_PROTOCOL_BY_DRIVER and so we cannot maintain a safe,
long-lived pointer to the device path.  Work around this by instead
opening the device path protocol with an attribute of
EFI_OPEN_PROTOCOL_GET_PROTOCOL whenever we need to use it.

Debugged-by: Curtis Larsen <larsen@dixie.edu>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-08-05 23:10:33 +01:00
Michael Brown 3b42ed477f [efi] Provide centralised definitions of commonly-used GUIDs
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-08-05 23:08:32 +01:00
Michael Brown 471fdfab79 [efi] Reset multicast filter list when setting SNP receive filters
According to the UEFI specification, the MCastFilter parameter (which
we currently pass as NULL, along with a zero MCastFilterCnt) is
optional only if ResetMCastFilter is true.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-08-05 18:00:17 +01:00
Michael Brown 1f7b269954 [efi] Add ability to dump SNP device mode information
Originally-implemented-by: Curtis Larsen <larsen@dixie.edu>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-08-05 17:32:16 +01:00
Michael Brown 16d99cc8ef [efi] Dump existing openers when we are unable to open a protocol
Dump the existing openers of a protocol whenever we are unable to open
a protocol using attributes of BY_DEVICE, EXCLUSIVE, or
BY_CHILD_CONTROLLER.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-07-31 12:50:14 +01:00
Michael Brown 60891f699a [efi] Use efi_handle_name() instead of efi_devpath_text() where applicable
Using efi_devpath_text() is marginally more efficient if we already
have the device path protocol available, but the mild increase in
efficiency is not worth compromising the clarity of the pattern:

  DBGC ( device, "THING %p %s ...", device, efi_handle_name ( device ) );

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-07-31 11:57:31 +01:00
Michael Brown 2e0821b9ed [efi] Use efi_handle_name() instead of efi_handle_devpath_text()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-07-31 11:56:44 +01:00
Michael Brown 793a806611 [xen] Add support for Xen netfront virtual NICs
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-07-29 15:57:56 +01:00
Michael Brown 3a02409fc8 [natsemi] Check for ioremap() failures
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-07-16 15:54:49 +01:00
Michael Brown 720ae17aa4 [myson] Check for ioremap() failures
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-07-16 15:53:43 +01:00
Michael Brown 022ef91984 [skel] Check for ioremap() failures
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-07-16 15:52:48 +01:00
Michael Brown 7ab3035749 [vmxnet3] Check for ioremap() failures
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-07-16 15:51:38 +01:00
Michael Brown 857e4f56a7 [realtek] Check for ioremap() failures
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-07-16 15:50:18 +01:00
Michael Brown 9ce2b56af6 [intel] Check for ioremap() failures
Debugged-by: Anton D. Kachalov <mouse@yandex-team.ru>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-07-16 15:49:08 +01:00
Michael Brown d0cfbd01f5 [efi] Rewrite SNP NIC driver
Rewrite the SNP NIC driver to use non-blocking and deferrable
transmissions, to provide link status detection, to provide
information about the underlying (PCI) hardware device, and to avoid
unnecessary I/O buffer allocations during receive polling.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-07-08 14:01:55 +01:00
Michael Brown c7051d826b [efi] Allow network devices to be created on top of arbitrary SNP devices
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-07-03 15:28:17 +01:00
Hannes Reinecke bb5a4a111b [igbvf] Allow changing of MAC address
The VF might not have assigned a MAC address upon startup, and will
end up with a random MAC address during probe().  With this patch the
MAC address can be changed later on.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-06-12 17:46:12 +01:00
Hannes Reinecke f63ec19dca [igbvf] Assign random MAC address if none is set
If the VF doesn't have a MAC address assigned we should create a
random MAC address.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-06-12 17:38:08 +01:00
Michael Brown d5cf058994 [iscsi] Include IP address origin in iBFT
The iBFT includes an "origin" field to indicate the source of the IP
address.  We use the heuristic of assuming that the source should be
"manual" if the IP address originates directly from the network device
settings block, and "DHCP" otherwise.  This is an imperfect guess, but
is likely to be correct in most common situations.

Originally-implemented-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-06-12 17:09:16 +01:00
Michael Brown 059adae434 [iscsi] Read IPv4 settings only from the relevant network device
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-06-12 17:03:14 +01:00
Michael Brown e047811c85 [scsi] Improve sense code parsing
Parse the sense data to extract the reponse code, the sense key, the
additional sense code, and the additional sense code qualifier.

Originally-implemented-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-06-03 02:04:46 +01:00
Michael Brown 4e4fc678c2 [intel] Increase receive ring fill level
As of commit d28bb51 ("[tcp] Defer sending ACKs until all received
packets have been processed"), increasing the RX ring size will
increase the number of received packets per transmitted ACK (since
each poll will process up to one complete receive ring).  Under KVM,
this can make a substantial (up to ~200%) difference to the overall
download speed, since transmissions are very expensive.

Increase the ring fill level from four to eight packets: this
increases the download speed by around 50% at a cost of around 8kB of
heap space.  Further speedups are possible by increasing the ring size
further, but it would be preferable to find alternative methods which
do not use noticeable amounts of heap space.

Tested-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-05-16 13:15:40 +01:00
Michael Brown abf875a2e5 [intel] Exclude time spent in hypervisor from profiling
When profiling, exclude any time spent inside the hypervisor
responding to our MMIO accesses.  This substantially reduces the
variance accumulated on many other profilers.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-05-06 22:53:33 +01:00
Michael Brown b2c7b6a85e [intel] Push new RX descriptors in batches
Inside a virtual machine, writing the RX ring tail pointer may incur a
substantial overhead of processing inside the hypervisor.  Minimise
this overhead by writing the tail pointer once per batch of
descriptors, rather than once per descriptor.

Profiling under qemu-kvm (version 1.6.2) shows that this reduces the
amount of time taken to refill the RX descriptor ring by around 90%.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-04-27 23:14:48 +01:00
Michael Brown 8a3dcefc0c [intel] Profile common virtual machine operations
Operations which are negligible on physical hardware (such as issuing
a posted write to the transmit ring tail register) may involve
substantial amounts of processing within the hypervisor if running in
a virtual machine.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-04-27 23:14:48 +01:00
Michael Brown 27884298a3 [intel] Avoid completely filling the TX descriptor ring
It is unclear from the datasheets whether or not the TX ring can be
completely filled (i.e. whether writing the tail value as equal to the
current head value will cause the ring to be treated as completely
full or completely empty).  It is very plausible that this edge case
could differ in behaviour between real hardware and the many
implementations of an emulated Intel NIC found in various virtual
machines.  Err on the side of caution and always leave at least one
ring entry empty.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-04-22 13:12:54 +01:00
Michael Brown ccb6e5c627 [realtek] Clear bit 24 of RCR
On an Asus Z87-K motherboard with an onboard 8168 NIC, booting into
Windows 7 and then warm rebooting into iPXE results in a broken RX
datapath: packets can be transmitted successfully but garbage is
received.  A cold reboot clears the problem.

A dump of the PHY registers reveals only one difference: in the
failure case the bits ADVERTISE_PAUSE_CAP and ADVERTISE_PAUSE_ASYM are
cleared.  Explicitly setting these bits does not fix the problem.

A dump of the MAC registers reveals a few differences, of which the
most obvious culprit is the undocumented bit 24 of the Receive
Configuration Register (RCR), which is set in the failure case.
Explicitly clearing this bit does fix the problem.

Reported-by: Sebastian Nielsen <ipxe@sebbe.eu>
Reported-by: Oliver Rath <rath@mglug.de>
Debugged-by: Sebastian Nielsen <ipxe@sebbe.eu>
Tested-by: Sebastian Nielsen <ipxe@sebbe.eu>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-03-20 15:54:25 +00:00
Michael Brown 87b59677ba [realtek] Add ability to dump all internal registers
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-03-20 12:36:14 +00:00
Michael Brown 145fc26ed5 [realtek] Dump all MII register contents when link status changes
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-03-10 12:22:23 +00:00
Michael Brown ac5c2e851b [realtek] Include link status register details in debug messages
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-03-04 16:30:06 +00:00
Michael Brown 3fa7a3b136 [intel] Add some missing PCI IDs
Tested-by: Philipp Hagen <Philipp.Hagen@she.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-01-29 16:43:39 +00:00
Michael Brown 22001cb206 [settings] Explicitly separate the concept of a completed fetched setting
The fetch_setting() family of functions may currently modify the
definition of the specified setting (e.g. to add missing type
information).  Clean up this interface by requiring callers to provide
an explicit buffer to contain the completed definition of the fetched
setting, if required.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-12-05 00:37:02 +00:00
lolipop 0780bccb68 [intel] Add Intel I217 Gigabit Ethernet PCI ID
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-10-23 12:03:58 +01:00
Michael Brown 8a2dc7a588 [linux] Apply MAC address prior to registering network device
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-09-03 02:02:58 +01:00
Michael Brown 0b65c8cad6 [netdevice] Add method for generating EUI-64 address from link-layer address
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-09-03 01:24:15 +01:00
Michael Brown ae0124cd40 [linux] Give tap devices a name and bus type
Give tap devices a meaningful name, and avoid segmentation faults when
attempting to retrieve ${net0/bustype} by assigning a new bus type for
tap devices.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-08-27 16:39:43 +01:00
Thomas Miletich 6d72b498c2 [3c90x] Fix High-MTU packet reception
Prevent the card from flagging packets of 1518 bytes length as
overlength.

This fixes the High-MTU loopback test.

Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-08-20 14:38:33 +01:00
Thomas Miletich e5f6471525 [3c90x] Don't round up transmit packet length
The 3c90x B and C revisions support rounding up the packet length to a
specific boundary.  Disable this feature to avoid overlength packets.

This fixes the loopback test.

Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-08-20 14:37:05 +01:00
Thomas Miletich b324a9c243 [3c90x] Stall upload engine before setting RX ring address
According to the 3c90x datasheet we have to stall the upload (receive)
engine before setting the receive ring address.

Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-08-20 14:34:53 +01:00
Michael Brown 6d910559b3 [pci] Add pci_find_next() to iterate over existent PCI devices
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-08-05 13:51:16 +01:00
Marin Hannache 9b93b669d1 [legal] Add missing FILE_LICENCE declarations
Signed-off-by: Marin Hannache <git@mareo.fr>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-07-15 13:41:46 +02:00
Michael Brown 918fb43743 [realtek] Allow extra space in RX buffers
Some hardware (observed with an onboard RTL8168) will erroneously
report a buffer overflow error if the received packet exactly fills
the receive buffer.

Fix by adding an extra four bytes of padding to each receive buffer.

Debugged-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-07-15 12:19:37 +02:00
Adrian Jamróz 4fabc0012a [velocity] Rewrite VIA Velocity driver
Signed-off-by: Adrian Jamróz <adrian.jamroz@gmail.com>
Modified-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-07-15 11:25:51 +02:00
Michael Brown 3aafe5fc54 [realtek] Report RX error detail in debug messages
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-07-15 00:38:43 +02:00
Marin Hannache 6ad05aa319 [legal] Add FILE_LICENCE for ath9k driver headers
Signed-off-by: Marin Hannache <git@mareo.fr>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-07-14 23:47:42 +02:00
Michael Brown 18521a170c [intel] Incorporate ring producer and consumer counters in diagnostics
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-07-14 23:27:37 +02:00
Adrian Jamróz ad4f58d410 [rhine] Rewrite VIA Rhine driver
Replace the old via-rhine driver with a new version using the iPXE
API.

Includes fixes by Thomas Miletich for:

  - MMIO access
  - Link detection
  - RX completion in RX overflow case
  - Reset and EEPROM reloading
  - CRC stripping
  - Missing cpu_to_le32() calls
  - Missing memory barriers

Signed-off-by: Adrian Jamróz <adrian.jamroz@gmail.com>
Modified-by: Thomas Miletich <thomas.miletich@gmail.com>
Tested-by: Thomas Miletich <thomas.miletich@gmail.com>
Tested-by: Robin Smidsrød <robin@smidsrod.no>
Modified-by: Michael Brown <mcb30@ipxe.org>
Tested-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-07-14 18:09:01 +02:00
Michael Brown dbfa13ff2c [settings] Expose PCI configuration space via settings mechanism
Allow values to be read from PCI configuration space using the syntax

  ${pci/<busdevfn>.<offset>.<length>}

where <busdevfn> is the bus:dev.fn address of the PCI device
(expressed as a single integer, as returned by ${net0/busloc}),
<offset> is the offset within PCI configuration space, and <length> is
the length within PCI configuration space.

Values are returned in reverse byte order, since PCI configuration
space is little-endian by definition.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-07-13 12:46:18 +02:00
Michael Brown 5d3d62d8d7 [realtek] Fix reopening of legacy-mode 8139 NIC
realtek_destroy_ring() currently does nothing if the card is operating
in legacy (pre-RTL8139C+) mode.  In particular, the producer and
consumer counters are incorrectly left holding their current values.
Virtual hardware (e.g. the emulated RTL8139 in qemu and similar VMs)
is tolerant of this behaviour, but real hardware will fail to transmit
if the descriptors are not used in the correct order.

Fix by resetting the producer and consumer counters in
realtek_destroy_ring() even if the card is operating in legacy mode.

Reported-by: Gelip <mrgelip@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-05-26 18:31:46 +01:00
Michael Brown 15d2f947f5 [settings] Eliminate settings "tag magic"
Create an explicit concept of "settings scope" and eliminate the magic
values used for numerical setting tags.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-05-01 19:52:12 +01:00
Michael Brown b4ec6a6a68 [realtek] Defer packets when no transmit descriptors are available
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-05-01 14:07:51 +01:00
Michael Brown 9b1ec3132f [realtek] Ensure EEPROM writes reach chip before starting udelay()
On some systems, it appears to be possible for writes to the EEPROM
registers to be delayed for long enough that the EEPROM's setup and
hold times are violated, resulting in invalid data being read from the
EEPROM.

Fix by inserting a PCI read cycle immediately after writes to
RTL_9346CR, to ensure that the write has completed before starting the
udelay() used to time the SPI bus transitions.

Reported-by: Gelip <mrgelip@gmail.com>
Tested-by: Gelip <mrgelip@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-05-01 09:21:56 +01:00
Michael Brown 592755eccf [realtek] Allow reaction time between writing RTL_CAPR and reading RTL_CR
Some older RTL8139 chips seem to not immediately update the
RTL_CR.BUFE bit in response to a write to RTL_CAPR.  This results in
iPXE seeing a spurious zero-length received packet, and thereafter
being out of sync with the hardware's RX ring offset.

Fix by inserting an extra PCI read cycle after writing to RTL_CAPR, to
give the chip time to react before we next read RTL_CR.

Reported-by: Gelip <mrgelip@gmail.com>
Tested-by: Gelip <mrgelip@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-04-30 13:42:12 +01:00
Michael Brown d90fc3156c [realtek] Use ID word to detect EEPROM presence
Some onboard RTL8169 NICs seem to leave the EEPROM pins disconnected.
The existing is_valid_ether_addr() test will not necessarily catch
this, since it expects a missing EEPROM to show up as a MAC address of
00:00:00:00:00:00 or ff:ff:ff:ff:ff:ff.  When the EEPROM pins are
floating the MAC address may read as e.g. 00:00:00:00:0f:00, which
will not be detected as invalid.

Check the ID word in the first two bytes of the EEPROM (which should
have the value 0x8129 for all RTL8139 and RTL8169 chips), and use this
to determine whether or not an EEPROM is present.

Reported-by: Carl Karsten <carl@nextdayvideo.com>
Tested-by: Carl Karsten <carl@nextdayvideo.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-04-28 18:59:09 +01:00
Michael Brown 4678864ce6 [build] Fix dubious uses of bitwise operators
Detected by sparse.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-04-28 17:31:23 +01:00
Michael Brown b9663b8049 [build] Fix uses of literal 0 as a NULL pointer
Detected using sparse.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-04-28 17:13:44 +01:00
Michael Brown 2e54c4b52e [realtek] Print bad MAC address in debug message when inferring no EEPROM
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-04-27 21:24:10 +01:00
Michael Brown 54409583e2 [efi] Perform meaningful error code conversions
Exploit the redefinition of iPXE error codes to include a "platform
error code" to allow for meaningful conversion of EFI_STATUS values to
iPXE errors and vice versa.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-04-19 13:34:19 +01:00
Michael Brown e42bc3aa37 [libc] Use __einfo() tuple as first argument to EUNIQ()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-04-19 00:45:13 +01:00
Michael Brown cdca99f068 [intel] Add intelx driver for Intel 10 Gigabit Ethernet NICs
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-04-18 23:56:06 +01:00
Michael Brown 1dd4e51063 [intel] Expose functionality to be shared with intelx driver
The Intel 10 Gigabit NICs have a datapath that is almost
register-compatible with the Intel 1 Gigabit NICs.  Expose common
functionality to avoid duplication of code in the new "intelx" driver.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-04-18 23:56:05 +01:00
Michael Brown c2ba57e517 [intel] Remove hardcoded offsets for descriptor ring registers
The Intel 10 Gigabit NICs use the same simplified (aka "legacy")
descriptor format and the same layout for descriptor register blocks
as the Intel 1 Gigabit NICs.  The offsets of the descriptor register
blocks are not the same.

Simplify reuse of the existing code by removing all hardcoded offsets
for registers within descriptor register blocks, and ensuring that all
offsets are calculated using the descriptor register block base
address provided via intel_init_ring().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-04-18 23:56:05 +01:00
Michael Brown 8a49782eeb [prism2] Use standard type names
Avoid using UINT16 and similar typedefs, which are non-standard in the
iPXE codebase and generate conflicts when trying to include any of the
EFI headers.

Also fix trailing whitespace in the affected files, to prevent
complaints from git.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-03-27 15:16:52 +00:00
Michael Brown dab7910beb [igbvf] Remove conflicting macro definitions
Remove macros which aren't used anywhere in the driver, and which
conflict with macros of the same name used in the EFI headers.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-03-25 22:24:26 +00:00
Michael Brown b2c9730da7 [cs89x0] Remove conflicting macro definitions
Remove macros which aren't used anywhere in the driver, and which
conflict with macros of the same name used in the EFI headers.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-03-25 22:23:04 +00:00
Kevin Tran e27803e40f [tg3] Fix various tg3 issues
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-03-04 21:56:24 +00:00
Stefan Hajnoczi 7d64abbc5d [iscsi] Include 802.1Q VLAN identifier in iBFT
The iBFT NIC section has a VLAN field which must be filled in so that
iSCSI booting works over VLANs.

Unfortunately it is unclear from the IBM specification linked in
ibft.c whether the VLAN field is just the 802.1Q VLAN Identifier or
the full 802.1Q TCI.  For now just fill in the VID, the Priority Code
Point and Drop Eligible Indicator could be set in the future if it
turns out they should be present too.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-03-01 16:22:23 +00:00
Jens Rottmann 3c29c8ecc1 [intel] Add Intel I210 Gigabit Ethernet PCI ID
Signed-off-by: Jens Rottmann <JRottmann@LiPPERTembedded.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-02-20 12:04:10 +00:00
Stefan Weil 3fcb8cf8dc [src] Fix spelling in comments, debug messages and local variable names
Fixes in comments and debug messages:

  existance -> existence
  unecessary -> unnecessary
  occured -> occurred
  decriptor -> descriptor
  neccessary -> necessary
  addres, adress -> address
  initilize -> initialize
  sucessfully -> successfully
  paramter -> parameter
  acess -> access
  upto -> up to
  likelyhood ->likelihood
  thru -> through
  substracting -> subtracting
  lenght -> length
  isnt -> isn't
  interupt -> interrupt
  publically -> publicly (this one was not wrong, but unusual)
  recieve -> receive
  accessable -> accessible
  seperately -> separately
  pacet -> packet
  controled -> controlled
  dectect -> detect
  indicies -> indices
  extremly -> extremely
  boundry -> boundary
  usefull -> useful
  unuseable -> unusable
  auxilliary -> auxiliary
  embeded -> embedded
  enviroment -> environment
  sturcture -> structure
  complier -> compiler
  constructes -> constructs
  supress -> suppress
  intruduced -> introduced
  compatability -> compatibility
  verfication -> verification
  ths -> the
  reponse -> response

Fixes in local variable names:

  retreive -> retrieve

Most of these fixes were made using codespell.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-01-03 15:18:48 +00:00
Michael Brown 6586e03fba [forcedeth] Increase TX ring size to prevent dropped packets
Commit 947976d ("[netdevice] Do not force a poll on net_tx()")
requires network devices to have TX rings that are sufficiently large
to allow a transmitted response to all packets received during a
single poll.

Reported-by: Robin Smidsrød <robin@smidsrod.no>
Tested-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-10-29 10:14:00 +00:00
Michael Brown 0c5e3df6d9 [intel] Poll RX queue if hardware reports RX overflow
The Intel NIC emulation in some versions of VMware seems to suffer
from a flaw whereby the Interrupt Cause Register (ICR) fails to assert
the usual "packet received" bit (ICR.RXT0) if a receive overflow
(ICR.RXO) has also occurred.

Work around this flaw by polling for completed descriptors whenever
either ICR.RXT0 or ICR.RXO is asserted.

Reported-by: Miroslav Halas <miroslav.halas@bankofamerica.com>
Debugged-by: Miroslav Halas <miroslav.halas@bankofamerica.com>
Tested-by: Miroslav Halas <miroslav.halas@bankofamerica.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-10-28 18:53:23 +00:00
Michael Brown c4ee23e7c6 [hermon] Use PCI VPD for non-volatile option storage
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-10-25 08:24:00 -07:00
Michael Brown dace457baf [intel] Report receive overruns via network device errors
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-10-24 11:21:34 -07:00
Michael Brown 03f0c23f8b [ipoib] Expose Ethernet-compatible eIPoIB link-layer addresses and headers
Almost all clients of the raw-packet interfaces (UNDI and SNP) can
handle only Ethernet link layers.  Expose an Ethernet-compatible link
layer to local clients, while remaining compatible with IPoIB on the
wire.  This requires manipulation of ARP (but not DHCP) packets within
the IPoIB driver.

This is ugly, but it's the only viable way to allow IPoIB devices to
be driven via the raw-packet interfaces.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-08-31 21:22:59 +01:00
Michael Brown f54a61e434 [infiniband] Include destination address vector in ib_complete_recv()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-08-31 21:22:58 +01:00
Michael Brown cbe41cb31b [infiniband] Use explicit "source" and "dest" address vector parameter names
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-08-31 21:22:58 +01:00
Michael Brown f747fac3e1 [infiniband] Allow queue pairs to have a custom allocator for receive iobufs
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-08-31 21:22:57 +01:00
Michael Brown 70618161ad [realtek] Force EEPROM CS low before disabling EEPROM access mode
Some RTL8169 cards seem to drive the EEPROM CS line high (i.e. active)
when 9346CR.EEM is set to "normal operating mode", with the result
that the CS line is never deasserted.  The symptom of this is that the
first read from the EEPROM will work, while all subsequent reads will
return garbage data.

Reported-by: Thomas Miletich <thomas.miletich@gmail.com>
Debugged-by: Thomas Miletich <thomas.miletich@gmail.com>
Tested-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-08-24 17:26:11 +01:00
Michael Brown d1949f2737 [bitbash] Add optional open() and close() methods for bit-bashing interfaces
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-08-24 17:26:10 +01:00
Michael Brown 5676abead2 [realtek] Forcibly enable advertisement of 1000Mbps speeds
Some RTL8169 cards (observed with an RTL8169SC) power up advertising
only 100Mbps, despite being capable of 1000Mbps.  Forcibly enable
advertisement of 1000Mbps on any RTL8169-like card.

This change relies on the assumption that the CTRL1000 register will
not exist on 100Mbps-only RTL8169 cards such as the RTL8101.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-08-23 22:44:20 +01:00
Michael Brown 6e50e7950f [mii] Add separate mii_restart() function
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-08-23 21:25:51 +01:00
Michael Brown 0dacd54174 [realtek] Enable DAC only when built as a 64-bit binary
Some RTL8169 cards (observed with an RTL8169SC) crash and burn if DAC
is enabled, even if only 32-bit addresses are used.  Observed
behaviour includes system lockups and repeated transmission of garbage
data onto the wire.

This seems to be a known problem.  The Linux r8169 driver disables DAC
by default and provides a "use_dac" module parameter.

There appears to be no known test for determining whether or not DAC
will work.  As a workaround, enable DAC only if we are built as as
64-bit binary.  This at least eliminates the problem in the common
case of a 32-bit build, which will never use 64-bit addresses anyway.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-08-23 15:15:43 +01:00
Michael Brown 0e61beb26f [realtek] Use read-modify-write to check for C+ Command register
Some bits in the C+ Command register are always one.  Testing for the
presence of the register must allow for this.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-08-23 15:15:42 +01:00
Michael Brown 77afdc5643 [realtek] Use explicit value for TCR.MXDMA
Some RTL8169 cards (observed with an RTL8169SC) power up with
TCR.MXDMA set to 16 bytes.  While this does not prevent proper
operation, it almost certainly degrades performance.

Fix by explicitly setting TCR.MXDMA to "unlimited".

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-08-23 15:15:42 +01:00
Michael Brown 5d05220ee0 [realtek] Use explicit values for RCR.RXFTH and RCR.MXDMA
Some RTL8169 cards (observed with an RTL8169SC) power up with invalid
values in RCR.RXFTH and RCR.MXDMA, causing receive DMA to fail.  Fix
by setting explicit values for both fields.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-08-23 15:15:35 +01:00
Michael Brown b0ba892333 [realtek] Always set high dword of ring address registers
Some RTL8169 cards (observed with an RTL8169SC) power up with garbage
values in the ring address registers, and do not clear the registers
on reset.

Fix by always setting the high dword of the ring address registers.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-08-23 13:35:54 +01:00
Kevin Tran a05871d89a [tg3] Fix driver for BCM5719, BCM5720, BCM5764M, BCM57762
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-08-20 18:50:35 +01:00
Thomas Miletich ced1493c02 [tg3] Fix excessive DMA alignment.
Change the DMA alignment from 4096 bytes to 16 bytes, to conserve
available DMA memory.  The hardware doesn't have any specific
alignment requirements.

Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-24 15:50:11 +01:00
Alexey 8f17955c03 [epic100] Fix wrong field used as rx packet length
Datasheet pp. 41-42 defines 'rx packet length' as upper word of
'status' dword field of the receive descriptor table.

  http://www.smsc.com/media/Downloads_Archive/discontinued/83c171.pdf

Tested on SMC EtherPower II.

Signed-off-by: Alexey Smazhenko <darkover@corbina.com.ua>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-23 13:22:43 +01:00
Michael Brown c3b4860ce3 [legal] Update FSF mailing address in GPL licence texts
Suggested-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-20 19:55:45 +01:00
Michael Brown 1ac62b914e [qib7322] Fix compiler warning on gcc 4.7
Originally-fixed-by: Christian Hesse <list@eworm.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-20 19:18:50 +01:00
Michael Brown a87c0c4f0f [isa] Avoid spurious compiler warning on gcc 4.7
gcc 4.7 produces a spurious warning about an array subscript being out
of bounds.  Use a pointer dereference instead of an array lookup to
inhibit this spurious warning.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-20 18:32:58 +01:00
Michael Brown d32aac88ef [skel] Add missing iounmap()
Reported-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-19 17:13:52 +01:00
Michael Brown 76b4323b4d [myson] Add missing iounmap()
Reported-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-19 17:12:41 +01:00
Michael Brown 93f1d69a77 [natsemi] Add missing iounmap()
Reported-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-19 17:12:13 +01:00
Michael Brown e982a7e3c4 [realtek] Add missing iounmap()
Reported-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-19 17:11:40 +01:00
Michael Brown ac8107854f [intel] Add missing iounmap()
Reported-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-19 17:10:28 +01:00
Michael Brown 73ba154124 [b44] Eliminate call to get_memmap()
get_memmap() is not available under all runtime environments.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-17 21:22:02 +01:00
Michael Brown 9f0b2d25a8 [intel] Explicitly enable descriptor queues
On i350 the datasheet contradicts itself in stating that the default
value of RXDCTL.ENABLE for queue zero is both set (according to the
"Receive Initialization" section) and unset (according to the "Receive
Descriptor Control - RXDCTL" section).  Empirical evidence suggests
that the default value is unset.

Explicitly enable both transmit and receive queues to avoid any
ambiguity.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-10 11:21:22 +01:00
Michael Brown 8391ff3ee0 [intel] Refill receive ring only after enabling receiver
On 82576 (and probably others), the datasheet states that "the tail
register of the queue (RDT[n]) should not be bumped until the queue is
enabled".  There is some confusion over exactly what constitutes
"enabled": the initialisation blurb says that we should "poll the
RXDCTL register until the ENABLE bit is set", while the description
for the RXDCTL register says that the ENABLE bit is set by default
(for queue zero).  Empirical evidence suggests that the ENABLE bit
reads as set immediately after writing to RCTL.EN, and so polling is
not necessary.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-10 09:32:58 +01:00
Michael Brown cc3e9f068b [realtek] Add missing cpu_to_le16()
Reported-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-06-27 19:15:16 +01:00
Valentine Barshak edcca8e91b [sky2] Fix invalid memory access
Use hw pointer in PCI driver data as expected by sky2_remove().

Signed-off-by: Valentine Barshak <gvaxon@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-06-27 15:44:35 +01:00
Michael Brown f8bb40b002 [realtek] Support RTL8139 cards within generic Realtek driver
RTL8139C+ cards use essentially the same datapath as RTL8169, which is
zerocopy and 64-bit capable.  Older RTL8139 cards use a single receive
ring buffer rather than a descriptor ring, but still share substantial
amounts of functionality with RTL8169.

Include support for RTL8139 cards within the generic Realtek driver,
since there is no way to differentiate between RTL8139 and RTL8139C+
cards based on the PCI IDs alone.

Many thanks to all the people who worked on the rtl8139 driver over
the years.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-04-28 19:10:41 +01:00
Michael Brown 1fe27a3e0e [myson] Replace driver for Myson Technology NICs
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-04-27 11:46:58 +01:00
Michael Brown 35e09c1a7c [natsemi] Fix test for addresses below 4GB
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-04-27 01:22:02 +01:00
Michael Brown 2c1e8d2cb1 [natsemi] Replace driver for National Semicondutor NICs
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-04-26 14:17:24 +01:00
Michael Brown 945e428137 [intel] Replace driver for Intel Gigabit NICs
Tested-by: Robin Smidsrød <robin@smidsrod.no>
Tested-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-04-23 23:29:18 +01:00
Michael Brown 5b18489685 [realtek] Update link state when device is opened
The link state is currently set at probe time, and updated only when
the device is polled.  This results in the user seeing a misleading
stale "Link: down" message, if autonegotiation did not complete within
the short timespan of the probe routine.

Fix by updating the link state when the device is opened, so that the
message that ends up being displayed to the user reflects the real
link state at device open time.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-04-23 10:54:14 +01:00
Michael Brown 38d2ad8676 [skel] Add skeleton network driver
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-04-21 08:05:24 +01:00
Michael Brown 2a0154db5b [realtek] Replace driver for Realtek Gigabit NICs
Tested-by: Thomas Miletich <thomas.miletich@gmail.com>
Debugged-by: Thomas Miletich <thomas.miletich@gmail.com>
Tested-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-04-18 16:33:36 +01:00
Michael Brown 9b2aabe534 [mii] Add generic MII reset function
iPXE provides no support for manually configuring the link speed.
Provide a generic routine which should be able to reset any MII/GMII
PHY and enable autonegotiation.

Prototyped-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-04-18 16:33:18 +01:00
Michael Brown d27e6d6efd [mii] Synchronise constants with current Linux include/linux/mii.h
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-04-18 16:32:57 +01:00
Erik Jacobson 96a8c70a0c [igbvf] Add i350 virtual function support
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-04-10 13:53:24 +01:00
Daniel Hokka Zakrisson 0e4a5ca4c7 [e1000e] Basic 82579 support
Add support for 82579-based chips such as those found on Sandy Bridge
motherboards.  Based on d3738bb8203acf8552c3ec8b3447133fc0938ddd in
Linux.

Signed-off-by: Daniel Hokka Zakrisson <daniel@hozac.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-04-10 13:47:19 +01:00
Michael Brown a6d49c17c9 [console] Move putchar() and getchar() declarations to stdio.h
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-03-26 14:43:52 +01:00
Olaf Hering 0e81ff2297 [myri10ge] Fix compilation error in myri10ge_command() with gcc 4.7
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-03-16 16:43:55 +00:00
1d 2k 321883014b [eepro100] Add PCI ID 8086:10fe
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-03-14 00:03:19 +00:00
Michael Brown a0e559d1f3 [forcedeth] Use standard random() function
It seems unlikely that a network card driver requires
cryptographically secure random numbers.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-03-13 15:58:04 +00:00
Michael Brown 74b1e706a8 [ath9k] Fix compilation on older gcc versions
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-03-09 17:09:26 +00:00
Jarrod Johnson dc70229f70 [snpnet] Give up entirely on the transmit queue
Practically speaking, it seems the convention is to only have one
packet pending and not rely upon any mechanism to associate returned
txbuf with txqueue.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-02-12 13:57:07 +00:00
Thomas Miletich 1476d6f47c [tg3] Remove tg3_calc_dma_bndry()
This function never did much in this driver anyway, and after commit
b5ed30b2 ("[tg3] Fix compilation on newer gcc versions") it became
apparent that its remaining functionality could be easily moved to
tg3_test_dma().

Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-02-10 13:34:23 +00:00
Christian Hesse b5ed30b2d0 [tg3] Fix compilation on newer gcc versions
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-02-09 16:00:05 +00:00
Thomas Miletich f6840ba83e [tg3] New tg3 driver
Replace the old Etherboot tg3 driver with a more up-to-date driver
using the iPXE API.

Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-01-30 23:10:53 +00:00
Michael Brown 55f6c88a27 [vmxnet3] Add VMware vmxnet3 driver
Reviewed-by: Pete Holland <pholland27@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-01-06 23:49:04 +00:00
Michael Brown f289391134 [e1000e] Strip the Ethernet CRC from received packets
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-12-08 00:29:33 +00:00
Michael Brown d5e273e5c2 [e1000] Request notification of TX completions
The RS bit is used to instruct the NIC to update the TX descriptor
status byte.  The RPS bit is used to instruct the NIC to defer this
update until after the packet has been transmitted on the wire (rather
than merely read into the transmit FIFO).

The driver currently sets RPS but not RS.  Some e1000 models seem to
interpret this as implying that the status byte should be updated;
some don't.  On the ones that don't, we never see any TX completions
and so rapidly run out of TX buffers.

Fix by setting the RS bit in the TX descriptor.  (We don't care about
when the packet reaches the wire, so don't bother setting the RPS
bit.)

Reported-by: Miroslav Halas <miroslav.halas@bankofamerica.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-12-06 01:50:28 +00:00
Michael Brown 8ef5f6065d [arbel] Ensure hardware is quiescent when no interfaces are open
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-11-15 23:53:26 +00:00
Michael Brown 6c73a8b51d [arbel] Reorder code in preparation for quiescing patch
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-11-15 04:13:29 +00:00
Michael Brown 6dd4ac77e5 [hermon] Ensure hardware is quiescent when no interfaces are open
WinPE has been observed to call PXENV_UNDI_SHUTDOWN but not
PXENV_STOP_UNDI.  This means that Hermon hardware is left partially
active (firmware running and one event queue mapped) when WinPE starts
up, which can cause a Blue Screen of Death.

Fix by ensuring that the hardware is left quiescent (with the firmware
stopped) when no interfaces are open.

Reported-by: Itay Gazit <itayg@mellanox.co.il>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-11-15 04:12:07 +00:00
Michael Brown a02f9e0ca5 [hermon] Reorder code in preparation for quiescing patch
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-11-15 03:59:10 +00:00
Michael Brown 8ccaec5adf [ipoib] Report packets as broadcast when ambiguous
Avoid spurious matches for peer key 0 against empty peer cache
entries, and set the LL_MULTICAST flag in addition to LL_BROADCAST.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-11-15 03:59:09 +00:00
Julian Pidancet 91dd64ad25 [rtl8139] Perform only 8-bit ioport access on the ChipCmd register
The ChipCmd register is only an 8-bit register.  The 16-bit access
used by iPXE was causing an issue when used with qemu emulated rtl8139
device which was improperly aligning IOs.

Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-11-14 22:23:06 +00:00
Michael Brown 7a84cc593a [arbel] Add (not-yet-functional) support for RC queue pairs
Arbel seems to crash the system as soon as the first send WQE
completes on an RC queue pair.  (NOPs complete successfully, so this
is a problem specific to the work queue rather than the completion
queue.)  The cause of this problem has remained unknown for over a
year.

Check in the non-functioning code to avoid bit-rot, and in the hope
that someone will find the fix.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-10-24 15:29:38 +01:00
Scott K Logan aaf7a35207 [ath9k] Add ath9k driver
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-10-14 15:34:52 +01:00
Michael Brown a667bf044a [netdevice] Allow link layer to report broadcast/multicast packets via pull()
Allow the link layer to directly report whether or not a packet is
multicast or broadcast at the time of calling pull(), rather than
relying on heuristics to determine this at a later stage.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-07-15 18:48:46 +01:00
Thomas Miletich 5d23fb1bb4 [igb] Remove __BIG_ENDIAN conditional
Reported-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-07-15 16:44:57 +01:00
Michael Brown 5c9c39e299 [scsi] Eliminate polling while waiting for window to open
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-06-28 14:45:12 +01:00
Michael Brown e01ec74601 [process] Pass containing object pointer to process step() methods
Give the step() method a pointer to the containing object, rather than
a pointer to the process.  This is consistent with the operation of
interface methods, and allows a single function to serve as both an
interface method and a process step() method.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-06-28 14:45:08 +01:00
Michael Brown b6cad3c0eb [forcedeth] Ensure that IRQ line is deasserted when disabling interrupts
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-05-04 19:22:52 +01:00
Michael Brown c738a635cb [hermon] Remove temporary workaround for missing BOFM mport support
This reverts commit 15c1200 ("[hermon] Work around missing mport
support in current BOFM implementations").

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-05-04 17:00:05 +01:00
Michael Brown 15c120041d [hermon] Work around missing mport support in current BOFM implementations
Current BOFM versions are unable to create entries with mport>1, which
means that only the port 1 MAC address can be explicitly specified.

Work around this by using the provided MAC address as a base address
for all subsequent ports.  For example, if BOFM assigns the address

   00:1A:64:76:00:09 for port 1

then we will assign the addresses

   00:1A:64:76:00:09 for port 1
   00:1A:64:76:00:0a for port 2

Future BOFM versions that may correctly support mport will work with
this scheme without modification provided that the BOFM entries are
created in increasing order of mport.  Since BOFM tools tend to
generate entries in increasing order (of slot, port, etc), this is not
an unreasonable compromise.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-04-08 01:11:08 +01:00
Michael Brown 08f122ae42 [arbel] Stop firmware only once on shutdown
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-04-08 00:51:02 +01:00
Michael Brown 935df352e6 [hermon] Stop firmware only once on shutdown
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-04-08 00:50:49 +01:00
Michael Brown fc7e2be617 [device] Make driver name a generic device property
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-04-07 23:09:19 +01:00
Michael Brown c3e2086848 [forcedeth] Never change the NVREG_TRANSMITPOLL_MAC_ADDR_REV flag
iPXE operates the forcedeth NIC in promiscuous mode, and never changes
the unicast MAC address filter registers.  We should not therefore set
the flag indicating (to other drivers loaded later) that the MAC
address order has already been corrected.

Reported-by: Tal Aloni <tal.aloni.il@gmail.com>
Tested-by: Tal Aloni <tal.aloni.il@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-30 00:34:09 +01:00
Michael Brown 797c29adda [forcedeth] Remove software unicast MAC address filter
The forcedeth driver currently implements unicast MAC address
filtering in software.  This is almost invariably the wrong thing to
do (since the network stack must already be able to cope with unwanted
packets) and it breaks FCoE (which requires the card to operate in
promiscuous mode).

Also, the implementation is buggy: is_local_ether_addr() is used to
check for a locally-assigned Ethernet address (not to check for a
unicast address), and the current link-layer address is in
netdev->ll_addr, not netdev->hw_addr.

Fix by removing this code.

Reported-by: Tal Aloni <tal.aloni.il@gmail.com>
Tested-by: Tal Aloni <tal.aloni.il@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-29 21:57:31 +01:00
Thomas Miletich db156f5be6 [forcedeth] Avoid unused-but-set variable warning in gcc 4.6
Avoid unused-but-set variable warning in gcc 4.6 which was introduced
by commit 9215b7f ("[forcedeth] Clear the MII link status register on
link status changes").

Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-28 13:57:42 +01:00