summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Brown2011-06-24 20:14:13 +0200
committerMichael Brown2011-06-28 15:45:13 +0200
commit69f5b2e8dc2bd756cc0aac21969b2bf683e94302 (patch)
tree4346352810ba8c3baf7971a86d18d724568635af /src
parent[tls] Eliminate polling while TX state machine is idle (diff)
downloadipxe-69f5b2e8dc2bd756cc0aac21969b2bf683e94302.tar.gz
ipxe-69f5b2e8dc2bd756cc0aac21969b2bf683e94302.tar.xz
ipxe-69f5b2e8dc2bd756cc0aac21969b2bf683e94302.zip
[int13] Provide a permanently closed window via the control interface
Allow objects to support both streaming and block device protocols, by starting streaming data only when the data transfer window opens. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src')
-rw-r--r--src/arch/i386/interface/pcbios/int13.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/arch/i386/interface/pcbios/int13.c b/src/arch/i386/interface/pcbios/int13.c
index b099958c..8ce77ada 100644
--- a/src/arch/i386/interface/pcbios/int13.c
+++ b/src/arch/i386/interface/pcbios/int13.c
@@ -1334,6 +1334,20 @@ static void int13_unhook_vector ( void ) {
}
/**
+ * Check INT13 emulated drive flow control window
+ *
+ * @v int13 Emulated drive
+ */
+static size_t int13_block_window ( struct int13_drive *int13 __unused ) {
+
+ /* We are never ready to receive data via this interface.
+ * This prevents objects that support both block and stream
+ * interfaces from attempting to send us stream data.
+ */
+ return 0;
+}
+
+/**
* Handle INT 13 emulated drive underlying block device closing
*
* @v int13 Emulated drive
@@ -1357,6 +1371,7 @@ static void int13_block_close ( struct int13_drive *int13, int rc ) {
/** INT 13 drive interface operations */
static struct interface_operation int13_block_op[] = {
+ INTF_OP ( xfer_window, struct int13_drive *, int13_block_window ),
INTF_OP ( intf_close, struct int13_drive *, int13_block_close ),
};