summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [settings] Modify "set" command to allow space separated valuesMichael Brown2010-09-211-5/+25
| | | | | | | | | 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>
* [hermon] Add support for dual-protocol devicesMichael Brown2010-09-214-2656/+712Star
| | | | | Originally-implemented-by: Itay Gazit <itaygazit@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [hermon] Add infrastructure for Ethernet devicesItay Gazit2010-09-212-8/+156
| | | | | | | | 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>
* [hermon] Use SET_PORT to set port parametersMichael Brown2010-09-212-23/+89
| | | | | | | 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>
* [infiniband] Add the notion of an Ethernet queue pair typeMichael Brown2010-09-213-1/+9
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Avoid leaving uninitialised lists in struct ib_deviceMichael Brown2010-09-211-0/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fc] Ignore fabric-assigned port ID for fabricless implicit logoutsMichael Brown2010-09-211-2/+3
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fc] Allow FLOGI response to be sent to newly-assigned peer port IDMichael Brown2010-09-214-5/+50
| | | | | | | 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>
* [lotest] Add loopback testing commandsMichael Brown2010-09-216-0/+344
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [hermon] Tidy up ICM allocationsMichael Brown2010-09-192-91/+86Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [hermon] Minimise the number of VPM mapping operationsMichael Brown2010-09-191-7/+39
| | | | | | | | | 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>
* [arbel] Minimise the number of VPM mapping operationsMichael Brown2010-09-192-50/+129
| | | | | | | | | 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>
* [fc] Maintain port, peer and ULP lists in order of creationMichael Brown2010-09-181-3/+3
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [arbel] Allocate only as much memory as is needed for firmware and ICMMichael Brown2010-09-181-26/+66
| | | | | | | | 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>
* [arbel] Synchronise changes with the Hermon driverMichael Brown2010-09-172-38/+70
| | | | | | | | | | | | | 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>
* [arbel] Optimise ICM layout to reduce overall memory usageMichael Brown2010-09-172-75/+136
| | | | | | | | | | 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>
* [arbel] Perform ICM allocations according to the specificationMichael Brown2010-09-172-44/+87
| | | | | | | | | | | 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>
* [arbel] Allow for multiple calls to ib_modify_qp()Michael Brown2010-09-172-22/+44
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [arbel] Inform embedded SMA of partition key changesMichael Brown2010-09-171-5/+5
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [arbel] Improve debugging output and facilitiesMichael Brown2010-09-172-71/+164
| | | | | | | | | | | 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>
* [arbel] Randomise the high-order bits of queue pair numbersMichael Brown2010-09-172-6/+10
| | | | | | | 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>
* [arbel] Allow software GMA to receive packets destined for QP1Michael Brown2010-09-173-96/+336
| | | | | | | | | | 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>
* [arbel] Map all event types to our event queueMichael Brown2010-09-172-5/+21
| | | | | | | | | | | | | 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>
* [hermon] Map all event types to our event queueMichael Brown2010-09-162-5/+21
| | | | | | | | | | | | | 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>
* [infiniband] Add node GUID as distinct from the first port GUIDMichael Brown2010-09-167-48/+90
| | | | | | | | | | | | | | | 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>
* [arbel] Poll for link state changes while DOWNMichael Brown2010-09-161-0/+9
| | | | | | | 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>
* [hermon] Poll for link state changes while DOWNMichael Brown2010-09-161-0/+9
| | | | | | | 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>
* [infiniband] Always call ib_link_state_changed() in ib_smc_update()Michael Brown2010-09-164-16/+46
| | | | | | | | | | | | | | 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>
* [scsi] Include sense key within error number reported to userMichael Brown2010-09-152-1/+65
| | | | | | | 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>
* [infiniband] Match GID/GUID terminology as used in the IBAMichael Brown2010-09-1522-205/+186Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [e1000] Strip the Ethernet CRC from received packetsMichael Brown2010-09-151-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fcoe] Disambiguate the various error cases and add a CRC failure messageMichael Brown2010-09-151-4/+29
| | | | | | | | | | 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>
* [netdevice] Report network-layer errors via network device statisticsMichael Brown2010-09-151-2/+7
| | | | | | | | | | | | 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>
* [fcoe] Add support for Fibre Channel over EthernetMichael Brown2010-09-157-0/+467
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fcp] Add support for the Fibre Channel ProtocolMichael Brown2010-09-156-0/+1181
| | | | | | | The Fibre Channel Protocol provides a mechanism for transporting SCSI commands via a Fibre Channel fabric. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fc] Add Fibre Channel management commandsMichael Brown2010-09-155-0/+352
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fc] Add support for Fibre Channel devicesMichael Brown2010-09-156-0/+3844
| | | | | | | 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>
* [block] Replace gPXE block-device API with an iPXE asynchronous interfaceMichael Brown2010-09-1447-2997/+4774
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* [hermon] Use correct alignment for doorbell recordsMichael Brown2010-09-122-11/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* [hermon] Set event queue number for completion queuesMichael Brown2010-09-121-0/+1
| | | | | | | | 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>
* [hermon] Improve debugging output and facilitiesMichael Brown2010-09-122-91/+180
| | | | | | | | | | | 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>
* [infiniband] Respond to CM disconnection requestsMichael Brown2010-09-122-68/+183
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Fix TID magic signatureMichael Brown2010-09-121-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Include SRP by default, but only for Infiniband buildsMichael Brown2010-09-123-3/+24
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ethernet] Include AoE only for Ethernet buildsMichael Brown2010-09-122-3/+23
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Remove unnecessary constraint on DBG_ENABLE()/DBG_DISABLE()Michael Brown2010-09-121-2/+2
| | | | | | | | | | | | | | DBG_ENABLE() and DBG_DISABLE() are currently constrained to enabling and disabling only debug levels that are compiled in for the current object. For example, a DBG_ENABLE(DBGLVL_EXTRA) in foo.c will not be able to affect output from other objects at DBGLVL_EXTRA unless foo.c is itself compiled with DBGLVL_EXTRA enabled. Partially fix by removing this unnecessary constraint. (Note that it is still necessary for at least one debug level to be compiled in for the object invoking DBG_ENABLE()/DBG_DISABLE().) Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [multiboot] Reduce length of "Features" startup bannerMichael Brown2010-09-121-1/+1
| | | | | | | Minimise the chances of an unwanted line wrap on the iPXE feature list printed at startup. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [retry] Add TIMER_INIT() for initialising static timersMichael Brown2010-09-061-0/+9
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [rtl8139] Check for oversized packets when transmittingMichael Brown2010-09-051-0/+8
| | | | | | | | | | | | | | | | 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>
* [xfer] Add xfer_window_changed()Michael Brown2010-09-052-0/+31
| | | | | | | | | xfer_window_changed() can be used to notify peers that an interface is now ready to accept data. This can potentially be used to eliminate the need for wasteful processes that simply poll xfer_window() until the window becomes non-zero. Signed-off-by: Michael Brown <mcb30@ipxe.org>