]> git.ipfire.org Git - thirdparty/ipxe.git/log
thirdparty/ipxe.git
14 years ago[forcedeth] Exit poll() as early as possible if no work to do
Michael Brown [Thu, 11 Nov 2010 23:57:10 +0000 (23:57 +0000)] 
[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>
14 years ago[tcp] Set PSH flag only on packets containing data
Michael Brown [Thu, 11 Nov 2010 01:14:05 +0000 (01:14 +0000)] 
[tcp] Set PSH flag only on packets containing data

Suggested-by: Yelena Kadach <klenusik@hotmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[list] Fix typographical error from previous commit
Shao Miller [Tue, 9 Nov 2010 02:11:32 +0000 (02:11 +0000)] 
[list] Fix typographical error from previous commit

Fix typographical error from commit ea631f6 ("[list] Add
list_first_entry()").  The symptom was PXELINUX 3.86 causing a stack
overflow under VMware.

Tested-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fc] Add support for Fibre Channel name server lookups
Michael Brown [Thu, 4 Nov 2010 03:31:15 +0000 (03:31 +0000)] 
[fc] Add support for Fibre Channel name server lookups

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fc] Hold ULP's peer reference while ULP exists
Michael Brown [Fri, 5 Nov 2010 23:13:22 +0000 (23:13 +0000)] 
[fc] Hold ULP's peer reference while ULP exists

Allow fc_ulp_decrement() to guarantee to fc_peer_decrement() that the
peer reference remains valid for the duration of the call, by ensuring
that ulp->peer remains valid while ulp is valid.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fc] Allow peers and ULPs to log out when usage count reaches zero
Michael Brown [Fri, 5 Nov 2010 05:50:08 +0000 (05:50 +0000)] 
[fc] Allow peers and ULPs to log out when usage count reaches zero

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fc] Hold reference to peers and ULPs while calling fc_link_examine()
Michael Brown [Thu, 4 Nov 2010 03:28:29 +0000 (03:28 +0000)] 
[fc] Hold reference to peers and ULPs while calling fc_link_examine()

Allow link examination methods to safely assume that their
self-reference remains valid for the duration of the method call.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fc] Log out correct port ID after a successful LOGO request
Michael Brown [Fri, 5 Nov 2010 04:18:17 +0000 (04:18 +0000)] 
[fc] Log out correct port ID after a successful LOGO request

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fc] Support Fibre Channel ECHO
Michael Brown [Thu, 4 Nov 2010 02:49:07 +0000 (02:49 +0000)] 
[fc] Support Fibre Channel ECHO

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fcp] Use EINVAL for URI parsing errors and EPROTO for protocol errors
Michael Brown [Fri, 5 Nov 2010 04:09:29 +0000 (04:09 +0000)] 
[fcp] Use EINVAL for URI parsing errors and EPROTO for protocol errors

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[retry] Process at most one timer's expiry in each call to retry_step()
Michael Brown [Mon, 8 Nov 2010 03:06:14 +0000 (03:06 +0000)] 
[retry] Process at most one timer's expiry in each call to retry_step()

Calling a timer's expiry method may cause arbitrary consequences,
including arbitrary modifications of the list of retry timers.
list_for_each_entry_safe() guards against only deletion of the current
list entry; it provides no protection against other list
modifications.  In particular, if a timer's expiry method causes the
subsequent timer in the list to be deleted, then the next loop
iteration will access a timer that may no longer exist.

This is a particularly nasty bug, since absolutely none of the
list-manipulation or reference-counting assertion checks will be
triggered.  (The first assertion failure happens on the next iteration
through list_for_each_entry(), showing that the list has become
corrupted but providing no clue as to when this happened.)

Fix by stopping traversal of the list of retry timers as soon as we
hit an expired timer.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[malloc] Avoid immediately clobbering reference count when freeing memory
Michael Brown [Fri, 5 Nov 2010 22:37:00 +0000 (22:37 +0000)] 
[malloc] Avoid immediately clobbering reference count when freeing memory

