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

930 Commits

Author SHA1 Message Date
Michael Brown e8c636fe75 [hermon] Add missing __attribute__ (( packed ))
On 64-bit builds, MLX_DECLARE_STRUCT() produces a structure that is
always a multiple of 64 bits long, causing the HCR structure to be
over-length by one dword.  This in turn causes hermon_cmd() to write
beyond the end of the HCR, which causes commands to fail.

Reported-by: Itay Gazit <itayg@mellanox.co.il>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-17 01:25:10 +00:00
Itay Gazit 0e878b30fe [hermon] Force link speed to SDR
SDR link comes up much faster than other speeds.

Signed-off-by: Itay Gazit <itaygazit@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-17 01:25:10 +00:00
Itay Gazit 1b84a80442 [hermon] Use circular event queue
Avoid memory leak of untreated events by having circular event queue
operation.

Signed-off-by: Itay Gazit <itaygazit@gmail.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-17 01:25:09 +00:00
Itay Gazit 399be05865 [hermon] Update PRM file with latest changes
Signed-off-by: Itay Gazit <itaygazit@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-17 01:25:09 +00:00
Itay Gazit 56b6613e94 [hermon] Fix hermon_cmd_sense_port() to use inline output
Signed-off-by: Itay Gazit <itaygazit@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-17 01:25:08 +00:00
Thomas Miletich 72d387eac1 [3c90x] Clean up reset code
Remove duplicate hardware resets, remove network interface logic
reset.

This also fixes a bug where some 3c905C variants would return bogus
EEPROM values because of a too short delay after the network reset.

Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Reported-by: Peter Huewe <peterhuewe@gmx.de>
Tested-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-08 19:10:55 +00:00
Thomas Miletich db331b535a [3c90x] More fine-grained debugging levels
DBG is reserved for errors and important warnings only.
DBG2 for additional information, e.g. "received packet".
DBGP is used to print the name of every function as it is called.

Signed-off-by: Thomas Miletich<thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-02-08 19:10:45 +00:00
Michael Brown 962cada830 [init] Remove concept of "shutdown exit flags"
Remove the concept of shutdown exit flags, and replace it with a
counter used to keep track of exposed interfaces that require devices
to remain active.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-27 20:40:26 +00:00
Masroor Vettuparambil aa69bf84d2 [vxge] Add support for new function mode "multi-function 8 Direct IO"
Support a new function mode "multi-function 8 Direct IO" which is used
in ESX Direct I/O configuration.

Update driver version to 3.5.0.1

Signed-off-by: Masroor Vettuparambil <masroor.vettuparambil@exar.com>
Signed-off-by: Sivakumar Subramani <sivakumar.subramani@exar.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-27 11:17:18 +00:00
Michael Brown 785335996f [hermon] Indicate that device does not support interrupts
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-25 14:25:09 +00:00
Michael Brown 3a9f0e0f84 [infiniband] Indicate that device does not support interrupts
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-25 14:24:53 +00:00
Michael Brown 7bf37147b3 [pci] Auto-resize VPD fields used for non-volatile storage
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-19 13:52:56 +00:00
Michael Brown e67c79b856 [pci] Add ability to resize a VPD field
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-19 13:52:55 +00:00
Michael Brown 267ef31791 [pci] Allow pci_vpd_init() return status to be ignored
Most xxx_init() functions are void functions with no failure cases.
Allow pci_vpd_init() to be used in the same way.  (Subsequent calls to
pci_vpd_read() etc. will fail if pci_vpd_init() fails.)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-19 13:52:55 +00:00
Michael Brown 17d28f4877 [nvo] Allow resizing of non-volatile stored option blocks
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-19 13:52:48 +00:00
Michael Brown 1651d4f6d7 [nvo] Remove the non-volatile options fragment list
Since its implementation several years ago, no driver has used a
fragment list containing more than a single fragment.  Simplify the
NVO core and the drivers that use it by removing the whole concept of
the fragment list, and using a simple (address,length) pair instead.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-11 21:24:40 +00:00
Michael Brown 8f8b55f187 [nvs] Allow for non-volatile storage devices without block boundaries
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-11 21:24:40 +00:00
Michael Brown dc462e8b3b [hermon] Fix incorrectly-padded sense_port structure
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-12-24 01:10:26 +00:00
Alex Williamson c080de1a60 [igbvf] Add igbvf driver
Driver for Intel 82576 based virtual functions, based on Intel source
code available at:

    http://sourceforge.net/projects/e1000  (igbvf-1.0.7)

Based on initial port from Eric Keller <ekeller@princeton.edu>.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-12-16 03:58:42 +00:00
Michael Brown 94cdad9c0e [iscsi] Include both DNS addresses in iBFT, if available
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-12-09 15:35:02 +00:00
Michael Brown 88b9b776cf [r8169] Disabling IRQs should not also acknowledge the IRQs
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-12-09 13:07:30 +00:00
Shao Miller 3b51710156 [legal] Add FILE_LICENCE macro to some GPL-v2-or-later files
Changes were made to files where the licence text within the files
themselves confirms that the files are GPL version 2 or later.

Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-12-03 23:38:15 +00:00
Michael Brown f14a5045d7 [hermon] Work around hardware stripping of VLAN tags
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-12-01 18:51:29 +00:00
Michael Brown 67b45186a5 [settings] Apply settings block name in register_settings()
Pass the settings block name as a parameter to register_settings(),
rather than defining it with settings_init() (and then possibly
changing it by directly manipulating settings->name).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-12-01 16:35:00 +00:00
Michael Brown b8f721123b [hermon] Fix inconsistent information in HERMON_SET_PORT_GENERAL_PARAM
pptx and pfctx should not be set together, nor should pprx and pfcrx.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-11-29 17:18:49 +00:00
Michael Brown aa1c59ccff [hermon] Enable priority flow control on the FCoE priority
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-11-27 20:38:35 +00:00
Michael Brown ce7b0efa87 [pci] Add a mechanism for using a PCI VPD field as an NVS device
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-11-25 00:00:38 +00:00
Michael Brown 69db6e7d8f [pci] Add support for reading and writing PCI Vital Product Data (VPD)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-11-24 23:58:27 +00:00
Michael Brown ef0376483c [pci] Standardise debug message format
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-11-24 16:59:46 +00:00
Michael Brown f122515515 [forcedeth] Exit poll() as early as possible if no work to do
Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-11-11 23:57:10 +00:00
Michael Brown 57bab0ae4a [scsi] Wait for a successful TEST UNIT READY command
Some SCSI targets (observed with an EMC CLARiiON Fibre Channel target)
will not respond to commands correctly until a TEST UNIT READY has
been issued.  In particular, a READ CAPACITY (10) command will return
with a success status, but no capacity data.

Fix by issuing a TEST UNIT READY command automatically, and delaying
further SCSI commands until the TEST UNIT READY has succeeded.

Reported-by: Hadar Hen Zion <hadarh@mellanox.co.il>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-10-19 19:10:02 +01:00
Michael Brown da222e6f3c [rtl8139] Operate in promiscuous mode
FCoE requires us to be able to receive unicast packets for multiple
addresses.  Support this by operating in promiscuous mode.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-10-07 19:21:21 +01:00
Michael Brown 29ad8a922b [infiniband] Include the SRP login rejection reason in the error number
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-22 20:05:39 +01:00
Michael Brown f8fa23b183 [ata] Add support for describing an ATA device using EDD
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-22 17:12:17 +01:00
Michael Brown 9e036d32ba [infiniband] Add support for identifying the underlying hardware device
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-22 17:11:29 +01:00
Michael Brown 5a981cff8e [hermon] Add support for dual-protocol devices
Originally-implemented-by: Itay Gazit <itaygazit@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-21 02:22:01 +01:00
Itay Gazit ed0ea7cfc2 [hermon] Add infrastructure for Ethernet devices
Add PRM structures to support Hermon Ethernet devices.

