Browse Source

[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>
tags/v1.20.1
Michael Brown 13 years ago
parent
commit
69f5b2e8dc
1 changed files with 15 additions and 0 deletions
  1. 15
    0
      src/arch/i386/interface/pcbios/int13.c

+ 15
- 0
src/arch/i386/interface/pcbios/int13.c View File

1333
 				&int13_vector );
1333
 				&int13_vector );
1334
 }
1334
 }
1335
 
1335
 
1336
+/**
1337
+ * Check INT13 emulated drive flow control window
1338
+ *
1339
+ * @v int13		Emulated drive
1340
+ */
1341
+static size_t int13_block_window ( struct int13_drive *int13 __unused ) {
1342
+
1343
+	/* We are never ready to receive data via this interface.
1344
+	 * This prevents objects that support both block and stream
1345
+	 * interfaces from attempting to send us stream data.
1346
+	 */
1347
+	return 0;
1348
+}
1349
+
1336
 /**
1350
 /**
1337
  * Handle INT 13 emulated drive underlying block device closing
1351
  * Handle INT 13 emulated drive underlying block device closing
1338
  *
1352
  *
1357
 
1371
 
1358
 /** INT 13 drive interface operations */
1372
 /** INT 13 drive interface operations */
1359
 static struct interface_operation int13_block_op[] = {
1373
 static struct interface_operation int13_block_op[] = {
1374
+	INTF_OP ( xfer_window, struct int13_drive *, int13_block_window ),
1360
 	INTF_OP ( intf_close, struct int13_drive *, int13_block_close ),
1375
 	INTF_OP ( intf_close, struct int13_drive *, int13_block_close ),
1361
 };
1376
 };
1362
 
1377
 

Loading…
Cancel
Save