Rearrange the fields in struct memory_block (without altering
MIN_MEMBLOCK_SIZE) so that the "count" field of a reference-counted
object is left intact when the memory containing the object is freed.
This allows for the possibility of detecting reference-counting errors
such as double-freeing.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[refcnt] Check reference validity on each use of ref_get() and ref_put()
Michael Brown [Fri, 5 Nov 2010 22:24:46 +0000 (22:24 +0000)] 
[refcnt] Check reference validity on each use of ref_get() and ref_put()

Check that the reference count is valid (i.e. non-negative) on each
call to ref_get() and ref_put(), using an assert() at the point of
use.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[malloc] Use list_for_each_entry_safe() when we may delete a list entry
Michael Brown [Sat, 6 Nov 2010 00:31:02 +0000 (00:31 +0000)] 
[malloc] Use list_for_each_entry_safe() when we may delete a list entry

free_memblock() currently uses list_for_each_entry() to iterate over
the free list, and may delete an entry over which it iterates.  While
there is no way that the deleted list entry could be overwritten
before we reference it, this does rely upon list_del() leaving the
"next" pointer intact, which is not guaranteed.  Discovered while
tracking down a list-corruption bug (as a result of having modified
list_del() to sanitise the deleted list entry).

Fix by using list_for_each_entry_safe().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[list] Add list_first_entry()
Michael Brown [Mon, 8 Nov 2010 02:51:18 +0000 (02:51 +0000)] 
[list] Add list_first_entry()

There are several points in the iPXE codebase where
list_for_each_entry() is (ab)used to extract only the first entry from
a list.  Add a macro list_first_entry() to make this code easier to
read.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[list] Extend list-manipulation assertions to all list-handling functions
Michael Brown [Fri, 5 Nov 2010 23:49:12 +0000 (23:49 +0000)] 
[list] Extend list-manipulation assertions to all list-handling functions

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[process] Include step() function pointer in process debugging messages
Michael Brown [Sun, 7 Nov 2010 18:51:15 +0000 (18:51 +0000)] 
[process] Include step() function pointer in process debugging messages

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fcp] Avoid quoting exchange ID before exchange is created
Michael Brown [Wed, 3 Nov 2010 01:55:53 +0000 (01:55 +0000)] 
[fcp] Avoid quoting exchange ID before exchange is created

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fcp] Fix potential memory leaks on error paths
Michael Brown [Wed, 3 Nov 2010 01:48:38 +0000 (01:48 +0000)] 
[fcp] Fix potential memory leaks on error paths

Functions that instantiate objects generally own one reference to the
object being created.  The error paths must therefore usually call
ref_put() to release this reference.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[build] Add FreeBSD location for isolinux
Michael Brown [Tue, 2 Nov 2010 23:19:15 +0000 (23:19 +0000)] 
[build] Add FreeBSD location for isolinux

Reported-by: Jedrzej Kalinowski <kalinoj1@iem.pw.edu.pl>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[romprefix] Add missing addr32 prefix
Michael Brown [Fri, 29 Oct 2010 00:45:21 +0000 (01:45 +0100)] 
[romprefix] Add missing addr32 prefix

Reported-by: Jedrzej Kalinowski <kalinoj1@iem.pw.edu.pl>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[autoboot] Introduce "skip-san-boot" option
Dave Hansen [Thu, 21 Oct 2010 22:03:42 +0000 (15:03 -0700)] 
[autoboot] Introduce "skip-san-boot" option

For some install-to-SAN scenarios, the OS needs to be able to reboot
to reread the partition table.  On this second boot attempt, the SAN
disk will not be empty and so iPXE will attempt to boot from it,
rather than falling back to the OS' installation media.

Work around this problem by introducing the "skip-san-boot" option,
similar in spirit to "keep-san".

Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[autoboot] Improve visibility of error messages
Michael Brown [Thu, 21 Oct 2010 22:33:41 +0000 (23:33 +0100)] 
[autoboot] Improve visibility of error messages