Signed-off-by: Itay Gazit <itaygazit@gmail.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-21 02:19:13 +01:00
Michael Brown f62c433d66 [hermon] Use SET_PORT to set port parameters
Unlike Arbel, port parameters must be applied via a separate call to
SET_PORT, rather than as parameters to INIT_PORT.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-21 02:15:24 +01:00
Michael Brown 26a50c3a11 [infiniband] Add the notion of an Ethernet queue pair type
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-21 02:12:06 +01:00
Michael Brown 0d6b1d98fa [hermon] Tidy up ICM allocations
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-19 00:04:26 +01:00
Michael Brown 92ced72080 [hermon] Minimise the number of VPM mapping operations
Mapping a single page at a time causes a several-second delay at
device initialisation time.  Reduce this by mapping multiple pages at
a time, using the largest block sizes possible given the alignment
constraints.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-18 23:20:50 +01:00
Michael Brown 8cd2b170b6 [arbel] Minimise the number of VPM mapping operations
Mapping a single page at a time causes a several-second delay at
device initialisation time.  Reduce this by mapping multiple pages at
a time, using the largest block sizes possible given the alignment
constraints.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-18 23:00:57 +01:00
Michael Brown 62115cf437 [arbel] Allocate only as much memory as is needed for firmware and ICM
Use individual page mappings rather than a single whole-region
mapping, to avoid the waste of memory that occurs due to the
constraint that each mapped block must be aligned on its own size.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-18 03:26:01 +01:00
Michael Brown d9aef1b50a [arbel] Synchronise changes with the Hermon driver
Backport some changes from the Hermon driver to the Arbel driver.
Specifically:

 o  Rename reserved_lkey to lkey

 o  Add arbel_rate() to calculate transmission rates

 o  Structure code to allow for addition of RC queue pairs

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-17 22:57:20 +01:00
Michael Brown 144a23a852 [arbel] Optimise ICM layout to reduce overall memory usage
Reduce the amount of ICM space required by choosing to order the
various allocations in approximately descending order of alignment
requirements.

This saves approximately 512kB of host memory.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-17 22:55:14 +01:00
Michael Brown d84e4e0575 [arbel] Perform ICM allocations according to the specification
The current method for ICM allocation exactly matches the addresses
chosen by the old Etherboot driver, but does not match the
specification.  Some ICM tables (notably the queue pair context table)
therefore end up incorrectly aligned.

Fix by performing allocations as per the specification.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-17 05:51:34 +01:00
Michael Brown f7a49e23e9 [arbel] Allow for multiple calls to ib_modify_qp()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-17 05:49:34 +01:00
Michael Brown a5909384a8 [arbel] Inform embedded SMA of partition key changes
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-17 05:47:34 +01:00
Michael Brown 767e27e06b [arbel] Improve debugging output and facilities
Improve the utility of debugging messages by including the relevant
port number, queue number (QPN, CQN, EQN), work queue entry (WQE)
number, and physical addresses wherever applicable.

