From ccc83933773fce8be90ad4d0a0a2d889cf53efe6 Mon Sep 17 00:00:00 2001 From: Chris Wright Date: Wed, 22 Jun 2005 13:14:40 -0700 Subject: [PATCH] Add 2.6.12 -stable queue and the three current patches: pci-driver-typo-fix.patch qla2xxx-init-fixes.patch fix-remap_pte_range-BUG.patch --- queue/fix-remap_pte_range-BUG.patch | 28 +++++ queue/pci-driver-typo-fix.patch | 27 +++++ queue/qla2xxx-init-fixes.patch | 167 ++++++++++++++++++++++++++++ queue/series | 3 + 4 files changed, 225 insertions(+) create mode 100644 queue/fix-remap_pte_range-BUG.patch create mode 100644 queue/pci-driver-typo-fix.patch create mode 100644 queue/qla2xxx-init-fixes.patch create mode 100644 queue/series diff --git a/queue/fix-remap_pte_range-BUG.patch b/queue/fix-remap_pte_range-BUG.patch new file mode 100644 index 00000000000..9ef45bb4170 --- /dev/null +++ b/queue/fix-remap_pte_range-BUG.patch @@ -0,0 +1,28 @@ +From stable-bounces@linux.kernel.org Wed Jun 22 06:01:48 2005 +Date: Wed, 22 Jun 2005 14:02:41 +0100 (BST) +From: Hugh Dickins +To: Andrew Morton +Cc: "Richard B. Johnson" , stable@kernel.org, + linux-kernel@vger.kernel.org +Subject: [PATCH] fix remap_pte_range BUG + +Out-of-tree user of remap_pfn_range hit kernel BUG at mm/memory.c:1112! +It passes an unrounded size to remap_pfn_range, which was okay before +2.6.12, but misses remap_pte_range's new end condition. An audit of +all the other ptwalks confirms that this is the only one so exposed. + +Signed-off-by: Hugh Dickins +Signed-off-by: Chris Wright + +--- 2.6.12/mm/memory.c 2005-06-17 20:48:29.000000000 +0100 ++++ linux/mm/memory.c 2005-06-21 20:31:42.000000000 +0100 +@@ -1164,7 +1164,7 @@ int remap_pfn_range(struct vm_area_struc + { + pgd_t *pgd; + unsigned long next; +- unsigned long end = addr + size; ++ unsigned long end = addr + PAGE_ALIGN(size); + struct mm_struct *mm = vma->vm_mm; + int err; + + diff --git a/queue/pci-driver-typo-fix.patch b/queue/pci-driver-typo-fix.patch new file mode 100644 index 00000000000..fadc8ad03a0 --- /dev/null +++ b/queue/pci-driver-typo-fix.patch @@ -0,0 +1,27 @@ +From stable-bounces@linux.kernel.org Sat Jun 18 13:22:38 2005 +Date: Sat, 18 Jun 2005 23:22:28 +0300 +From: Mika Kukkonen +To: hch@infradead.org +Cc: torvalds@osdl.org, linux-kernel@vger.kernel.org +Subject: [PATCH 2.6.12] Fix typo in drivers/pci/pci-driver.c + +The git commit 794f5bfa77955c4455f6d72d8b0e2bee25f1ff0c +accidentally suffers from a previous typo in that file +(',' instead of ';' in end of line). Patch included. + +Signed-off-by: Mika Kukkonen +Signed-off-by: Chris Wright + +Index: linux-2.6/drivers/pci/pci-driver.c +=================================================================== +--- linux-2.6.orig/drivers/pci/pci-driver.c 2005-06-18 22:05:42.642463416 +0300 ++++ linux-2.6/drivers/pci/pci-driver.c 2005-06-18 22:10:37.486761280 +0300 +@@ -396,7 +396,7 @@ + /* FIXME, once all of the existing PCI drivers have been fixed to set + * the pci shutdown function, this test can go away. */ + if (!drv->driver.shutdown) +- drv->driver.shutdown = pci_device_shutdown, ++ drv->driver.shutdown = pci_device_shutdown; + drv->driver.owner = drv->owner; + drv->driver.kobj.ktype = &pci_driver_kobj_type; + pci_init_dynids(&drv->dynids); diff --git a/queue/qla2xxx-init-fixes.patch b/queue/qla2xxx-init-fixes.patch new file mode 100644 index 00000000000..ece1d60c7f3 --- /dev/null +++ b/queue/qla2xxx-init-fixes.patch @@ -0,0 +1,167 @@ +From foo@baz +Date: Thu, 09 Jun 2005 17:21:28 -0700 +From: Andrew Vasquez +To: stable@kernel.org +Cc: hch@infradead.org, James.Bottomley@SteelEye.com +Subject: [PATCH] [SCSI] qla2xxx: Pull-down scsi-host-addition to follow board initialization. + +Return to previous held-logic of calling scsi_add_host() only +after the board has been completely initialized. Also return +pci_*() error-codes during probe failure paths. + +This also corrects an issue where only lun 0 is being scanned for +a given port. + +Signed-off-by: Andrew Vasquez +Signed-off-by: James Bottomley +Signed-off-by: Chris Wright + +--- +commit a1541d5af66d02426655b1498f814c52347dd7d3 +tree 02d041e54ebaec744d30ebf6012e305b9673bec0 +parent 27198d855abbfc82df69e81b6c8d2f333580114c +author Andrew Vasquez Thu, 09 Jun 2005 17:21:28 -0700 +committer James Bottomley Sat, 11 Jun 2005 13:06:22 -0500 + + drivers/scsi/qla2xxx/qla_os.c | 55 +++++++++++++++++++++-------------------- + 1 files changed, 28 insertions(+), 27 deletions(-) + +diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c +--- a/drivers/scsi/qla2xxx/qla_os.c ++++ b/drivers/scsi/qla2xxx/qla_os.c +@@ -1150,7 +1150,7 @@ iospace_error_exit: + */ + int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info) + { +- int ret; ++ int ret = -ENODEV; + device_reg_t __iomem *reg; + struct Scsi_Host *host; + scsi_qla_host_t *ha; +@@ -1161,7 +1161,7 @@ int qla2x00_probe_one(struct pci_dev *pd + fc_port_t *fcport; + + if (pci_enable_device(pdev)) +- return -1; ++ goto probe_out; + + host = scsi_host_alloc(&qla2x00_driver_template, + sizeof(scsi_qla_host_t)); +@@ -1183,9 +1183,8 @@ int qla2x00_probe_one(struct pci_dev *pd + + /* Configure PCI I/O space */ + ret = qla2x00_iospace_config(ha); +- if (ret != 0) { +- goto probe_alloc_failed; +- } ++ if (ret) ++ goto probe_failed; + + /* Sanitize the information from PCI BIOS. */ + host->irq = pdev->irq; +@@ -1258,23 +1257,10 @@ int qla2x00_probe_one(struct pci_dev *pd + qla_printk(KERN_WARNING, ha, + "[ERROR] Failed to allocate memory for adapter\n"); + +- goto probe_alloc_failed; ++ ret = -ENOMEM; ++ goto probe_failed; + } + +- pci_set_drvdata(pdev, ha); +- host->this_id = 255; +- host->cmd_per_lun = 3; +- host->unique_id = ha->instance; +- host->max_cmd_len = MAX_CMDSZ; +- host->max_channel = ha->ports - 1; +- host->max_id = ha->max_targets; +- host->max_lun = ha->max_luns; +- host->transportt = qla2xxx_transport_template; +- if (scsi_add_host(host, &pdev->dev)) +- goto probe_alloc_failed; +- +- qla2x00_alloc_sysfs_attr(ha); +- + if (qla2x00_initialize_adapter(ha) && + !(ha->device_flags & DFLG_NO_CABLE)) { + +@@ -1285,11 +1271,10 @@ int qla2x00_probe_one(struct pci_dev *pd + "Adapter flags %x.\n", + ha->host_no, ha->device_flags)); + ++ ret = -ENODEV; + goto probe_failed; + } + +- qla2x00_init_host_attr(ha); +- + /* + * Startup the kernel thread for this host adapter + */ +@@ -1299,17 +1284,26 @@ int qla2x00_probe_one(struct pci_dev *pd + qla_printk(KERN_WARNING, ha, + "Unable to start DPC thread!\n"); + ++ ret = -ENODEV; + goto probe_failed; + } + wait_for_completion(&ha->dpc_inited); + ++ host->this_id = 255; ++ host->cmd_per_lun = 3; ++ host->unique_id = ha->instance; ++ host->max_cmd_len = MAX_CMDSZ; ++ host->max_channel = ha->ports - 1; ++ host->max_lun = MAX_LUNS; ++ host->transportt = qla2xxx_transport_template; ++ + if (IS_QLA2100(ha) || IS_QLA2200(ha)) + ret = request_irq(host->irq, qla2100_intr_handler, + SA_INTERRUPT|SA_SHIRQ, ha->brd_info->drv_name, ha); + else + ret = request_irq(host->irq, qla2300_intr_handler, + SA_INTERRUPT|SA_SHIRQ, ha->brd_info->drv_name, ha); +- if (ret != 0) { ++ if (ret) { + qla_printk(KERN_WARNING, ha, + "Failed to reserve interrupt %d already in use.\n", + host->irq); +@@ -1363,9 +1357,18 @@ int qla2x00_probe_one(struct pci_dev *pd + msleep(10); + } + ++ pci_set_drvdata(pdev, ha); + ha->flags.init_done = 1; + num_hosts++; + ++ ret = scsi_add_host(host, &pdev->dev); ++ if (ret) ++ goto probe_failed; ++ ++ qla2x00_alloc_sysfs_attr(ha); ++ ++ qla2x00_init_host_attr(ha); ++ + qla_printk(KERN_INFO, ha, "\n" + " QLogic Fibre Channel HBA Driver: %s\n" + " QLogic %s - %s\n" +@@ -1384,9 +1387,6 @@ int qla2x00_probe_one(struct pci_dev *pd + probe_failed: + fc_remove_host(ha->host); + +- scsi_remove_host(host); +- +-probe_alloc_failed: + qla2x00_free_device(ha); + + scsi_host_put(host); +@@ -1394,7 +1394,8 @@ probe_alloc_failed: + probe_disable_device: + pci_disable_device(pdev); + +- return -1; ++probe_out: ++ return ret; + } + EXPORT_SYMBOL_GPL(qla2x00_probe_one); + diff --git a/queue/series b/queue/series new file mode 100644 index 00000000000..32f1e0fe56c --- /dev/null +++ b/queue/series @@ -0,0 +1,3 @@ +pci-driver-typo-fix.patch +qla2xxx-init-fixes.patch +fix-remap_pte_range-BUG.patch -- 2.47.3