Improve the visibility of error messages by removing the redundant
final printing of the URL being booted.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[scsi] Wait for a successful TEST UNIT READY command
Michael Brown [Sat, 16 Oct 2010 12:53:38 +0000 (13:53 +0100)] 
[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>
14 years ago[fc] Do not use the command reference number in FCP_CMND IUs
Michael Brown [Tue, 19 Oct 2010 17:35:46 +0000 (18:35 +0100)] 
[fc] Do not use the command reference number in FCP_CMND IUs

The FCP command reference number is intended to be used for
controlling precise delivery of FCP commands, rather than being an
essentially arbitrary tag field (as with iSCSI and SRP).

Use the Fibre Channel local exchange ID as the tag for FCP commands,
instead of the FCP command reference.  The local exchange ID does not
appear within the FCP IU itself, but does appear within the FC frame
header; debug traces can therefore still be correlated with packet
captures.

Reported-by: Hadar Hen Zion <hadarh@mellanox.co.il>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[hci] Use http://ipxe.org/<errno> instead of raw error numbers
Michael Brown [Tue, 19 Oct 2010 05:14:22 +0000 (06:14 +0100)] 
[hci] Use http://ipxe.org/<errno> instead of raw error numbers

Users tend to gloss over cryptic-looking error messages such as

  "Boot failed: Exec format error (Error 0x2e852001)"

In particular, users tend not to report the error number, which is the
single most useful piece of diagnostic information in an iPXE error
message.  Try replacing the "Error 0x2e852001" portion with a URL,
giving

  "Boot failed: Exec format error (http://ipxe.org/2e852001)"

in the hope that users will, upon seeing something that is
recognisably a URL, try viewing it in a web browser.  Such users will
be greeted by a web page containing a more detailed description of the
error (automatically generated from the einfo text), including links
to each line of code that might generate the error, and a section for
additional user-contributed notes.  At the time of writing, a user who
visits http://ipxe.org/2e852001 would see a note saying

  "This error usually indicates that the SAN disk is empty, and does
   not yet contain a bootable operating system."

which may be more useful than "Exec format error (Error 0x2e852001)".

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[contrib] Remove extraneous errcodedb files
Michael Brown [Tue, 19 Oct 2010 01:27:06 +0000 (02:27 +0100)] 
[contrib] Remove extraneous errcodedb files

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[int13] Dump out MBR at DBGLVL_EXTRA
Michael Brown [Mon, 18 Oct 2010 13:51:15 +0000 (14:51 +0100)] 
[int13] Dump out MBR at DBGLVL_EXTRA

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[iscsi] Ensure ISID is consistent within an iSCSI session
Michael Brown [Mon, 18 Oct 2010 13:37:11 +0000 (14:37 +0100)] 
[iscsi] Ensure ISID is consistent within an iSCSI session

Commit 5f4ab0d ("[iscsi] Randomise a portion of the ISID to force new
session instantiation") introduced a regression by randomising the
ISID on each call to iscsi_start_login(), which may be called more
than once per connection, rather than on each call to
iscsi_open_connection(), which is guaranteed to be called only once
per connection.  This is incorrect behaviour that causes our
connection to be rejected by some iSCSI targets (observed with a
COMSTAR target under OpenSolaris).

Fix by generating the ISID in iscsi_open_connection(), and storing the
randomised ISID as part of the session state.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[romprefix] Add missing FILE_LICENCE declaration to undiloader.S
Michael Brown [Mon, 18 Oct 2010 00:33:33 +0000 (01:33 +0100)] 
[romprefix] Add missing FILE_LICENCE declaration to undiloader.S

undiloader.S was originally part of romprefix.S, and so inherits its
licence.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[legal] Ignore config/local header files for licensing purposes
Michael Brown [Mon, 18 Oct 2010 00:24:02 +0000 (01:24 +0100)] 
[legal] Ignore config/local header files for licensing purposes

The config/local/*.h files are expected to be empty in most cases.
This should not cause a licence determination to fail.

Fix by ignoring config/local/*.h for licensing purposes.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[util] Update welcome message in ISO images
Michael Brown [Sun, 17 Oct 2010 22:55:53 +0000 (23:55 +0100)] 
[util] Update welcome message in ISO images

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[iscsi] Randomise a portion of the ISID to force new session instantiation
Michael Brown [Sat, 16 Oct 2010 21:11:08 +0000 (22:11 +0100)] 
[iscsi] Randomise a portion of the ISID to force new session instantiation

When a connection to an iSCSI target is broken without gracefully
closing the TCP socket, a subsequent connection attempt may fail
because the target believes that we are attempting session
reinstatement (see RFC3720 section 5.3.1).  This has been observed
using the Microsoft iSCSI target.

Section 9.1.1 of RFC3720 states that initiators should use a stable
ISID, however section 5.3.1 shows that the only way to explicitly
request that a new session be created is to use a new ISID.

Fix by randomising the "qualifier" portion of the ISID.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fc] Use port WWN rather than node WWN as the primary Fibre Channel name
Michael Brown [Fri, 15 Oct 2010 00:06:08 +0000 (01:06 +0100)] 
[fc] Use port WWN rather than node WWN as the primary Fibre Channel name

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fcoe] Request SPMA iff FIP advertisement indicates support for SPMA
Michael Brown [Thu, 14 Oct 2010 22:56:28 +0000 (23:56 +0100)] 
[fcoe] Request SPMA iff FIP advertisement indicates support for SPMA

We currently set both the FP and SP bits in our FIP FLOGI, to allow
the FCF the choice of selecting either a fabric-provided or a server-
provided MAC address.  This complies with the FCoE specification, but
has been observed to result in an FLOGI rejection from some FCFs.

Fix by recording whether or not the FCF supports SPMA, and requesting
only one of FPMA or SPMA in our FIP FLOGI.  We choose to prefer SPMA
where available, because many iPXE drivers will not be able to receive
unicast packets sent to a non-default MAC address.

Reported-by: Hadar Hen Zion <hadarh@mellanox.co.il>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[build] Fix building elf2efi using binutils 2.20
Michael Brown [Thu, 14 Oct 2010 21:59:37 +0000 (22:59 +0100)] 
[build] Fix building elf2efi using binutils 2.20

When using binutils 2.20, it seems to be necessary to add -ldl to link
against -lbfd.

Reported-by: Duane Voth <duanev@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[linux] Fix building on RHEL5 and similar platforms
Michael Brown [Mon, 11 Oct 2010 01:24:39 +0000 (02:24 +0100)] 
[linux] Fix building on RHEL5 and similar platforms

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[dhcp] Include session state metadata in packet traces
Michael Brown [Sat, 9 Oct 2010 00:24:18 +0000 (01:24 +0100)] 
[dhcp] Include session state metadata in packet traces

(Ab)use the "secs" field in transmitted DHCP packets to convey
metadata about the DHCP session state.  In particular:

  bit 0 represents the receipt of a ProxyDHCPOFFER
  bit 1 represents the receipt of a DHCPOFFER
  bits 2+ represent the transmitted packet sequence number

This allows some relevant information about the internal state of the
DHCP session to be read out from a packet trace from a non-debug build
of iPXE.  It also potentially allows replies to be correlated to their
requests (for servers that copy the "secs" field from request to
reply).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[dhcp] Omit ProxyDHCPREQUEST if PXE options are present in ProxyDHCPOFFER
Michael Brown [Fri, 8 Oct 2010 00:29:39 +0000 (01:29 +0100)] 
[dhcp] Omit ProxyDHCPREQUEST if PXE options are present in ProxyDHCPOFFER

Some ProxyDHCP implementations seem to violate the PXE specification
by expecting the client to retain options from the ProxyDHCPOFFER
rather than issuing a separate ProxyDHCPREQUEST.

Work around such broken clients by retaining the ProxyDHCPOFFER
packet, and proceeding to a ProxyDHCPREQUEST only if the
ProxyDHCPOFFER does not already contain PXE options.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[dhcp] Ignore DHCPACKs containing incorrect IP addresses
Michael Brown [Fri, 24 Sep 2010 03:45:29 +0000 (04:45 +0100)] 
[dhcp] Ignore DHCPACKs containing incorrect IP addresses

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[dhcp] Revert various patches
Michael Brown [Fri, 24 Sep 2010 03:41:21 +0000 (04:41 +0100)] 
[dhcp] Revert various patches

A recent patch series breaks compatibility with various common DHCP
implementations.

Revert "[dhcp] Don't consider invalid offers to be duplicates"
This reverts commit 905ea567534bbb67b83b2be41bfcd42209681e6a.

Revert "[dhcp] Honor PXEBS_SKIP option in discovery control"
This reverts commit 620b98ee4b9d8fa87c56bfa72b4391c1eed9dce6.

Revert "[dhcp] Keep multiple DHCP offers received, and use them intelligently"
This reverts commit 5efc2fcb602864e82de2cd7414e3828f589034e5.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[rtl8139] Operate in promiscuous mode
Michael Brown [Thu, 7 Oct 2010 15:23:09 +0000 (16:23 +0100)] 
[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>
14 years ago[fcoe] Add support for the FCoE Initialization Protocol (FIP)
Michael Brown [Thu, 7 Oct 2010 15:21:56 +0000 (16:21 +0100)] 
[fcoe] Add support for the FCoE Initialization Protocol (FIP)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fc] Update ELS port IDs when receiving an ELS frame
Michael Brown [Thu, 7 Oct 2010 15:19:00 +0000 (16:19 +0100)] 
[fc] Update ELS port IDs when receiving an ELS frame

The port ID assigned by the FLOGI response is implicit in the
destination ID used for the response (which will differ from the
source ID used for the corresponding request).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fc] Include port IDs in metadata for received Fibre Channel frames
Michael Brown [Thu, 7 Oct 2010 12:17:52 +0000 (13:17 +0100)] 
[fc] Include port IDs in metadata for received Fibre Channel frames

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[netdevice] Pass both link-layer addresses in net_tx() and net_rx()
Michael Brown [Thu, 7 Oct 2010 15:03:16 +0000 (16:03 +0100)] 
[netdevice] Pass both link-layer addresses in net_tx() and net_rx()

FCoE requires the use of fabric-provided MAC addresses, which breaks
the assumption that the net device's MAC address is implicitly the
source address for net_tx() and the (unicast) destination address for
net_rx().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[int13] Fix typo in debug message
Michael Brown [Wed, 22 Sep 2010 20:40:36 +0000 (21:40 +0100)] 
[int13] Fix typo in debug message

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[int13] Include disk signature in debugging output
Michael Brown [Wed, 22 Sep 2010 20:39:01 +0000 (21:39 +0100)] 
[int13] Include disk signature in debugging output

The disk signature is used by some OSes (notably Windows) to identify
the boot disk, so it's useful debugging information to have.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[infiniband] Include the SRP login rejection reason in the error number
Michael Brown [Wed, 22 Sep 2010 19:05:39 +0000 (20:05 +0100)] 
[infiniband] Include the SRP login rejection reason in the error number

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[libc] Ensure that error numbers from EUNIQ() have the correct type
Michael Brown [Wed, 22 Sep 2010 18:59:37 +0000 (19:59 +0100)] 
[libc] Ensure that error numbers from EUNIQ() have the correct type

Error numbers are signed ints.  EUNIQ() should not allow implicit type
promotion based on the supplied error diambiguator, because this
causes problems with statements such as

  rc = ( condition ? -EUNIQ ( EBASE, disambiguator ) : -EBASE );

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fcp] Add support for describing an FCP device using EDD
Michael Brown [Tue, 21 Sep 2010 23:44:27 +0000 (00:44 +0100)] 
[fcp] Add support for describing an FCP device using EDD

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[ata] Add support for describing an ATA device using EDD
Michael Brown [Tue, 21 Sep 2010 23:17:51 +0000 (00:17 +0100)] 
[ata] Add support for describing an ATA device using EDD

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fcoe] Add support for identifying the underlying hardware device
Michael Brown [Tue, 21 Sep 2010 23:43:55 +0000 (00:43 +0100)] 
[fcoe] Add support for identifying the underlying hardware device

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[infiniband] Add support for identifying the underlying hardware device
Michael Brown [Tue, 21 Sep 2010 23:28:36 +0000 (00:28 +0100)] 
[infiniband] Add support for identifying the underlying hardware device

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[aoe] Add support for identifying the underlying hardware device
Michael Brown [Tue, 21 Sep 2010 23:19:20 +0000 (00:19 +0100)] 
[aoe] Add support for identifying the underlying hardware device

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[int13] Add infrastructure to support EDD version 4.0
Michael Brown [Tue, 21 Sep 2010 23:12:23 +0000 (00:12 +0100)] 
[int13] Add infrastructure to support EDD version 4.0

Support the extensions mandated by EDD 4.0, including:

 o  the ability to specify a flat physical address in a disk address
    packet,

 o  the ability to specify a sector count greater than 127 in a disk
    address packet,

 o  support for all functions within the Fixed Disk Access and EDD
    Support subsets,

 o  the ability to describe a device using EDD Device Path Information.

This implementation is based on draft revision 3 of the EDD 4.0
specification, with reference to the EDD 3.0 specification.  It is
possible that this implementation may need to change in order to
conform to the final published EDD 4.0 specification.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[aoe] Fail immediately when network device is closed
Michael Brown [Tue, 21 Sep 2010 23:20:31 +0000 (00:20 +0100)] 
[aoe] Fail immediately when network device is closed

Avoid a tedious timeout delay when attempting to issue a command over
a network device that has been closed.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[contrib] Allow "cow" script to create the SAN device itself
Michael Brown [Wed, 22 Sep 2010 15:40:06 +0000 (16:40 +0100)] 
[contrib] Allow "cow" script to create the SAN device itself

Allow for an invocation pattern such as:

  ./cow /path/to/image/file vblade 1 2 eth0

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[contrib] Add script to easily create copy-on-write SAN images
Michael Brown [Wed, 22 Sep 2010 15:14:09 +0000 (16:14 +0100)] 
[contrib] Add script to easily create copy-on-write SAN images

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[contrib] Add contrib/vm, containing utilities from old contrib/bochs
Michael Brown [Wed, 22 Sep 2010 13:19:25 +0000 (14:19 +0100)] 
[contrib] Add contrib/vm, containing utilities from old contrib/bochs

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[settings] Modify "set" command to allow space separated values
Michael Brown [Tue, 21 Sep 2010 13:54:07 +0000 (14:54 +0100)] 
[settings] Modify "set" command to allow space separated values

Allow multiple, space separated values (such as kernel arguments,
passed via DHCP) to be assigned to an identifier using the "set"
command.

Originally-implemented-by: Aaron Brooks <aaron@brooks1.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[hermon] Add support for dual-protocol devices
Michael Brown [Sun, 19 Sep 2010 16:35:25 +0000 (17:35 +0100)] 
[hermon] Add support for dual-protocol devices

Originally-implemented-by: Itay Gazit <itaygazit@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[hermon] Add infrastructure for Ethernet devices
Itay Gazit [Wed, 2 Dec 2009 22:41:09 +0000 (00:41 +0200)] 
[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>
14 years ago[hermon] Use SET_PORT to set port parameters
Michael Brown [Sun, 19 Sep 2010 17:20:20 +0000 (18:20 +0100)] 
[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>
14 years ago[infiniband] Add the notion of an Ethernet queue pair type
Michael Brown [Sun, 19 Sep 2010 16:35:53 +0000 (17:35 +0100)] 
[infiniband] Add the notion of an Ethernet queue pair type

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[infiniband] Avoid leaving uninitialised lists in struct ib_device
Michael Brown [Sun, 19 Sep 2010 15:46:37 +0000 (16:46 +0100)] 
[infiniband] Avoid leaving uninitialised lists in struct ib_device

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fc] Ignore fabric-assigned port ID for fabricless implicit logouts
Michael Brown [Tue, 21 Sep 2010 00:05:33 +0000 (01:05 +0100)] 
[fc] Ignore fabric-assigned port ID for fabricless implicit logouts

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fc] Allow FLOGI response to be sent to newly-assigned peer port ID
Michael Brown [Mon, 20 Sep 2010 23:55:14 +0000 (00:55 +0100)] 
[fc] Allow FLOGI response to be sent to newly-assigned peer port ID

The response to a received FLOGI should probably be sent to the peer
port ID assigned as a result of the WWPN comparison.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[lotest] Add loopback testing commands
Michael Brown [Mon, 20 Sep 2010 12:04:17 +0000 (13:04 +0100)] 
[lotest] Add loopback testing commands

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[hermon] Tidy up ICM allocations
Michael Brown [Sat, 18 Sep 2010 22:39:33 +0000 (23:39 +0100)] 
[hermon] Tidy up ICM allocations

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[hermon] Minimise the number of VPM mapping operations
Michael Brown [Sat, 18 Sep 2010 21:37:54 +0000 (22:37 +0100)] 
[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>
14 years ago[arbel] Minimise the number of VPM mapping operations
Michael Brown [Sat, 18 Sep 2010 21:37:54 +0000 (22:37 +0100)] 
[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>
14 years ago[fc] Maintain port, peer and ULP lists in order of creation
Michael Brown [Sat, 18 Sep 2010 12:23:58 +0000 (13:23 +0100)] 
[fc] Maintain port, peer and ULP lists in order of creation

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[arbel] Allocate only as much memory as is needed for firmware and ICM
Michael Brown [Fri, 17 Sep 2010 23:57:09 +0000 (00:57 +0100)] 
[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>
14 years ago[arbel] Synchronise changes with the Hermon driver
Michael Brown [Fri, 17 Sep 2010 04:04:39 +0000 (05:04 +0100)] 
[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>
14 years ago[arbel] Optimise ICM layout to reduce overall memory usage
Michael Brown [Fri, 17 Sep 2010 19:53:29 +0000 (20:53 +0100)] 
[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>
14 years ago[arbel] Perform ICM allocations according to the specification
Michael Brown [Fri, 17 Sep 2010 03:56:23 +0000 (04:56 +0100)] 
[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>
14 years ago[arbel] Allow for multiple calls to ib_modify_qp()
Michael Brown [Fri, 17 Sep 2010 02:59:40 +0000 (03:59 +0100)] 
[arbel] Allow for multiple calls to ib_modify_qp()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[arbel] Inform embedded SMA of partition key changes
Michael Brown [Fri, 17 Sep 2010 02:38:12 +0000 (03:38 +0100)] 
[arbel] Inform embedded SMA of partition key changes

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[arbel] Improve debugging output and facilities
Michael Brown [Fri, 17 Sep 2010 02:30:28 +0000 (03:30 +0100)] 
[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>
14 years ago[arbel] Randomise the high-order bits of queue pair numbers
Michael Brown [Sat, 17 Jul 2010 08:41:32 +0000 (09:41 +0100)] 
[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>
14 years ago[arbel] Allow software GMA to receive packets destined for QP1
Michael Brown [Fri, 16 Jul 2010 12:48:20 +0000 (13:48 +0100)] 
[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>
14 years ago[arbel] Map all event types to our event queue
Michael Brown [Thu, 16 Sep 2010 21:06:20 +0000 (22:06 +0100)] 
[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>
14 years ago[hermon] Map all event types to our event queue
Michael Brown [Thu, 16 Sep 2010 21:06:20 +0000 (22:06 +0100)] 
[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>
14 years ago[infiniband] Add node GUID as distinct from the first port GUID
Michael Brown [Wed, 15 Sep 2010 22:10:15 +0000 (23:10 +0100)] 
[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>
14 years ago[arbel] Poll for link state changes while DOWN
Michael Brown [Thu, 16 Sep 2010 02:28:41 +0000 (03:28 +0100)] 
[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>
14 years ago[hermon] Poll for link state changes while DOWN
Michael Brown [Thu, 16 Sep 2010 02:28:41 +0000 (03:28 +0100)] 
[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>
14 years ago[infiniband] Always call ib_link_state_changed() in ib_smc_update()
Michael Brown [Thu, 16 Sep 2010 02:23:45 +0000 (03:23 +0100)] 
[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>
14 years ago[scsi] Include sense key within error number reported to user
Michael Brown [Wed, 15 Sep 2010 21:23:48 +0000 (22:23 +0100)] 
[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>
14 years ago[infiniband] Match GID/GUID terminology as used in the IBA
Michael Brown [Wed, 15 Sep 2010 18:25:05 +0000 (19:25 +0100)] 
[infiniband] Match GID/GUID terminology as used in the IBA

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[e1000] Strip the Ethernet CRC from received packets
Michael Brown [Wed, 15 Sep 2010 04:06:51 +0000 (05:06 +0100)] 
[e1000] Strip the Ethernet CRC from received packets

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fcoe] Disambiguate the various error cases and add a CRC failure message
Michael Brown [Wed, 15 Sep 2010 04:00:44 +0000 (05:00 +0100)] 
[fcoe] Disambiguate the various error cases and add a CRC failure message

It seems as though several drivers neglect to strip the Ethernet CRC,
which will cause the FCoE footer to be misplaced and result
(coincidentally) in an "invalid CRC" error from FCoE.

Add a human-visible message indicating this, to aid in diagnosis.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[netdevice] Report network-layer errors via network device statistics
Michael Brown [Wed, 15 Sep 2010 03:56:28 +0000 (04:56 +0100)] 
[netdevice] Report network-layer errors via network device statistics

Errors generated by the network layer in response to received packets
are liable to be lost, since nothing systematically records these
errors and often the packets do not propagate far enough through the
stack to impact upon user-visible processes.

Improve this situation by recording network-layer errors in the
network device statistics.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fcoe] Add support for Fibre Channel over Ethernet
Michael Brown [Wed, 15 Sep 2010 02:10:27 +0000 (03:10 +0100)] 
[fcoe] Add support for Fibre Channel over Ethernet

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fcp] Add support for the Fibre Channel Protocol
Michael Brown [Wed, 15 Sep 2010 02:08:47 +0000 (03:08 +0100)] 
[fcp] Add support for the Fibre Channel Protocol

The Fibre Channel Protocol provides a mechanism for transporting SCSI
commands via a Fibre Channel fabric.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fc] Add Fibre Channel management commands
Michael Brown [Wed, 15 Sep 2010 02:06:50 +0000 (03:06 +0100)] 
[fc] Add Fibre Channel management commands

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fc] Add support for Fibre Channel devices
Michael Brown [Wed, 15 Sep 2010 01:57:07 +0000 (02:57 +0100)] 
[fc] Add support for Fibre Channel devices

Add support for Fibre Channel ports, peers, and upper-layer protocols,
and for Fibre Channel extended link services.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[block] Replace gPXE block-device API with an iPXE asynchronous interface
Michael Brown [Fri, 3 Sep 2010 15:11:51 +0000 (16:11 +0100)] 
[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>
14 years ago[hermon] Use correct alignment for doorbell records
Michael Brown [Sun, 12 Sep 2010 18:11:59 +0000 (19:11 +0100)] 
[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>
14 years ago[hermon] Set event queue number for completion queues
Michael Brown [Sun, 12 Sep 2010 16:35:35 +0000 (17:35 +0100)] 
[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>