[kernel] r13664 - in dists/lenny/linux-2.6/debian: . patches/features/all/xen patches/series
Ian Campbell
ijc-guest at alioth.debian.org
Thu May 21 06:22:42 UTC 2009
Author: ijc-guest
Date: Thu May 21 06:22:39 2009
New Revision: 13664
Log:
Add CDROM_GET_CAPABILITY ioctl to Xen blkfront driver.
Added:
dists/lenny/linux-2.6/debian/patches/features/all/xen/xen-blkfront-add-the-CDROM_GET_CAPABILITY-ioctl.patch
dists/lenny/linux-2.6/debian/patches/features/all/xen/xen-blkfront-make-blkif_ioctl-static.patch
Modified:
dists/lenny/linux-2.6/debian/changelog
dists/lenny/linux-2.6/debian/patches/series/16
Modified: dists/lenny/linux-2.6/debian/changelog
==============================================================================
--- dists/lenny/linux-2.6/debian/changelog Wed May 20 19:56:03 2009 (r13663)
+++ dists/lenny/linux-2.6/debian/changelog Thu May 21 06:22:39 2009 (r13664)
@@ -30,6 +30,7 @@
[ Ian Campbell ]
* [x86/xen] Apply missing syscall detection patch to -xen-amd64 image
(Closes: #527101)
+ * [xen] Add support for CDROM_GET_CAPABILITY to blkfront driver.
[ dann frazier ]
* [x86] fix IBM Summit based systems' phys_cpu_present_map on 32-bit
Added: dists/lenny/linux-2.6/debian/patches/features/all/xen/xen-blkfront-add-the-CDROM_GET_CAPABILITY-ioctl.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/lenny/linux-2.6/debian/patches/features/all/xen/xen-blkfront-add-the-CDROM_GET_CAPABILITY-ioctl.patch Thu May 21 06:22:39 2009 (r13664)
@@ -0,0 +1,79 @@
+commit 440a01a7f46742400c74d9d346118523e81d188b
+Author: Christian Limpach <Christian.Limpach at xensource.com>
+Date: Tue Jun 17 10:47:08 2008 +0200
+
+ xen/blkfront: Add the CDROM_GET_CAPABILITY ioctl to blkfront.
+
+ Return 0 instead of -EINVAL if the blkfront device is a cdrom,
+ i.e. had the VDISK_CDROM attribute. This allows udev's cdrom_id
+ to correctly detect the device as a cdrom device.
+
+ [ Add blkif_ioctl, and CDROMMULTISESSION ]
+
+ [ linux-2.6.18-xen changeset d2bd9af846b5 ]
+
+ Signed-off-by: Christian Limpach <Christian.Limpach at xensource.com>
+ Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
+ Signed-off-by: Jens Axboe <jens.axboe at oracle.com>
+
+diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
+index e8d3bf6..da3fee6 100644
+--- a/drivers/block/xen-blkfront.c
++++ b/drivers/block/xen-blkfront.c
+@@ -38,6 +38,7 @@
+ #include <linux/interrupt.h>
+ #include <linux/blkdev.h>
+ #include <linux/hdreg.h>
++#include <linux/cdrom.h>
+ #include <linux/module.h>
+
+ #include <xen/xenbus.h>
+@@ -153,6 +154,40 @@ static int blkif_getgeo(struct block_device *bd, struct hd_geometry *hg)
+ return 0;
+ }
+
++int blkif_ioctl(struct inode *inode, struct file *filep,
++ unsigned command, unsigned long argument)
++{
++ struct blkfront_info *info =
++ inode->i_bdev->bd_disk->private_data;
++ int i;
++
++ dev_dbg(&info->xbdev->dev, "command: 0x%x, argument: 0x%lx\n",
++ command, (long)argument);
++
++ switch (command) {
++ case CDROMMULTISESSION:
++ dev_dbg(&info->xbdev->dev, "FIXME: support multisession CDs later\n");
++ for (i = 0; i < sizeof(struct cdrom_multisession); i++)
++ if (put_user(0, (char __user *)(argument + i)))
++ return -EFAULT;
++ return 0;
++
++ case CDROM_GET_CAPABILITY: {
++ struct gendisk *gd = info->gd;
++ if (gd->flags & GENHD_FL_CD)
++ return 0;
++ return -EINVAL;
++ }
++
++ default:
++ /*printk(KERN_ALERT "ioctl %08x not supported by Xen blkdev\n",
++ command);*/
++ return -EINVAL; /* same return as native Linux */
++ }
++
++ return 0;
++}
++
+ /*
+ * blkif_queue_request
+ *
+@@ -974,6 +1009,7 @@ static struct block_device_operations xlvbd_block_fops =
+ .open = blkif_open,
+ .release = blkif_release,
+ .getgeo = blkif_getgeo,
++ .ioctl = blkif_ioctl,
+ };
+
+
Added: dists/lenny/linux-2.6/debian/patches/features/all/xen/xen-blkfront-make-blkif_ioctl-static.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/lenny/linux-2.6/debian/patches/features/all/xen/xen-blkfront-make-blkif_ioctl-static.patch Thu May 21 06:22:39 2009 (r13664)
@@ -0,0 +1,27 @@
+commit 62aa0054da220b8bbe6f23c0eb1d97a99005d0b3
+Author: Adrian Bunk <bunk at kernel.org>
+Date: Mon Aug 4 11:59:05 2008 +0200
+
+ xen-blkfront.c: make blkif_ioctl() static
+
+ This patch makes the needlessly global blkif_ioctl() static.
+
+ Signed-off-by: Adrian Bunk <bunk at kernel.org>
+ Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
+ Signed-off-by: Jens Axboe <jens.axboe at oracle.com>
+
+diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
+index 9ae05c5..3ca643c 100644
+--- a/drivers/block/xen-blkfront.c
++++ b/drivers/block/xen-blkfront.c
+@@ -154,8 +154,8 @@ static int blkif_getgeo(struct block_device *bd, struct hd_geometry *hg)
+ return 0;
+ }
+
+-int blkif_ioctl(struct inode *inode, struct file *filep,
+- unsigned command, unsigned long argument)
++static int blkif_ioctl(struct inode *inode, struct file *filep,
++ unsigned command, unsigned long argument)
+ {
+ struct blkfront_info *info =
+ inode->i_bdev->bd_disk->private_data;
Modified: dists/lenny/linux-2.6/debian/patches/series/16
==============================================================================
--- dists/lenny/linux-2.6/debian/patches/series/16 Wed May 20 19:56:03 2009 (r13663)
+++ dists/lenny/linux-2.6/debian/patches/series/16 Thu May 21 06:22:39 2009 (r13664)
@@ -4,3 +4,5 @@
+ bugfix/x86/gettimeofday-vDSO-NULL-tv-segv.patch
+ bugfix/all/sunrpc-fix-performance-regression-in-rpc-auth-code.patch
+ bugfix/x86/fix-ibm-summit-phys_cpu_present_map.patch
++ features/all/xen/xen-blkfront-add-the-CDROM_GET_CAPABILITY-ioctl.patch
++ features/all/xen/xen-blkfront-make-blkif_ioctl-static.patch
More information about the Kernel-svn-changes
mailing list