summaryrefslogtreecommitdiff
path: root/debian/patches/10_cdromlock.patch
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2012-09-23 01:31:48 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2012-09-23 01:31:48 +0000
commit4e80a3d1217fc3c3f2cc8dc0ecd09fd3c334a188 (patch)
tree325844e16b14928428d72c65acde232de7c85ff5 /debian/patches/10_cdromlock.patch
parent4f17023964a758848340c305ba6bd3b1956cf7d4 (diff)
New upstream snapshot
- patches/10_cdromlock.patch: Remove, merged upstream - patches/13_ide_dma.patch: Remove, merged upstream - patches/24_pci_irq_fix.patch: Remove, merged upstream
Diffstat (limited to 'debian/patches/10_cdromlock.patch')
-rw-r--r--debian/patches/10_cdromlock.patch93
1 files changed, 0 insertions, 93 deletions
diff --git a/debian/patches/10_cdromlock.patch b/debian/patches/10_cdromlock.patch
deleted file mode 100644
index 436f97c..0000000
--- a/debian/patches/10_cdromlock.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-Index: b/linux/dev/glue/block.c
-===================================================================
---- a/linux/dev/glue/block.c
-+++ b/linux/dev/glue/block.c
-@@ -789,6 +789,7 @@ static struct block_data *open_list;
- extern struct device_emulation_ops linux_block_emulation_ops;
-
- static io_return_t device_close (void *);
-+static io_return_t device_close_forced (void *, int);
-
- /* Return a send right for block device BD. */
- static ipc_port_t
-@@ -1164,6 +1165,7 @@ out:
- {
- ipc_kobject_set (bd->port, IKO_NULL, IKOT_NONE);
- ipc_port_dealloc_kernel (bd->port);
-+ *devp = IP_NULL;
- }
- kfree ((vm_offset_t) bd, sizeof (struct block_data));
- bd = NULL;
-@@ -1174,18 +1176,16 @@ out:
- bd->open_count = 1;
- bd->next = open_list;
- open_list = bd;
-+ *devp = &bd -> device;
- }
-
-- if (IP_VALID (reply_port))
-- ds_device_open_reply (reply_port, reply_port_type, err, dev_to_port (bd));
-- else if (! err)
-+ if (!IP_VALID (reply_port) && ! err)
- device_close (bd);
--
-- return MIG_NO_REPLY;
-+ return err;
- }
-
- static io_return_t
--device_close (void *d)
-+device_close_forced (void *d, int force)
- {
- struct block_data *bd = d, *bdp, **prev;
- struct device_struct *ds = bd->ds;
-@@ -1202,7 +1202,7 @@ device_close (void *d)
- }
- ds->busy = 1;
-
-- if (--bd->open_count == 0)
-+ if (force || --bd->open_count == 0)
- {
- /* Wait for pending I/O to complete. */
- while (bd->iocount > 0)
-@@ -1245,6 +1245,13 @@ device_close (void *d)
- return D_SUCCESS;
- }
-
-+static io_return_t
-+device_close (void *d)
-+{
-+ return device_close_forced (d, 0);
-+}
-+
-+
- #define MAX_COPY (VM_MAP_COPY_PAGE_LIST_MAX << PAGE_SHIFT)
-
- /* Check block BN and size COUNT for I/O validity
-@@ -1704,6 +1711,17 @@ device_get_status (void *d, dev_flavor_t
- return D_INVALID_OPERATION;
- }
-
-+
-+static void
-+device_no_senders (mach_no_senders_notification_t *ns)
-+{
-+ device_t dev;
-+
-+ dev = dev_port_lookup((ipc_port_t) ns->not_header.msgh_remote_port);
-+ assert(dev);
-+ device_close_forced (dev->emul_data, 1);
-+}
-+
- struct device_emulation_ops linux_block_emulation_ops =
- {
- NULL,
-@@ -1719,7 +1737,7 @@ struct device_emulation_ops linux_block_
- device_get_status,
- NULL,
- NULL,
-- NULL,
-+ device_no_senders,
- NULL,
- NULL
- };