[kernel] r6829 - dists/trunk/linux-2.6/debian/patches
Kyle McMartin
kyle at costa.debian.org
Mon Jun 19 01:25:23 UTC 2006
Author: kyle
Date: Mon Jun 19 01:25:21 2006
New Revision: 6829
Modified:
dists/trunk/linux-2.6/debian/patches/hppa.patch
Log:
remove asynchronous scsi scanning hunks
Modified: dists/trunk/linux-2.6/debian/patches/hppa.patch
==============================================================================
--- dists/trunk/linux-2.6/debian/patches/hppa.patch (original)
+++ dists/trunk/linux-2.6/debian/patches/hppa.patch Mon Jun 19 01:25:21 2006
@@ -2056,280 +2056,6 @@
void scsi_print_driverbyte(int scsiresult)
{
-diff -urN --exclude-from=/var/www/download/linux-2.6/autobuild/build-tools/dontdiff LINUS_2_6_17/drivers/scsi/scsi_scan.c CVS2_6_17_PA0/drivers/scsi/scsi_scan.c
---- LINUS_2_6_17/drivers/scsi/scsi_scan.c 2006-06-17 22:24:46.000000000 -0600
-+++ CVS2_6_17_PA0/drivers/scsi/scsi_scan.c 2006-05-28 20:51:18.000000000 -0600
-@@ -30,7 +30,9 @@
- #include <linux/moduleparam.h>
- #include <linux/init.h>
- #include <linux/blkdev.h>
--#include <asm/semaphore.h>
-+#include <linux/delay.h>
-+#include <linux/kthread.h>
-+#include <linux/spinlock.h>
-
- #include <scsi/scsi.h>
- #include <scsi/scsi_device.h>
-@@ -88,6 +90,11 @@
- MODULE_PARM_DESC(max_luns,
- "last scsi LUN (should be between 1 and 2^32-1)");
-
-+static char scsi_scan_type[] = "async";
-+
-+module_param_string(scan, scsi_scan_type, sizeof(scsi_scan_type), S_IRUGO);
-+MODULE_PARM_DESC(scan, "sync, async or none");
-+
- /*
- * max_scsi_report_luns: the maximum number of LUNS that will be
- * returned from the REPORT LUNS command. 8 times this value must
-@@ -109,6 +116,50 @@
- "Timeout (in seconds) waiting for devices to answer INQUIRY."
- " Default is 5. Some non-compliant devices need more.");
-
-+static spinlock_t async_scan_lock = SPIN_LOCK_UNLOCKED;
-+static LIST_HEAD(scanning_hosts);
-+
-+struct async_scan_data {
-+ struct list_head list;
-+ struct Scsi_Host *shost;
-+ struct completion prev_finished;
-+};
-+
-+static int scsi_complete_async_scans(void)
-+{
-+ struct async_scan_data *data;
-+
-+ do {
-+ if (list_empty(&scanning_hosts))
-+ return 0;
-+ data = kmalloc(sizeof(*data), GFP_KERNEL);
-+ if (!data)
-+ msleep(1);
-+ } while (!data);
-+
-+ data->shost = NULL;
-+ init_completion(&data->prev_finished);
-+
-+ spin_lock(&async_scan_lock);
-+ if (list_empty(&scanning_hosts))
-+ goto done;
-+ list_add_tail(&data->list, &scanning_hosts);
-+ spin_unlock(&async_scan_lock);
-+
-+ printk(KERN_INFO "scsi: waiting for bus probes to complete ...\n");
-+ wait_for_completion(&data->prev_finished);
-+
-+ spin_lock(&async_scan_lock);
-+ list_del(&data->list);
-+ done:
-+ spin_unlock(&async_scan_lock);
-+
-+ kfree(data);
-+ return 0;
-+}
-+late_initcall(scsi_complete_async_scans);
-+
-+
- /**
- * scsi_unlock_floptical - unlock device via a special MODE SENSE command
- * @sdev: scsi device to send command to
-@@ -629,7 +680,8 @@
- * SCSI_SCAN_NO_RESPONSE: could not allocate or setup a scsi_device
- * SCSI_SCAN_LUN_PRESENT: a new scsi_device was allocated and initialized
- **/
--static int scsi_add_lun(struct scsi_device *sdev, char *inq_result, int *bflags)
-+static int scsi_add_lun(struct scsi_device *sdev, char *inq_result,
-+ int *bflags, int async)
- {
- /*
- * XXX do not save the inquiry, since it can change underneath us,
-@@ -802,7 +854,7 @@
- * register it and tell the rest of the kernel
- * about it.
- */
-- if (scsi_sysfs_add_sdev(sdev) != 0)
-+ if (!async && scsi_sysfs_add_sdev(sdev) != 0)
- return SCSI_SCAN_NO_RESPONSE;
-
- return SCSI_SCAN_LUN_PRESENT;
-@@ -914,7 +966,7 @@
- goto out_free_result;
- }
-
-- res = scsi_add_lun(sdev, result, &bflags);
-+ res = scsi_add_lun(sdev, result, &bflags, shost->async_scan);
- if (res == SCSI_SCAN_LUN_PRESENT) {
- if (bflags & BLIST_KEY) {
- sdev->lockable = 0;
-@@ -1427,6 +1479,12 @@
- {
- struct Scsi_Host *shost = dev_to_shost(parent);
-
-+ if (strncmp(scsi_scan_type, "none", 4) == 0)
-+ return;
-+
-+ if (!shost->async_scan)
-+ scsi_complete_async_scans();
-+
- mutex_lock(&shost->scan_mutex);
- if (scsi_host_scan_allowed(shost))
- __scsi_scan_target(parent, channel, id, lun, rescan);
-@@ -1472,6 +1530,9 @@
- "%s: <%u:%u:%u>\n",
- __FUNCTION__, channel, id, lun));
-
-+ if (!shost->async_scan)
-+ scsi_complete_async_scans();
-+
- if (((channel != SCAN_WILD_CARD) && (channel > shost->max_channel)) ||
- ((id != SCAN_WILD_CARD) && (id > shost->max_id)) ||
- ((lun != SCAN_WILD_CARD) && (lun > shost->max_lun)))
-@@ -1492,14 +1553,143 @@
- return 0;
- }
-
-+/* The error handling here is pretty yucky. Do we want an
-+ * shost_for_each_device_safe() iterator?
-+ */
-+static void scsi_sysfs_add_devices(struct Scsi_Host *shost)
-+{
-+ struct scsi_device *sdev;
-+ shost_for_each_device(sdev, shost) {
-+ int err;
-+ next:
-+ err = scsi_sysfs_add_sdev(sdev);
-+ if (err) {
-+ struct scsi_device *tmp = sdev;
-+ sdev = __scsi_iterate_devices(shost, sdev);
-+ scsi_destroy_sdev(tmp);
-+ goto next;
-+ }
-+ }
-+}
-+
-+/**
-+ * scsi_prep_async_scan - prepare for an async scan
-+ * @shost: the host which will be scanned
-+ * Returns: a cookie to be passed to scsi_finish_async_scan()
-+ *
-+ * If your driver does not use scsi_scan_host(), you can call this function
-+ * to tell the midlayer you're about to commence an asynchronous scan.
-+ * This reserves your device's position in the scanning list and ensures
-+ * that other asynchronous scans started after yours won't affect the
-+ * disc ordering.
-+ */
-+struct async_scan_data * scsi_prep_async_scan(struct Scsi_Host *shost)
-+{
-+ struct async_scan_data *data;
-+
-+ if (strncmp(scsi_scan_type, "sync", 4) == 0)
-+ return NULL;
-+
-+ if (shost->async_scan) {
-+ printk("%s called twice for host %d", __FUNCTION__,
-+ shost->host_no);
-+ dump_stack();
-+ return NULL;
-+ }
-+
-+ data = kmalloc(sizeof(*data), GFP_KERNEL);
-+ if (!data)
-+ goto err;
-+ data->shost = scsi_host_get(shost);
-+ if (!data->shost)
-+ goto err;
-+ init_completion(&data->prev_finished);
-+
-+ spin_lock(&async_scan_lock);
-+ shost->async_scan = 1;
-+ if (list_empty(&scanning_hosts))
-+ complete(&data->prev_finished);
-+ list_add_tail(&data->list, &scanning_hosts);
-+ spin_unlock(&async_scan_lock);
-+
-+ return data;
-+
-+ err:
-+ kfree(data);
-+ return NULL;
-+}
-+EXPORT_SYMBOL_GPL(scsi_prep_async_scan);
-+
-+/**
-+ * scsi_finish_async_scan - asynchronous scan has finished
-+ * @data: cookie returned from earlier call to scsi_prep_async_scan()
-+ *
-+ * Once your driver has found all the devices currently present, call
-+ * this function. It will announce all the devices it has found to
-+ * the rest of the system.
-+ */
-+void scsi_finish_async_scan(struct async_scan_data *data)
-+{
-+ struct Scsi_Host *shost;
-+
-+ if (!data)
-+ return;
-+
-+ shost = data->shost;
-+ if (!shost->async_scan) {
-+ printk("%s called twice for host %d", __FUNCTION__,
-+ shost->host_no);
-+ dump_stack();
-+ return;
-+ }
-+
-+ wait_for_completion(&data->prev_finished);
-+
-+ scsi_sysfs_add_devices(shost);
-+
-+ spin_lock(&async_scan_lock);
-+ shost->async_scan = 0;
-+ list_del(&data->list);
-+ if (!list_empty(&scanning_hosts)) {
-+ struct async_scan_data *next = list_entry(scanning_hosts.next,
-+ struct async_scan_data, list);
-+ complete(&next->prev_finished);
-+ }
-+ spin_unlock(&async_scan_lock);
-+
-+ scsi_host_put(shost);
-+ kfree(data);
-+}
-+EXPORT_SYMBOL_GPL(scsi_finish_async_scan);
-+
-+static int do_scan_async(void *_data)
-+{
-+ struct async_scan_data *data = _data;
-+ scsi_scan_host_selected(data->shost, SCAN_WILD_CARD, SCAN_WILD_CARD,
-+ SCAN_WILD_CARD, 0);
-+
-+ scsi_finish_async_scan(data);
-+ return 0;
-+}
-+
- /**
- * scsi_scan_host - scan the given adapter
- * @shost: adapter to scan
- **/
- void scsi_scan_host(struct Scsi_Host *shost)
- {
-- scsi_scan_host_selected(shost, SCAN_WILD_CARD, SCAN_WILD_CARD,
-- SCAN_WILD_CARD, 0);
-+ struct async_scan_data *data;
-+
-+ if (strncmp(scsi_scan_type, "none", 4) == 0)
-+ return;
-+
-+ data = scsi_prep_async_scan(shost);
-+ if (!data) {
-+ scsi_scan_host_selected(shost, SCAN_WILD_CARD, SCAN_WILD_CARD,
-+ SCAN_WILD_CARD, 0);
-+ return;
-+ }
-+ kthread_run(do_scan_async, data, "scsi_scan_%d", shost->host_no);
- }
- EXPORT_SYMBOL(scsi_scan_host);
-
diff -urN --exclude-from=/var/www/download/linux-2.6/autobuild/build-tools/dontdiff LINUS_2_6_17/drivers/scsi/sym53c8xx_2/sym_glue.c CVS2_6_17_PA0/drivers/scsi/sym53c8xx_2/sym_glue.c
--- LINUS_2_6_17/drivers/scsi/sym53c8xx_2/sym_glue.c 2006-06-17 22:24:47.000000000 -0600
+++ CVS2_6_17_PA0/drivers/scsi/sym53c8xx_2/sym_glue.c 2006-04-28 00:43:26.000000000 -0600
More information about the Kernel-svn-changes
mailing list