[kernel] r6127 - in dists/trunk/linux-2.6/debian/patches: . series

Bastian Blank waldi at costa.debian.org
Sat Mar 11 14:44:55 UTC 2006


Author: waldi
Date: Sat Mar 11 14:44:54 2006
New Revision: 6127

Added:
   dists/trunk/linux-2.6/debian/patches/s390-drivers-ccw-uevent-cleanup.patch
   dists/trunk/linux-2.6/debian/patches/s390-drivers-ccw-uevent-modalias.patch
   dists/trunk/linux-2.6/debian/patches/s390-scripts-modpost-ccw.patch
   dists/trunk/linux-2.6/debian/patches/series/0experimental.2
Log:
Add s390 patches.

* debian/patches/series/0experimental.2,
  debian/patches/s390-drivers-ccw-uevent-cleanup.patch,
  debian/patches/s390-drivers-ccw-uevent-modalias.patch,
  debian/patches/s390-scripts-modpost-ccw.patch: Add.


Added: dists/trunk/linux-2.6/debian/patches/s390-drivers-ccw-uevent-cleanup.patch
==============================================================================
--- (empty file)
+++ dists/trunk/linux-2.6/debian/patches/s390-drivers-ccw-uevent-cleanup.patch	Sat Mar 11 14:44:54 2006
@@ -0,0 +1,62 @@
+## Upstream status: pending
+
+diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
+index ea4652b..5f07dd0 100644
+--- a/drivers/s390/cio/device.c
++++ b/drivers/s390/cio/device.c
+@@ -85,43 +85,19 @@ ccw_uevent (struct device *dev, char **e
+ 		return -ENODEV;
+ 
+ 	/* what we want to pass to /sbin/hotplug */
+-
+-	envp[i++] = buffer;
+-	length += scnprintf(buffer, buffer_size - length, "CU_TYPE=%04X",
+-			   cdev->id.cu_type);
+-	if ((buffer_size - length <= 0) || (i >= num_envp))
+-		return -ENOMEM;
+-	++length;
+-	buffer += length;
+-
+-	envp[i++] = buffer;
+-	length += scnprintf(buffer, buffer_size - length, "CU_MODEL=%02X",
+-			   cdev->id.cu_model);
+-	if ((buffer_size - length <= 0) || (i >= num_envp))
+-		return -ENOMEM;
+-	++length;
+-	buffer += length;
+-
++	add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length,
++		       "CU_TYPE=%04X", cdev->id.cu_type);
++	add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length,
++		       "CU_MODEL=%02X", cdev->id.cu_model);
+ 	/* The next two can be zero, that's ok for us */
+-	envp[i++] = buffer;
+-	length += scnprintf(buffer, buffer_size - length, "DEV_TYPE=%04X",
+-			   cdev->id.dev_type);
+-	if ((buffer_size - length <= 0) || (i >= num_envp))
+-		return -ENOMEM;
+-	++length;
+-	buffer += length;
+-
+-	envp[i++] = buffer;
+-	length += scnprintf(buffer, buffer_size - length, "DEV_MODEL=%02X",
+-			   cdev->id.dev_model);
+-	if ((buffer_size - length <= 0) || (i >= num_envp))
+-		return -ENOMEM;
+-	++length;
+-	buffer += length;
+-
+-	envp[i++] = buffer;
+-	length += tmp_length = scnprintf(buffer, buffer_size - length, "MODALIAS=");
+-	length += modalias_print(cdev, buffer + tmp_length, buffer_size - length);
++	add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length,
++		       "DEV_TYPE=%04X", cdev->id.dev_type);
++	add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length,
++		       "DEV_MODEL=%02X", cdev->id.dev_model);
++
++	envp[i++] = buffer + length;
++	length += scnprintf(buffer + length, buffer_size - length, "MODALIAS=");
++	length += modalias_print(cdev, buffer + length, buffer_size - length);
+ 	if ((buffer_size - length <= 0) || (i >= num_envp))
+ 		return -ENOMEM;
+ 

