summaryrefslogtreecommitdiffstats
path: root/src/include
Commit message (Collapse)AuthorAgeFilesLines
* [process] Make it safe to call process_add() multiple timesMichael Brown2009-08-101-0/+1
|
* [infiniband] Handle duplicate Communication Management REPsMichael Brown2009-08-091-0/+3
| | | | | | | | | | | We will terminate our transaction as soon as we receive the first CM REP, since that provides all the state that we need. However, the peer may resend the REP if it didn't see our RTU, and if we don't respond with another RTU we risk being disconnected. (This protocol appears not to handle retries gracefully.) Fix by adding a management agent that will listen for these duplicate REPs and send back an RTU.
* [ath5k] Add support for non-802.11n Atheros wireless NICsJoshua Oreman2009-08-091-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [legal] Add MIT licence declarationJoshua Oreman2009-08-091-0/+10
| | | | Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [802.11] Fix maximum packet lengthJoshua Oreman2009-08-091-5/+13
| | | | | | | | | | | | | Previously the maximum packet length was computed using an erroneous understanding of the role of the MIC field in TKIP-encrypted packets. The field is actually considered to be part of the MSDU (encrypted and fragmented data), not the MPDU (container for each encrypted fragment). As such its size does not contribute to cryptographic overhead outside the data field's size limitations. The net result is that the previous maximum packet length value was 4 bytes too long; fix it to the correct value of 2352. Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [802.11] Enhance support for driver PHY differencesJoshua Oreman2009-08-091-6/+39
| | | | | | | | | | | | | | | | | 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>
* [infiniband] Update all other MAD users to use a management interfaceMichael Brown2009-08-096-76/+157
|
* [infiniband] Update subnet management agent to use a management interfaceMichael Brown2009-08-094-6/+28
|
* [infiniband] Add the concept of a management interfaceMichael Brown2009-08-093-1/+139
| | | | | | | | | A management interface is the component through which both local and remote management agents are accessed. This new implementation of a management interface allows for the user to react to timed-out transactions, and also allows for cancellation of in-progress transactions.
* [infiniband] Change IB_{QPN,QKEY,QPT} names from {SMA,GMA} to {SMI,GSI}Michael Brown2009-08-061-10/+10
| | | | | | | | | | 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.
* [sky2] Add support for Marvell Yukon-II gigabit Ethernet cardsJoshua Oreman2009-08-031-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [pci] Add definitions for Advanced Error Reporting registersJoshua Oreman2009-08-031-0/+27
| | | | Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [rtl818x] Add driver for Realtek 8180/8185 wireless cardsJoshua Oreman2009-08-011-0/+1
|
* [802.11] Add support for 802.11 devices with software MAC layerJoshua Oreman2009-08-014-0/+2177
| | | | | | | | | This is required for all modern 802.11 devices, and allows drivers to be written for them with minimally more effort than is required for a wired NIC. Signed-off-by: Michael Brown <mcb30@etherboot.org> Modified-by: Michael Brown <mcb30@etherboot.org>
* [infiniband] Add Communication Manager (CM)Michael Brown2009-07-183-0/+195
| | | | | The Communication Manager is responsible for handling the setup and teardown of RC connections.
* [infiniband] Add infrastructure for RC queue pairsMichael Brown2009-07-181-51/+63
| | | | | | | | | | | | | | | | | | 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().
* [infiniband] Pass a generic MAD to ib_set_port_info()Michael Brown2009-07-181-5/+3Star
|
* [infiniband] Expose supported and enabled link speeds and widthsMichael Brown2009-07-181-4/+12
|
* [infiniband] Allow MAD handlers to indicate response via return valueMichael Brown2009-07-181-9/+4Star
| | | | | | | | Now that MAD handlers no longer return a status code, we can allow them to return a pointer to a MAD structure if and only if they want to send a response. This provides a more natural and flexible approach than using a "response method" field within the handler's descriptor.
* [infiniband] Remove the return status code from MAD handlersMichael Brown2009-07-181-2/+1Star
| | | | | | | | | | | | | MAD handlers have to set the status fields within the MAD itself anyway, in order to provide a meaningful response MAD; the additional gPXE return status code is just noise. Note that we probably don't need to ever explicitly set the status to IB_MGMT_STATUS_OK, since it should already have this value from the request. (By not explicitly setting the status in this way, we can safely have ib_sma_set_xxx() call ib_sma_get_xxx() in order to generate the GetResponse MAD without worrying that ib_sma_get_xxx() will clear any error status set by ib_sma_set_xxx().)
* [infiniband] Allow external QPN to differ from real QPNMichael Brown2009-07-181-1/+8
| | | | | | | Most IB hardware seems not to allow allocation of the genuine QPNs 0 and 1, so allow for the externally-visible QPN (as constructed and parsed by ib_packet, where used) to differ from the real hardware-allocated QPN.
* [infiniband] Always create an SMA and a GMAMichael Brown2009-07-183-33/+7Star
|
* [infiniband] Add notion of a queue pair typeMichael Brown2009-07-182-4/+15
|
* [infiniband] Implement SMA as an instance of a GMAMichael Brown2009-07-184-39/+21Star
| | | | | The GMA code was based upon the SMA code. We can save space by making the SMA simply an instance of the GMA.
* [infiniband] Pass GMA as a parameter to GMA MAD handlersMichael Brown2009-07-181-8/+9
|
* [ipoib] Remove the queue set abstractionMichael Brown2009-07-181-31/+0Star
| | | | | Now that IPoIB has to deal with only one set of queues, the queue set abstraction becomes merely an inconvenient wrapper.
* [infiniband] Provide a general mechanism for multicast group joinsMichael Brown2009-07-183-0/+22
| | | | Generalise out the multicast group membership record code from IPoIB.
* [infiniband] Allow for sending MADs via GMA without retransmissionMichael Brown2009-07-181-1/+1
|
* [infiniband] Provide a general mechanism for path record lookupsMichael Brown2009-07-182-0/+18
| | | | Generalise out the path record lookup code from IPoIB.
* [infiniband] Create a general management agentMichael Brown2009-07-184-0/+91
| | | | | | Generalise the subnet management agent into a general management agent capable of sending and responding to MADs, including support for retransmissions as necessary.
* [infiniband] Centralise SMA and GMA queue constantsMichael Brown2009-07-182-11/+14
|
* [infiniband] Poll completion queues automaticallyMichael Brown2009-07-183-18/+11Star
| | | | | | | | | | | | | | | | | 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.
* [infiniband] Centralise assumption of 2048-byte payloadsMichael Brown2009-07-184-10/+9Star
| | | | | | | | | | 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.)
* [infiniband] Provide ib_get_hca_info() as a commonly-available functionMichael Brown2009-07-182-3/+5
|
* [infiniband] Split queue set functionality out of ipoib.c to ib_qset.cMichael Brown2009-07-182-0/+39
|
* [netdevice] Make ll_broadcast per-netdevice rather than per-ll_protocolMichael Brown2009-07-183-43/+4Star
| | | | | | | | | 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.
* [ata] Make ATA command issuing partially asynchronousMichael Brown2009-07-182-0/+3
| | | | | | | | | 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.
* [scsi] Make SCSI command issuing partially asynchronousMichael Brown2009-07-182-9/+7Star
| | | | | 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.
* [ifmgmt] Move ifmgmt_cmd.h to include/hciMichael Brown2009-06-281-0/+30
|
* [pxe] Improve pxe_undi debug messagesMichael Brown2009-06-271-0/+1
| | | | | | | | The PXE debugging messages have remained pretty much unaltered since Etherboot 5.4, and are now difficult to read in comparison to most of the rest of gPXE. Bring the pxe_undi debug messages up to normal gPXE standards.
* [netdevice] Add mechanism for reporting detailed link status codesMichael Brown2009-06-241-8/+13
| | | | | | | | Expand the NETDEV_LINK_UP bit into a link_rc status code field, allowing specific reasons for link failure to be reported via "ifstat". Originally-authored-by: Joshua Oreman <oremanj@rwcr.net>
* [netdevice] Adjust maximum link-layer header length for 802.11Joshua Oreman2009-06-231-4/+5
| | | | Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [netdevice] Add netdev argument to link-layer push and pull handlersJoshua Oreman2009-06-231-4/+8
| | | | | | | | | | | | | | | 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>
* [nvs] Add init function for Atmel 93C66 EEPROMJoshua Oreman2009-06-231-0/+13
| | | | | | | | The 93C66 is identical to the 93C56 in programming interface and addressing, but twice as large in data storage (4096 bits). It's used in some RTL8185 wireless cards. Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [tcp] Improve robustness in the presence of duplicated received packetsMichael Brown2009-06-231-0/+10
| | | | | | | | | | | | | | | | | | | | | | gPXE responds to duplicated ACKs with an immediate retransmission, which can lead to a sorceror's apprentice syndrome. It also responds to out-of-range (or old duplicate) ACKs with a RST, which can cause valid connections to be dropped. Fix the sorceror's apprentice syndrome by leaving the retransmission timer running (and so inhibiting the immediate retransmission) when we receive a potential duplicate ACK. This seems to match the behaviour of Linux observed via wireshark traces. Fix the RST issue by sending RST only on out-of-range ACKs that occur before the connection is fully established, as per RFC 793. These problems were exposed during development of the 802.11 wireless link layer; the 802.11 protocol has a failure mode that can easily cause duplicated packets. The fixes were tested in a controlled way by faking large numbers of duplicated packets in the rtl8139 driver. Originally-fixed-by: Joshua Oreman <oremanj@rwcr.net>
* [netdevice] Fix incorrect value for MAX_LL_HEADER_LENMichael Brown2009-06-051-3/+11
| | | | | | | | | | MAX_LL_HEADER_LEN is erroneously set to 6 rather than 14, resulting in possible data corruption whenever we send an ARP packet. Fix value and add a comment explaining why MAX_LL_ADDR_LEN is greater than MAX_LL_HEADER_LEN. Reported-by: Joshua Oreman <oremanj@rwcr.net>
* [script] Allow for DOS-style line endings in scriptsMichael Brown2009-06-031-0/+2
| | | | | | | | | | | | | | | Windows text editors such as Notepad tend to use CRLF line endings, which breaks gPXE's signature detection for script images. Since scripts are usually very small, they end up falling back to being detected as valid PXE executable images (since there are no signature checks for PXE executables). Executing text files as x86 machine code tends not to work well. Fix by allowing for any isspace() character to terminate the "#!gpxe" signature, and by ensuring that CR characters get stripped during command line parsing. Suggested-by: Shao Miller <Shao.Miller@yrdsb.edu.on.ca>
* [misc] Remove long-obsolete header files dating from Etherboot 5.4Michael Brown2009-06-032-70/+0Star
|
* [misc] Fix source files erroneously marked as executableMichael Brown2009-06-021-0/+0
|
* [spi] Add address-length autodetection to the SPI bit-bashing codeMichael Brown2009-05-282-0/+9
| | | | | | | | | | | 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>