Add arbel_dump_cqctx() for dumping a completion queue context and
arbel_dump_qpctx() for dumping a queue pair context.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-17 05:45:40 +01:00
Michael Brown 4cb157a3b7 [arbel] Randomise the high-order bits of queue pair numbers
This is a backport of commit 0b1222f ("[hermon] Randomise the
high-order bits of queue pair numbers") to the Arbel driver.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-17 05:43:47 +01:00
Michael Brown 40d7c70438 [arbel] Allow software GMA to receive packets destined for QP1
This is a backport of commit cd5a213 ("[hermon] Allow software GMA to
receive packets destined for QP1") to the Arbel driver.

This patch includes a correction to a bug in the autogenerated
hardware description header file.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-17 05:41:57 +01:00
Michael Brown 46f2580049 [arbel] Map all event types to our event queue
Only port state change events are currently mapped to our event queue,
since those are the only events we are prepared to handle.  This
ignores a potentially useful source of diagnostic information in the
case of unexpected failures.

Fix by mapping all events to the event queue; a build with debugging
enabled will therefore at least dump the raw content of the unexpected
events.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-17 05:38:13 +01:00
Michael Brown e4ed060983 [hermon] Map all event types to our event queue
Only port state change events are currently mapped to our event queue,
since those are the only events we are prepared to handle.  This
ignores a potentially useful source of diagnostic information in the
case of unexpected failures.

Fix by mapping all events to the event queue; a build with debugging
enabled will therefore at least dump the raw content of the unexpected
events.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-16 22:06:20 +01:00
Michael Brown 42cf4a720c [infiniband] Add node GUID as distinct from the first port GUID
iPXE currently uses the first port's port GUID as the node GUID,
rather than using the (possibly distinct) real node GUID.  This can
confuse opensm during the handover to a loaded OS: it thinks the port
already belongs to a different node and so discards our port
information with a warning message about duplicate ports.  Everything
is picked up correctly on the second subnet sweep, after opensm has
established that the "old" node no longer exists, but this can delay
link-up unnecessarily by several seconds.

Fix by using the real node GUID.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-16 03:30:45 +01:00
Michael Brown 3e8e2773de [arbel] Poll for link state changes while DOWN
No event is generated upon reaching INIT, so we must poll separately
for link state changes while we remain DOWN.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-16 03:30:45 +01:00
Michael Brown 14a76b5927 [hermon] Poll for link state changes while DOWN
No event is generated upon reaching INIT, so we must poll separately
for link state changes while we remain DOWN.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-16 03:30:45 +01:00
Michael Brown 09555826e9 [infiniband] Always call ib_link_state_changed() in ib_smc_update()
ib_smc_update() potentially updates the Infiniband port state, and so
should almost always be followed by a call to ib_link_state_changed().
The one exception is the call made to ib_smc_update() before the
device is registered.

Fix by removing explicit calls to ib_link_state_changed() from drivers
using ib_smc_update(), including a call to ib_link_state_changed()
within ib_smc_update(), and creating a separate ib_smc_init() for use
prior to device registration.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-16 03:30:45 +01:00
Michael Brown 5e697b64a5 [scsi] Include sense key within error number reported to user
The sense key gives a first idea of what the problem might be, and so
is potentially useful in diagnosing problems in a non-debug build.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-15 22:23:48 +01:00
Michael Brown 52e54a8c69 [infiniband] Match GID/GUID terminology as used in the IBA
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-15 19:25:05 +01:00
Michael Brown 3ea3c846d8 [e1000] Strip the Ethernet CRC from received packets
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-15 05:14:57 +01:00
Michael Brown 220495f8bf [block] Replace gPXE block-device API with an iPXE asynchronous interface
The block device interface used in gPXE predates the invention of even
the old gPXE data-transfer interface, let alone the current iPXE
generic asynchronous interface mechanism.  Bring this old code up to
date, with the following benefits:

 o  Block device commands can be cancelled by the requestor.  The INT 13
    layer uses this to provide a global timeout on all INT 13 calls,
    with the result that an unexpected passive failure mode (such as
    an iSCSI target ACKing the request but never sending a response)
    will lead to a timeout that gets reported back to the INT 13 user,
    rather than simply freezing the system.

 o  INT 13,00 (reset drive) is now able to reset the underlying block
    device.  INT 13 users, such as DOS, that use INT 13,00 as a method
    for error recovery now have a chance of recovering.

 o  All block device commands are tagged, with a numerical tag that
    will show up in debugging output and in packet captures; this will
    allow easier interpretation of bug reports that include both
    sources of information.

 o  The extremely ugly hacks used to generate the boot firmware tables
    have been eradicated and replaced with a generic acpi_describe()
    method (exploiting the ability of iPXE interfaces to pass through
    methods to an underlying interface).  The ACPI tables are now
    built in a shared data block within .bss16, rather than each
    requiring dedicated space in .data16.

 o  The architecture-independent concept of a SAN device has been
    exposed to the iPXE core through the sanboot API, which provides
    calls to hook, unhook, boot, and describe SAN devices.  This
    allows for much more flexible usage patterns (such as hooking an
    empty SAN device and then running an OS installer via TFTP).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-14 20:37:15 +01:00
Michael Brown 46c7f99c66 [hermon] Use correct alignment for doorbell records
Doorbell records are currently embedded within the completion queue
and receive work queue strucures, which are allocated using zalloc()
and so have an alignment guarantee of only sizeof(void*), i.e. four
bytes.  This is sufficient for the receive work queue, but not for the
completion queue, which requires an alignment guarantee of eight
bytes.

Though not guaranteed, it so happens that zalloc() will always return
a pointer that is exactly four bytes above a sixteen-byte boundary.
The completion queue doorbell record is therefore always misaligned,
and the value passed to the hardware via SW2HW_CQ is actually always
pointing to the page_offset value within the MTT descriptor (which
directly precedes the inline doorbell record).  Provided that the page
offset is greater than 0x100, this looks to the hardware like an
update_ci value of greater than 0x010000 (taking into account
endianness differences), and so the hardware will happily deliver more
than 0x010000 completions before stopping.  Hence this problem is
rarely observable.

Fix by allocating the doorbell records separately and using the
correct alignment constraints.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-12 22:46:01 +01:00
Michael Brown 30e7d7efa1 [hermon] Set event queue number for completion queues
Give completion queues a chance to deliver exception events by
programming in the number of our event queue (currently used only for
port state changes).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-12 22:35:42 +01:00
Michael Brown 42f451e070 [hermon] Improve debugging output and facilities
Improve the utility of debugging messages by including the relevant
port number, queue number (QPN, CQN, EQN), work queue entry (WQE)
number, and physical addresses wherever applicable.

Add hermon_dump_cqctx() for dumping a completion queue context, and
hermon_fill_nop_send_wqe() for inserting NOPs into send work queues.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-12 22:35:13 +01:00
Michael Brown e9efbcd84c [rtl8139] Check for oversized packets when transmitting
An attempt to transmit a packet of 8192 bytes or larger will collide
with the status bits in the TX descriptor.  This gives the appearance
of the network card's transmit data path having just suddenly stopped
responding; iPXE is waiting for the card to report a TX completion
but, because of the status bit collision, the card thinks that the
descriptor has not yet been written.

Fix by explicitly checking for oversized packets in rtl_transmit().

Discovered during Fibre Channel over Ethernet testing, and debugged by
using gdb to examine the state of the emulated rtl8139 card in qemu.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-05 18:58:10 +01:00
Michael Brown 35b19d8848 [infiniband] Add the concept of an Infiniband upper-layer driver
Replace the explicit calls from the Infiniband core to the IPoIB layer
with the general concept of an Infiniband upper-layer driver
(analogous to a PCI driver) which can create arbitrary devices on top
of Infiniband devices.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-05 03:06:16 +01:00
Michael Brown 97ef28aea0 [netdevice] Call netdev_link_[up|down|err]() only while registered
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-05 02:51:46 +01:00
Michael Brown 3950d1d8e6 [sis190] Initialise network device before calling register_netdev()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-05 02:50:30 +01:00
Michael Brown a3021ad0e4 [rtl8139] Strip CRC from received packets
The rtl8139 driver includes the Ethernet CRC within the received
packet.  All current protocols ignore trailing garbage, but FCoE
requires the frame length to be correct (since the FCoE footer
position is calculated from the end of the packet), so fix the driver
to strip out the CRC.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-03 21:29:44 +01:00
Marty Connor b0eacbd421 [eepro100] Add new PCI ID 8086:27dc
Add PCI ID 8086:27dc to the eepro100 driver.

Reported-by: Cédric Delmas <c.delmas@akka.eu>
Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-03 14:33:32 +01:00
Piotr Jaroszyński d60cbe43b7 [linux] Add the tap driver
Add the tap driver that can be used like:
$ ./ipxe.linux --net tap,if=tap0,mac=00:0c:29:c5:39:a1
The if setting is mandatory.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-08-19 13:12:53 +01:00
Piotr Jaroszyński 91fb434bda [linux] Add device and driver model
Add the base to build linux drivers and the linux UI code on.  UI
fills device requests, which are later walked over by the linux
root_driver and delegated to specific linux drivers.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-08-19 12:42:42 +01:00
Piotr Jaroszyński b1fa4378d1 [mtnic] Switch to malloc_dma() and free_dma()
alloc_memblock() and free_memblock() are internal.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-08-17 14:45:06 +01:00
Piotr Jaroszyński 5bbad9c8f0 [ioapi] Move get_memmap() to the I/O API group
pcbios specific get_memmap() is used by the b44 driver making
all-drivers builds fail on other platforms.  Move it to the I/O API
group and provide a dummy implementation on EFI.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-08-16 16:54:03 +01:00
Andrei Faur 315524e703 [forcedeth] Replace driver with native iPXE driver
This patch adds a native iPXE forcedeth driver and removes the legacy
Etherboot forcedeth driver. It supports 40 different chips, compared
to the original 14.

It has been tested on a NIC with an CK804 Ethernet Controller, and the
results of downloading 5 100mb images in a row have been:
12/11/11/11/11 seconds; booting DSL using pxelinux also succeeded. The
driver has also been tested by chaining undionly.kpxe and it worked.

Signed-off-by: Andrei Faur <da3drus@gmail.com>
Tested-by: Andrei Faur <da3drus@gmail.com>
Tested-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-08-01 17:37:19 +01:00
Stefan Hajnoczi e4419ff97c [virtio] Replace virtio-net with native iPXE driver
This patch adds a native iPXE virtio-net driver and removes the legacy
Etherboot virtio-net driver.  The main reasons for doing this are:

1. Multiple virtio-net NICs are now supported by iPXE.  The legacy
   driver kept global state and caused issues in virtual machines with
   more than one virtio-net device.

2. Faster downloads.  The native iPXE driver downloads 100 MB over
   HTTP in 12s, the legacy Etherboot driver in 37s.  This simple
   benchmark uses KVM with tap networking and the Python
   SimpleHTTPServer both running on the same host.

Changes to core virtio code reduce vring descriptors to 256 (QEMU uses
128 for virtio-blk and 256 for virtio-net) and change the opaque token
from u16 to void*.  Lowering the descriptor count reduces memory
consumption.  The void* opaque token change makes driver code simpler.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-07-17 17:07:14 +01:00
Michael Brown 24403fba6e [davicom] Use iPXE debugging infrastructure
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-07-14 12:28:26 +01:00
Michael Brown ae34edbd3b [tulip] Use iPXE debugging infrastructure
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-07-14 12:28:26 +01:00
Andrei Faur ab14421990 [pcnet32] Fix pcnet32_wio_reset() bug
This bug caused .probe to fail because the NIC did not reset properly.

Signed-off-by: Andrei Faur <da3drus@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-07-11 15:53:22 +01:00
Michael Brown c84a2c81a7 [pcnet32] Fix uninitialised variable
Reported-by: Geoff Lywood <glywood@vmware.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-06-25 11:12:40 +01:00
Glenn Brown 66df967cb4 [myri10ge] Add NonVolatile Option (nvo) support
Add NonVolatile Option (nvo) and NonVolatile Storage (nvs) support to
the myri10ge driver using the EEPROM read/write mechanism provided by
the NIC's Vendor Specific PCI capability.

The myri10ge NIC is capabile of storing 64KB or more of nonvolatile
options, but this patch advertises only 512 bytes of nvo storage
because iPXE malloc's a buffer matching the total size we advertise.
512 is plenty without wasting malloc'd memory.  (The 2 other drivers
currently supporting nvo advertise 256 bytes or less.)

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-06-24 23:36:58 +01:00
Andrei Faur f658d7daba [r8169] Remove driver cfg lookup, use pci_device_id->driver_data instead
This patch removes the cfg lookup made in the r8169 driver and
replaces it with equivalent information found in the driver_data field
of the pci_device_id structure.

Signed-off-by: Andrei Faur <da3drus@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-06-23 01:06:29 +01:00
Michael Brown 4327d5d39f [interface] Convert all data-xfer interfaces to generic interfaces
Remove data-xfer as an interface type, and replace data-xfer
interfaces with generic interfaces supporting the data-xfer methods.

Filter interfaces (as used by the TLS layer) are handled using the
generic pass-through interface capability.  A side-effect of this is
that deliver_raw() no longer exists as a data-xfer method.  (In
practice this doesn't lose any efficiency, since there are no
instances within the current codebase where xfer_deliver_raw() is used
to pass data to an interface supporting the deliver_raw() method.)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-06-22 15:50:31 +01:00
Michael Brown 4bfd5b52c1 [refcnt] Add ref_init() wrapper function
Standardise on using ref_init() to initialise an embedded reference
count, to match the coding style used by other embedded objects.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-06-22 14:26:40 +01:00
Andrei Faur f4faa27dfd [pcnet32] Replace pcnet32 with native driver
This patch replaces the old pcnet32 driver with a new one that
uses iPXE's API.

Signed-off-by: Andrei Faur <da3drus@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-06-22 11:28:01 +01:00
Geoff Lywood ee93c72d6d [jme] Fix 64-bit compile of JMicron ethernet driver
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-06-22 11:25:17 +01:00
Guo-Fu Tseng 1798e04ebb [jme] Fix refill behavior
After changing the driver to refill after feed, if any error occurs a
non-contiguous empty buffer will be introduced in the ring due to my
reuse-buffer-when-error implementation.

Reported-by: Marty Connor <mdc@etherboot.org>
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-06-13 18:10:39 +01:00
Michael Brown 75333f464e [ethernet] Move Ethernet MAC address checking routines to ethernet.h
Originally-fixed-by: Faur Andrei <da3drus@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-06-07 15:21:04 +01:00
Erwan Velu 3fc4fd3213 [eepro100] Add PCI ID for Intel Pro/100 VE
Signed-off-by: Erwan Velu <erwanaliasr1@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-06-07 11:47:19 +01:00
Guo-Fu Tseng f27e077f09 [jme] Add JMicron Ethernet driver
A new driver for JMicron Ethernet controller.

Reviewed-by: Joshua Oreman <oremanj@rwcr.net>
Reviewed-by: Michael Brown <mbrown@fensystems.co.uk>
Reviewed-by: Marty Connor <mdc@etherboot.org>
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-06-02 15:44:07 +01:00
Geoff Lywood 62149deb11 [efi] Add the "snpnet" driver
Add a new network driver that consumes the EFI Simple Network
Protocol.  Also add a bus driver that can find the Simple Network
Protocol that iPXE was loaded from; the resulting behavior is similar
to the "undionly" driver for BIOS systems.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-06-02 15:15:29 +01:00
Michael Brown 74bc1b95bb [qib7322] Fix whitespace errors
Fix up the whitespace errors inadvertently introduced by the
last-minute rename from the internal QLogic codename to "qib7322".

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-06-01 19:16:15 +01:00
Shao Miller 4a39717e17 [qib7322] Fix uninitialized variables warning
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-06-01 19:15:38 +01:00
Michael Brown 6c0e8c14be [libc] Enable automated extraction of error usage reports
Add preprocessor magic to the error definitions to enable every error
usage to be tracked.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-05-31 03:11:57 +01:00
Piotr Jaroszyński 7c6d3752c9 [compiler] Fix 64bit compile time errors
Apart from format specifier fixes there are two changes in proper code:
- Change type of regs in skge_hw to unsigned long
- Cast result of sizeof in myri10ge to uint32_t

Both don't change anything for i386 and should be fine on x86_64.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Joshua Oreman <oremanj@rwcr.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-05-27 10:23:06 +01:00
Michael Brown 4fb3dae14e [qib7322] Add support for QLogic 7322 HCA
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-05-25 02:13:11 +01:00
Michael Brown 8406115834 [build] Rename gPXE to iPXE
Access to the gpxe.org and etherboot.org domains and associated
resources has been revoked by the registrant of the domain.  Work
around this problem by renaming project from gPXE to iPXE, and
updating URLs to match.

Also update README, LOG and COPYRIGHTS to remove obsolete information.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-04-19 23:43:39 +01:00
Thomas Miletich 2a36703af2 [eepro100] Remove link-state checking
Christopher Armenio reported link detection problems with an
integrated eepro100 NIC.  Thomas Miletich removed link detection code
from the eepro100 driver and verified that the driver continued to
function.  Christopher verified Thomas' patch on his integrated
eepro100 NIC.

Reported-by: Christopher Armenio <christopher.armenio@resquared.com>
Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-04-19 10:42:42 -04:00
Bruce Rogers f7c5918b17 [drivers] Fix warnings identified by gcc 4.5
In building gpxe for openSUSE Factory (part of kvm package), there were
a few problems identified by the compiler.  This patch addresses them.

Signed-off-by: Bruce Rogers <brogers@novell.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-04-16 07:32:49 -04:00
Michael Brown b3533dd2bb [phantom] Update interrupt support to match current firmware
The interrupt control mechanism on Phantom cards has changed
substantially since the driver was initially written.  This updates
the code to match the mechanism used in production firmware.

This is sufficient to allow DOS wget to function successfully using
the 3Com UNDI/NDIS, Intel UNDI/NDIS, and UNDIPD.COM UNDI/PD stacks.

Signed-off-by: Michael Brown <mcb30@etherboot.org>
2010-03-22 21:59:27 +00:00
Marty Connor 5e829de055 [igb] Add igb driver
This commit adds an igb (Intel GigaBit) driver based on Intel source
code available at:

    http://sourceforge.net/projects/e1000/

which is upstream source for the Linux kernel e1000 drivers, and
should support some PCIe e1000 variants.

Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-03-17 03:44:27 -04:00
Marty Connor be5392c93a [e1000e] Add e1000e driver
This commit adds an e1000e driver based on Intel source code
available at:

    http://sourceforge.net/projects/e1000/

which is upstream source for the Linux kernel e1000 drivers, and
should support many PCIe e1000 variants.

Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-03-17 03:18:46 -04:00
Marty Connor 930a2ffac8 [e1000] Update e1000 driver
This commit replaces the current gPXE e1000 driver with one ported
from Intel source code available at

    http://sourceforge.net/projects/e1000/

which is upstream source for the Linux kernel e1000 drivers, and
should support most if not all PCI e1000 variants.

Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-03-17 03:02:32 -04:00
Stefan Hajnoczi 6877c844e5 [vxge] Add stub vxge.c file so bin/vxge.usb can be built
The vxge driver code is split over several files, including vxge_main.c.
This causes the build system and ROM-o-matic to see the driver as
"vxge_main".

This patch adds a stub vxge.c which takes up no space but gives the
driver its proper name, "vxge".

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-03-12 06:39:06 -05:00
Masroor Vettuparambil f5f8ee00fc [vxge] Add support for X3100 series 10GbE Server/Storage Adapter
Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Masroor Vettuparambil <masroor.vettuparambil@neterion.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-02-24 13:08:49 -05:00
Itay Gazit 5e70e856ff [hermon] Change hermon_alloc_icm() to conform to ConnectX2 requirements
Align each ICM member alloc to the member size instead of page size.
Increase multicast table size to 128.

Signed-off-by: Itay Gazit <itaygazit@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-02-13 12:21:58 -05:00
Stefan Hajnoczi 5835ed5746 [rtl818x] Remove broken mmio register support
The rtl818x driver uses programmed I/O but has a fallback to
memory-mapped I/O registers.  The fallback currently will not work since
the registers are accessed using inl()/outl() programmed I/O functions
in the driver.  This patch removes the fallback to we fail cleanly when
programmed I/O is not possible.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Joshua Oreman <oremanj@rwcr.net>
Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-25 17:04:39 -05:00
Stefan Hajnoczi e51ef7912c [natsemi] Convert stray mmio readl() to pio inl()
This driver uses programmed I/O to access hardware registers.  There is
a stray memory-mapped I/O read on a programmed I/O address.  Perhaps
this is an artifact of porting the driver.  Fix this by converting it to
programmed I/O.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-25 16:58:18 -05:00
Bernhard Kohl 466d8fc234 [pci] Save and restore PCI command register
This seems to be necessary for some types of PCI devices. We had
problems when using gPXE in KVM virtual machines with direct
PCI device access.

Signed-off-by: Bernhard Kohl <bernhard.kohl@nsn.com>
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
Modified-by: Marty Connor <mdc@etherboot.org>
Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-21 18:13:48 -05:00
Thomas Miletich eebe98ea60 [skge] Note correct author of akge driver
The previous [skge] commit should have been recorded as authored by
Thomas Miletich <thomas.miletich@gmail.com>

I mistakenly committed it improperly after fixing a merge issue.

Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-14 12:23:52 -05:00
Marty Connor 5264e965ad [skge] Add driver for skge NICs
This code is based on the linux skge driver. It supports Marvell Yukon
and SysKonnect Gigabit chipsets.

The code is based on code Michael Decker <mrd999@gmail.com> wrote for
Google Summer of Code 2008.

Support for dual-port cards is untested. The code, however, was left
in. In my opinion it's easier to fix the code if we need to, instead
of having to add support for it from scratch.

Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-14 12:05:35 -05:00
Glenn Brown 57faa48f3b [myri10ge] Native driver for Myricom 10Gb Ethernet NICs
This driver supports all current Myricom 10 gigabit Ethernet NICs.
It was written from scratch for gPXE by Glenn Brown <glenn@myri.com>,
referenencing Myricom's Linux and EFI drivers, with permission.

Signed-off-by: Glenn Brown <glenn@myri.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-14 10:32:40 -05:00
Thomas Horsten eb46f8e40a [forcedeth] Add support for 10de:054c nforce 630a, MCP 67
Tested-by: Boudhayan Gupta <bg13.ina@gmail.com>
Signed-off-by: Thomas Horsten <thomas@horsten.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
2010-01-14 10:15:35 -05:00
Thomas Miletich cd04338f7c [e1000] Remove deprecated IRQ_FORCE action from e1000_irq()
The gPXE driver API does not have a "force interrupt" function.
Remove legacy code.

Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-05 07:19:35 -05:00
Thomas Miletich 70928aeaa0 [eepro100] Add missing FILE_LICENCE() to eepro100.h
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
2009-12-14 17:49:50 +00:00
Thomas Miletich d06ae11df9 [e1000] Enable interrupts in a more UNDI compatible way
Signed-off-by: Marty Connor <mdc@etherboot.org>
2009-11-25 12:24:24 -05:00
Thomas Miletich cdcb4165bd [eepro100] Convert to native gPXE API
This version is Based on Michael Decker's GSoC 2008 code.
A number cleanups and fixes were applied.

Earlier-version-reviewed-by: Marty Connor <mdc@etherboot.org>
Earlier-version-tested-by: Marty Connor <mdc@etherboot.org>
Earlier-version-tested-by: Shao Miller <Shao.Miller@yrdsb.edu.on.ca>
Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com>
Reviewed-by: Joshua Oreman <oremanj@rwcr.net>
Signed-off-by: Marty Connor <mdc@etherboot.org>
2009-11-22 07:55:49 -05:00
Alex Williamson 470454a791 [e1000] Use the alternate MAC in NVRAM when available
The 82571 supports an alternate MAC address location in NVRAM.
When this is set, use this for the MAC rather than the default
physical MAC address.

Ported from linux-2.6.git 93ca161027eb6a1761fb674ad7b995aedccf5f6e

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Tested-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
2009-11-22 07:51:23 -05:00
Thomas Miletich 2a9688b880 [e1000] Implement zero-copy receive
Co-Authored by: Marty Connor <mdc@etherboot.org>
Signed-off-by: Marty Connor <mdc@etherboot.org>
2009-11-22 07:47:57 -05:00
Michael Brown f406edefae [linda] Re-import the latest register definitions
Two registers have been renamed, and a bugfix to qib_genbits.pl
removes a harmless excess padding field.
2009-11-16 22:22:12 +00:00
Michael Brown ef0e76811b [susieq] Update qib_genbits.pl to handle SusieQ definitions
The latest RTL-generated register lists include (mostly redundant)
xxx_MSB values alongside xxx_LSB and xxx_RMASK, and also include
default register values.
2009-11-16 22:21:56 +00:00
Michael Brown 7467cf5f09 [linda] Wait up to 20us for link state to update
Some subnet managers expect the GetResponse from a SetPortInfo MAD to
contain the new link state.  The transition is not immediate, so we
often end up returning the previous link state.  This can cause the SM
to fail to activate the port.

Fix by waiting for up to 20us for the link state transition to take
effect.
2009-11-16 22:19:39 +00:00
Michael Brown c2c77377a6 [ipoib] Mask out non-QPN bits in the IPoIB destination MAC when sending
The first byte of the IPoIB MAC address is used for flags indicating
support for "connected mode".  Strip out the non-QPN bits of the first
dword when constructing the address vector for transmitted IPoIB
packets, so as not to end up passing an invalid QPN in the BTH.
2009-11-16 22:15:29 +00:00
Michael Brown 50242e4202 [ipoib] Always set the "full membership" bit in the IPv4 broadcast GID
The SM always creates the IPoIB multicast groups with full membership
partition keys.
2009-11-16 22:14:58 +00:00
Michael Brown bbc530c0dd [infiniband] Report IB link status as IPoIB netdevice status 2009-11-16 22:14:12 +00:00
Joshua Oreman 858b5fd253 [atl1e] Fix compilation on gcc-4.4.1-2.fc11.i586.
Error message was:

[BUILD] bin/atl1e.oncc1: warnings being treated as errors
drivers/net/atl1e.c: In function 'atl1e_get_permanent_address':
drivers/net/atl1e.c:1326: error: dereferencing type-punned pointer will break strict-aliasing rules
make: *** [bin/atl1e.o] Error 1

Reported-by: Giandomenico  De Tullio <ghisha@email.it>
Signed-off-by: Michael Brown <mcb30@etherboot.org>
Modified-by: Michael Brown <mcb30@etherboot.org>
2009-10-24 19:10:15 +01:00
Thomas Miletich 8912e24fdc [sis190] Hide the ISA bridge's PCI IDs from parserom.pl
Signed-off-by: Michael Brown <mcb30@etherboot.org>
Modified-by: Michael Brown <mcb30@etherboot.org>
2009-10-24 18:57:02 +01:00
Thomas Miletich cd647b7cf3 [sis190] Insert forgotten FILE_LICENCE() to sis190.h
Signed-off-by: Michael Brown <mcb30@etherboot.org>
Modified-by: Michael Brown <mcb30@etherboot.org>
2009-10-24 18:51:42 +01:00
Thomas Miletich 107d641bd5 [sis190] Make 'make allroms' happy.
Remove spaces in 3rd PCI_ROM field.

Debugged-by: Marty Connor <mdc@etherboot.org>
Reported-by: Giandomenico  De Tullio <ghisha@email.it>
Signed-off-by: Michael Brown <mcb30@etherboot.org>
2009-10-24 18:45:18 +01:00
Michael Brown 1b1e63d54d [netdevice] Add the concept of an "Ethernet-compatible" MAC address
The iBFT is Ethernet-centric in providing only six bytes for a MAC
address.  This is most probably an indirect consequence of a similar
design flaw in the Windows NDIS stack.  (The WinOF IPoIB stack
performs all sorts of contortions in order to pretend to the NDIS
layer that it is dealing with six-byte MAC addresses.)

There is no sensible way in which to extend the iBFT without breaking
compatibility with programs that expect to parse it.  Add the notion
of an "Ethernet-compatible" MAC address to our link layer abstraction,
so that link layers can provide their own workarounds for this
limitation.
2009-10-23 22:14:05 +01:00
Shao Miller 389eefd0cd [sis190] Fix for gcc-3.3.3 compilation
gcc 3.3.3 gave the following error when compiling sis190.c

drivers/net/sis190.c: In function 'sis190_get_mac_addr_from_apc':
drivers/net/sis190.c:966: warning: 'isa_bridge' might be used
uninitialized in this function
make: *** [bin/sis190.o] Error 1

This patch allows error-free compilation.

Signed-off-by: Marty Connor <mdc@etherboot.org>
2009-10-17 22:03:03 -04:00
Joshua Oreman 7296f1f21c [ath5k] Save proper cacheline size when fixing PCI configuration
Some BIOSes set the PCI cacheline size to zero for the card; the ath5k
driver fixes it to a reasonable in PCI config space, but failed to
correct the internal value it had already read. This resulted in
divide-by-zero errors when cacheline-aligning various data structures.

Fix by setting the internal cachelsz to a sane value at the same time
as we write that value to PCI config space.

Signed-off-by: Marty Connor <mdc@etherboot.org>
2009-10-16 20:25:17 -04:00
Joshua Oreman 489bd2f396 [ath5k] Update for changes in kernel 2.6.31
This adds basic rfkill support for enabling the wireless card on certain
laptops, and changes miscellaneous other details that may help in obscure
cases.

Also change the error handling to not report CRC errors, which due to the
basic facts of wireless may happen even more frequently than valid packets.

Signed-off-by: Marty Connor <mdc@etherboot.org>
2009-10-16 20:22:41 -04:00
Thomas Miletich 251926f631 [sis190] Add sis190/191 ethernet driver
Tested-by: Paul Hackett <paulfxhackett@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
2009-10-16 14:56:34 -04:00
Simon Horman 04cb1cde5c [e1000] Add 82576 support
Add the 82576 to the e1000 driver.

- Examining the Linux 2.6.30-rc4 igb driver, which supports this card and;
- Information available in the Intel® 82576 Gigabit Ethernet
  Controller Datasheet v2.1, which is available from Intel's web site.

I only have a dual-ported card with Copper PHY, so any code paths relating
to Fibre haven't been tested. Also, I have only tested using auto-negotiation
of speed and duplex, and no flow control.  Other code paths relating to
those settings also have not been exercised.

Signed-off-by: Simon Horman <horms@verge.net.au>
Sponsored-by: Thomas Miletich <thomas.miletich@gmail.com>
Modified-by: Thomas Miletich <thomas.miletich@gmail.com>
Modified-by: Marty Connor <mdc@etherboot.org>
Signed-off-by: Marty Connor <mdc@etherboot.org>
2009-10-16 13:35:28 -04:00
Joshua Oreman db3e054fe5 [atl1e] Add Attansic L1E gigabit Ethernet driver
Signed-off-by: Marty Connor <mdc@etherboot.org>
2009-10-16 12:41:16 -04:00
Thomas Miletich d07f79de35 [sis900] Enable interrupts to allow UNDI to work
Enable interrupts in sis900_irq(). Doing so allows some programs using
gPXE's UNDI interface to work properly, including Symantec Ghost.

Tested-by: Hubert Mercier <hubert.mercier@unilim.fr>
Signed-off-by: Marty Connor <mdc@etherboot.org>
2009-10-15 15:32:51 -04:00
Thomas Miletich 584e378241 [3c90x] Fix a3c90x_close() and a3c90x_remove() methods.
Both methods disabled packet tx and rx just to have it enabled again
by calling a3c90x_reset().
Fixed by disabling tx and rx after the call to a3c90x_reset().

Tested by booting Ubuntu intrepid(8.10) directly from gPXE and pxelinux.
Tested on 3c905, 3c905B, 3c905C.

Signed-off-by: Marty Connor <mdc@etherboot.org>
2009-10-15 13:06:01 -04:00
Michael Brown 9f7141a1ce [hermon] Reset device during probe()
Some systems will retry their boot sequence in the event of a boot
failure.  On these systems, the second and subsequent boot attempts
will fail to initialise the Hermon HCA.

Fix by resetting the HCA during probe().  This incurs a one-second
cost, but there seems to be no viable alternative.

Originally-fixed-by: Itay Gazit <itaygazit@gmail.com>
2009-10-14 02:11:16 +01:00
Michael Brown 4175b778c2 [pci] Add generic configuration space backup/restore facility
Some devices can only be reset via a mechanism that also resets the
card's PCI core, thus necessitating a backup and restore of all or
part of the PCI configuration space across a reset.
2009-10-14 02:06:23 +01:00
Joshua Oreman d7dfc9572e [ath5k] Remove spurious debugging check
Signed-off-by: Marty Connor <mdc@etherboot.org>
2009-08-17 19:10:53 -04:00
Michael Brown 4eab5bc8ca [netdevice] Allow the hardware and link-layer addresses to differ in size
IPoIB has a 20-byte link-layer address, of which only eight bytes
represent anything relating to a "hardware address".

The PXE and EFI SNP APIs expect the permanent address to be the same
size as the link-layer address, so fill in the "permanent address"
field with the initial link layer address (as generated by
register_netdev() based upon the real hardware address).
2009-08-12 00:23:38 +01:00
Michael Brown 37a0aab4ff [netdevice] Separate out the concept of hardware and link-layer addresses
The hardware address is an intrinsic property of the hardware, while
the link-layer address can be changed at runtime.  This separation is
exposed via APIs such as PXE and EFI, but is currently elided by gPXE.

Expose the hardware and link-layer addresses as separate properties
within a net device.  Drivers should now fill in hw_addr, which will
be used to initialise ll_addr at the time of calling
register_netdev().
2009-08-12 00:19:14 +01:00
Michael Brown 965a0f7a75 [infiniband] Allow SRP reconnection attempts even after reporting failures
With iSCSI, connection attempts are expensive; it may take many
seconds to determine that a connection will fail.  SRP connection
attempts are much less expensive, so we may as well avoid the
"optimisation" of declaring a state of permanent failure after a
certain number of attempts.  This allows a gPXE SRP initiator to
resume operations after an arbitrary amount of SRP target downtime.
2009-08-10 22:30:56 +01:00
Michael Brown 0c30dc6bc5 [infiniband] Add support for SRP over Infiniband
SRP is the SCSI RDMA Protocol.  It allows for a method of SAN booting
whereby the target is responsible for reading and writing data using
Remote DMA directly to the initiator's memory.  The software initiator
merely sends and receives SCSI commands; it never has to touch the
actual data.
2009-08-10 22:27:33 +01:00
Michael Brown 1175f0cf29 [hermon] Reduce the RC ACK timeout
The ACK timeout determines how long we take to notice a failed
Reliable Connection.  Reducing it from the arbitrary value of 19 down
to 14 reduces the individual ACK timeout from around 2.1s to 67ms;
this in turn reduces the time to tear down and re-establish a broken
SRP session from around 30s to around 1s.
2009-08-10 22:22:42 +01:00
Michael Brown 0b1222f233 [hermon] Randomise the high-order bits of queue pair numbers
The Infiniband Communication Manager will refuse to establish a
connection if it believes the connection is already established.
There is no immediately obvious way to ask it to tear down the
existing connection and replace it; to issue a DREP we would need to
know the local and remote communication IDs used for the previous
connection setup.

We can work around this by randomising the high-order bits of the
queue pair number; these have no significance to the hardware, but are
sufficient to convince the IB CM that this is a different connection.
2009-08-10 22:19:39 +01:00
Michael Brown d944794680 [scsi] Generalise iscsi_parse_lun() to scsi_parse_lun() 2009-08-10 19:30:41 +01:00
Michael Brown 976f12c501 [scsi] Generalise iscsi_detached_command() to scsi_detached_command() 2009-08-10 19:29:40 +01:00
Joshua Oreman ce68f587e2 [ath5k] Add support for non-802.11n Atheros wireless NICs
Signed-off-by: Michael Brown <mcb30@etherboot.org>
2009-08-09 00:16:13 +01:00
Joshua Oreman f128a6db21 [802.11] Enhance support for driver PHY differences
The prior net80211 model of physical-layer behavior for drivers was
overly simplistic and limited the drivers that could be written.  To
be more flexible, split the driver-provided list of supported rates by
band, and add a means for specifying a list of supported channels.
Allow drivers to specify a hardware channel value that will be tied to
uses of the channel.

Expose net80211_duration() to drivers, and make the rate it uses in
its computations configurable, so that it can be used in calculating
durations that must be set in hardware for ACK and CTS packets. Add
net80211_cts_duration() for the common case of calculating the
duration for a CTS packet.

Signed-off-by: Michael Brown <mcb30@etherboot.org>
2009-08-09 00:11:26 +01:00
Michael Brown 34bfc04e4c [infiniband] Update all other MAD users to use a management interface 2009-08-08 23:56:28 +01:00
Michael Brown 44251ebb9a [infiniband] Update subnet management agent to use a management interface 2009-08-08 23:55:29 +01:00
Michael Brown 18bcdfb1cc [hermon] Allow for multiple calls to ib_modify_qp() 2009-08-08 23:49:59 +01:00
Michael Brown ad66465b3c [hermon] Add support for multiple ports and detecting non-IB ports
Originally-fixed-by: Itay Gazit <itaygazit@gmail.com>
2009-08-06 01:55:38 +01:00
Michael Brown b0c563824b [infiniband] Change IB_{QPN,QKEY,QPT} names from {SMA,GMA} to {SMI,GSI}
The IBA specification refers to management "interfaces" and "agents".
The interface is the component that connects to the queue pair and
sends and receives MADs; the agent is the component that constructs
the reply to the MAD.

Rename the IB_{QPN,QKEY,QPT} constants as a first step towards making
this separation in gPXE.
2009-08-06 01:24:18 +01:00
Joshua Oreman 70f47e675e [sky2] Add support for Marvell Yukon-II gigabit Ethernet cards
Signed-off-by: Michael Brown <mcb30@etherboot.org>
2009-08-03 00:27:16 +01:00
Joshua Oreman 14ae602ef0 [rtl818x] Add driver for Realtek 8180/8185 wireless cards 2009-08-01 19:02:48 +01:00
Michael Brown bb2cf3c8d7 [hermon] Add support for RC queue pairs 2009-07-17 23:06:35 +01:00
Michael Brown cd5a21359c [hermon] Allow software GMA to receive packets destined for QP1
The Linux IB Communication Manager will always send MADs to QP1,
rather than back to the originating QP.  On Hermon, QP1 is by default
handled by the embedded firmware.  We can change this, but the cost is
that we have to handle both QP0 and QP1 (i.e. we have to provide SMA
as well as GMA service in software), and we have to use MLX queues
rather than standard UD queues (i.e. we have to construct the UD
datagrams by hand).

There doesn't seem to be any viable way around this situation, ugly
though it is.
2009-07-17 23:06:35 +01:00
Michael Brown de50a19ae3 [hermon] Disable debugging around mapping of firmware tables 2009-07-17 23:06:35 +01:00
Michael Brown dd2788594b [hermon] Remove an unnecessary check for GID-less transmissions 2009-07-17 23:06:35 +01:00
Michael Brown c939bc57ff [infiniband] Add infrastructure for RC queue pairs
Queue pairs are now assumed to be created in the INIT state, with a
call to ib_modify_qp() required to bring the queue pair to the RTS
state.

ib_modify_qp() no longer takes a modification list; callers should
modify the relevant queue pair parameters (e.g. qkey) directly and
then call ib_modify_qp() to synchronise the changes to the hardware.

The packet sequence number is now a property of the queue pair, rather
than of the device.

Each queue pair may have an associated address vector.  For RC queue
pairs, this is the address vector that will be programmed in to the
hardware as the remote address.  For UD queue pairs, it will be used
as the default address vector if none is supplied to ib_post_send().
2009-07-17 23:06:35 +01:00
Michael Brown ea6eb7f7ed [infiniband] Pass a generic MAD to ib_set_port_info() 2009-07-17 23:06:35 +01:00
Michael Brown 0095e18d4c [infiniband] Expose supported and enabled link speeds and widths 2009-07-17 23:06:35 +01:00
Michael Brown 92cf240020 [infiniband] Always create an SMA and a GMA 2009-07-17 23:06:34 +01:00
Michael Brown 80c41b90d2 [infiniband] Add notion of a queue pair type 2009-07-17 23:06:34 +01:00
Michael Brown 47c4aaa9e2 [ipoib] Attempt the broadcast group join only if the link is up
Attempting the broadcast group join while the link is down is
harmless, but can generate annoying volumes of debug messages.
2009-07-17 23:06:34 +01:00
Michael Brown 165074c188 [infiniband] Implement SMA as an instance of a GMA
The GMA code was based upon the SMA code.  We can save space by making
the SMA simply an instance of the GMA.
2009-07-17 23:06:34 +01:00
Michael Brown cb9ef4dee2 [ipoib] Remove the queue set abstraction
Now that IPoIB has to deal with only one set of queues, the queue set
abstraction becomes merely an inconvenient wrapper.
2009-07-17 23:06:34 +01:00
Michael Brown 63c112ed38 [ipoib] Kill off the now-unused IPoIB metadata queue set
All packets handled by the metadata queue set now go via the GMA.
2009-07-17 23:06:34 +01:00
Michael Brown 0fbf2f6bda [infiniband] Provide a general mechanism for multicast group joins
Generalise out the multicast group membership record code from IPoIB.
2009-07-17 23:06:34 +01:00
Michael Brown b4155c4ab5 [infiniband] Make qkey and rate optional parameters to ib_post_send()
The queue key is stored as a property of the queue pair, and so can
optionally be added by the Infiniband core at the time of calling
ib_post_send(), rather than always having to be specified by the
caller.

This allows IPoIB to avoid explicitly keeping track of the data queue
key.
2009-07-17 23:06:33 +01:00
Michael Brown 8aa2591c06 [ipoib] Clarify new role of IPoIB peer cache as for MAC addresses only
Now that path record lookups are handled entirely via
ib_resolve_path(), the only role of the IPoIB peer cache is as a
lookup table for MAC addresses.  Update the code structure and
comments to reflect this.
2009-07-17 23:06:33 +01:00
Michael Brown 06ad481904 [ipoib] Expose the real broadcast MAC
The IPoIB broadcast MAC address varies according to the partition key.
Now that the broadcast MAC address is a property of the network device
rather than of the link layer, we can expose this real MAC address
directly.

The broadcast LID is now identified via a path record lookup; this is
marginally inefficient (since it was present in the MCMemberRecord
GetResponse), but avoids the need to special-case broadcasts when
constructing the address vector in ipoib_transmit().
2009-07-17 23:06:33 +01:00
Michael Brown 4d0029611f [ipoib] Use Infiniband broadcast QPN in IPoIB broadcast MAC address
Remove the special handling of the IPoIB broadcast QPN.
2009-07-17 23:06:33 +01:00
Michael Brown d6b47871de [infiniband] Provide a general mechanism for path record lookups
Generalise out the path record lookup code from IPoIB.
2009-07-17 23:06:33 +01:00
Michael Brown 365b8db5cf [infiniband] Centralise SMA and GMA queue constants 2009-07-17 23:06:33 +01:00
Michael Brown 887d296b88 [infiniband] Poll completion queues automatically
Currently, all Infiniband users must create a process for polling
their completion queues (or rely on a regular hook such as
netdev_poll() in ipoib.c).

Move instead to a model whereby the Infiniband core maintains a single
process calling ib_poll_eq(), and polling the event queue triggers
polls of the applicable completion queues.  (At present, the
Infiniband core simply polls all of the device's completion queues.)
Polling a completion queue will now implicitly refill all attached
receive work queues; this is analogous to the way that netdev_poll()
implicitly refills the RX ring.

Infiniband users no longer need to create a process just to poll their
completion queues and refill their receive rings.
2009-07-17 23:06:33 +01:00
Michael Brown 1f5c0239b4 [infiniband] Centralise assumption of 2048-byte payloads
IPoIB and the SMA have separate constants for the packet size to be
used to I/O buffer allocations.  Merge these into the single
IB_MAX_PAYLOAD_SIZE constant.

(Various other points in the Infiniband stack have hard-coded
assumptions of a 2048-byte payload; we don't currently support
variable MTUs.)
2009-07-17 23:06:33 +01:00
Michael Brown b25a4b6c8a [infiniband] Split queue set functionality out of ipoib.c to ib_qset.c 2009-07-17 23:06:33 +01:00
Michael Brown 8868956268 [infiniband] Move non-driver-specific code to net/infiniband 2009-07-17 23:04:07 +01:00
Michael Brown d09290161e [netdevice] Make ll_broadcast per-netdevice rather than per-ll_protocol
IPoIB has a link-layer broadcast address that varies according to the
partition key.  We currently go through several contortions to pretend
that the link-layer address is a fixed constant; by making the
broadcast address a property of the network device rather than the
link-layer protocol it will be possible to simplify IPoIB's broadcast
handling.
2009-07-17 23:02:48 +01:00
Michael Brown 54ec3673cc [ata] Make ATA command issuing partially asynchronous
Move the icky call to step() from aoe.c to ata.c; this takes it at
least one step further away from where it really doesn't belong.

Unfortunately, AoE has the ugly aoe_discover() mechanism which means
that we still have a step() loop in aoe.c for now; this needs to be
replaced at some future point.
2009-07-17 23:01:20 +01:00
Michael Brown acfd7cc609 [scsi] Improve SCSI debugging 2009-07-17 23:00:46 +01:00
Michael Brown 1d8d8ef2c8 [scsi] Make SCSI command issuing partially asynchronous
Move the icky call to step() from iscsi.c to scsi.c; this takes it at
least one step further away from where it really doesn't belong.
2009-07-17 23:00:09 +01:00
Michael Brown ded4d3a703 [rtl8139] Split debug messages into DBGLVL_LOG and DBGLVL_EXTRA 2009-06-23 20:41:44 +01:00
Michael Brown 5e1ef98469 [e1000] Ensure descriptor is fully written before sending packet
Reported-by: Mark McLoughlin <markmc@redhat.com>
2009-06-23 18:36:01 +01:00
Joshua Oreman eb3ca2a36f [netdevice] Add netdev argument to link-layer push and pull handlers
In order to construct outgoing link-layer frames or parse incoming
ones properly, some protocols (such as 802.11) need more state than is
available in the existing variables passed to the link-layer protocol
handlers. To remedy this, add struct net_device *netdev as the first
argument to each of these functions, so that more information can be
fetched from the link layer-private part of the network device.

Updated all three call sites (netdevice.c, efi_snp.c, pxe_undi.c) and
both implementations (ethernet.c, ipoib.c) of ll_protocol to use the
new argument.

Signed-off-by: Michael Brown <mcb30@etherboot.org>
2009-06-23 10:41:57 +01:00
Michael Brown a5cd8d1772 [misc] Fix source files erroneously marked as executable 2009-06-02 11:26:09 +01:00
Michael Brown 92a9978b44 [spi] Add address-length autodetection to the SPI bit-bashing code
Several SPI chips will respond to an SPI read command with a dummy
zero bit immediately prior to the first real data bit.  This can be
used to autodetect the address length, provided that the command
length and data length are already known, and that the MISO data line
is tied high.

Tested-by: Thomas Miletich <thomas.miletich@gmail.com>
Debugged-by: Thomas Miletich <thomas.miletich@gmail.com>
2009-05-28 19:32:03 +01:00
Daniel Verkamp b8469eddaa [ethernet] Update mii.h and use it in drivers that had a private copy
Signed-off-by: Michael Brown <mcb30@etherboot.org>
2009-05-26 11:30:31 +01:00
Daniel Verkamp 005fce0258 [ethernet] Move struct mii_if_info to mii.h
Signed-off-by: Michael Brown <mcb30@etherboot.org>
2009-05-26 11:27:55 +01:00
Michael Brown c44a193d0d [legal] Add a selection of FILE_LICENCE declarations
Add FILE_LICENCE declarations to almost all files that make up the
various standard builds of gPXE.
2009-05-18 08:33:25 +01:00
Joshua Oreman 210bc9e9ba [3c90x] Add missing size_t format specifier
Signed-off-by: Michael Brown <mcb30@etherboot.org>
2009-03-31 07:10:40 +01:00
Michael Brown 5538a38b9c [pcnet32] Fix received packet corruption
The pcnet32 driver mismanages its RX buffers, with the result that
packets get corrupted if more than one packet arrives between calls to
poll().

Originally-fixed-by: Bill Lortz <Bill.Lortz@premier.org>
Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com>
Tested-by: Stefan Hajnoczi <stefanha@gmail.com>
2009-03-26 15:44:59 +00:00
Thomas Miletich 03ff8cd3e2 [forcedeth] Add support for newer forcedeth NICs
Also adds the MAC_ADDR_CORRECT flag, to indicate whether or not the
MAC address needs to be fixed up by the driver.

Signed-off-by: Michael Brown <mcb30@etherboot.org>
2009-03-26 10:26:55 +00:00
Thomas Miletich 3da6f1c7bd [pci] Add driver_data field to struct pci_device_id
Modified-by: Michael Brown <mcb30@etherboot.org>
Signed-off-by: Michael Brown <mcb30@etherboot.org>
2009-03-26 10:22:15 +00:00
Marty Connor 16aa435567 [3c90x] Remove src/drivers/3c90x.txt
Most of the 3c90x.txt file is obsolete.  The content from the file has
been placed here:

   http://etherboot.org/wiki/appnotes/3c90x_issues
2009-03-13 12:05:12 -04:00
Thomas Miletich 90c01ef1e4 [3c90x] 3c90x driver rewrite using gPXE API
This is a major rewrite of the legacy etherboot 3c90x driver using the
gPXE API for much improved performance over the legacy driver it
replaces.

This driver has been tested on 3c905, 3c905B, and 3c905C cards.

Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com>
Reviewed-by: Marty Connor <mdc@etherboot.org>
Tested-by: Marty Connor <mdc@etherboot.org>
Tested-by: Daniel Verkamp <daniel@drv.nu>

Signed-off-by: Marty Connor <mdc@etherboot.org>
2009-03-13 11:54:39 -04:00