Added: dists/trunk/linux-2.6/debian/patches/s390-drivers-ccw-uevent-modalias.patch
==============================================================================
--- (empty file)
+++ dists/trunk/linux-2.6/debian/patches/s390-drivers-ccw-uevent-modalias.patch	Sat Mar 11 14:44:54 2006
@@ -0,0 +1,74 @@
+## Upstream status: In mm-tree.
+
+diff -u b/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
+--- b/drivers/s390/cio/device.c
++++ b/drivers/s390/cio/device.c
+@@ -53,6 +53,22 @@
+ 	return 1;
+ }
+ 
++static ssize_t
++modalias_print (struct ccw_device *cdev, char *buf, size_t size)
++{
++	struct ccw_device_id *id = &(cdev->id);
++	ssize_t len;
++
++	len = snprintf(buf, size, "ccw:t%04Xm%02X",
++			id->cu_type, id->cu_model);
++	if (id->dev_type != 0)
++		len += snprintf(buf + len, size - len, "dt%04Xdm%02X",
++				id->dev_type, id->dev_model);
++	else
++		len += snprintf(buf + len, size - len, "dtdm");
++	return len;
++}
++
+ /*
+  * Hotplugging interface for ccw devices.
+  * Heavily modeled on pci and usb hotplug.
+@@ -63,7 +79,7 @@
+ {
+ 	struct ccw_device *cdev = to_ccwdev(dev);
+ 	int i = 0;
+-	int length = 0;
++	int length = 0, tmp_length = 0;
+ 
+ 	if (!cdev)
+ 		return -ENODEV;
+@@ -100,6 +116,14 @@
+ 			   cdev->id.dev_model);
+ 	if ((buffer_size - length <= 0) || (i >= num_envp))
+ 		return -ENOMEM;
++	++length;
++	buffer += length;
++
++	envp[i++] = buffer;
++	length += tmp_length = scnprintf(buffer, buffer_size - length, "MODALIAS=");
++	length += modalias_print(cdev, buffer + tmp_length, buffer_size - length);
++	if ((buffer_size - length <= 0) || (i >= num_envp))
++		return -ENOMEM;
+ 
+ 	envp[i] = 0;
+ 
+@@ -251,17 +275,11 @@
+ modalias_show (struct device *dev, struct device_attribute *attr, char *buf)
+ {
+ 	struct ccw_device *cdev = to_ccwdev(dev);
+-	struct ccw_device_id *id = &(cdev->id);
+-	int ret;
++	ssize_t len;
+ 
+-	ret = sprintf(buf, "ccw:t%04Xm%02X",
+-			id->cu_type, id->cu_model);
+-	if (id->dev_type != 0)
+-		ret += sprintf(buf + ret, "dt%04Xdm%02X\n",
+-				id->dev_type, id->dev_model);
+-	else
+-		ret += sprintf(buf + ret, "dtdm\n");
+-	return ret;
++	len = modalias_print(cdev, buf, PAGE_SIZE);
++	len += snprintf(buf + len, PAGE_SIZE - len, "\n");
++	return len;
+ }
+ 
+ static ssize_t

Added: dists/trunk/linux-2.6/debian/patches/s390-scripts-modpost-ccw.patch
==============================================================================
--- (empty file)
+++ dists/trunk/linux-2.6/debian/patches/s390-scripts-modpost-ccw.patch	Sat Mar 11 14:44:54 2006
@@ -0,0 +1,15 @@
+## Upstream status: Commited as de1d9c033f32ce39bf60e25be3b8624225fa9181
+
+diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
+index be97caf..c164b23 100644
+--- a/scripts/mod/file2alias.c
++++ b/scripts/mod/file2alias.c
+@@ -246,7 +246,7 @@ static int do_ccw_entry(const char *file
+ 	    id->cu_model);
+ 	ADD(alias, "dt", id->match_flags&CCW_DEVICE_ID_MATCH_DEVICE_TYPE,
+ 	    id->dev_type);
+-	ADD(alias, "dm", id->match_flags&CCW_DEVICE_ID_MATCH_DEVICE_TYPE,
++	ADD(alias, "dm", id->match_flags&CCW_DEVICE_ID_MATCH_DEVICE_MODEL,
+ 	    id->dev_model);
+ 	return 1;
+ }

Added: dists/trunk/linux-2.6/debian/patches/series/0experimental.2
==============================================================================
--- (empty file)
+++ dists/trunk/linux-2.6/debian/patches/series/0experimental.2	Sat Mar 11 14:44:54 2006
@@ -0,0 +1,3 @@
++ s390-scripts-modpost-ccw.patch
++ s390-drivers-ccw-uevent-modalias.patch
++ s390-drivers-ccw-uevent-cleanup.patch



More information about the Kernel-svn-changes mailing list