r1110 - in trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian: . patches
Dann Frazier
dannf@haydn.debian.org
Sat, 14 Aug 2004 16:05:30 -0600
Author: dannf
Date: 2004-08-14 16:05:15 -0600 (Sat, 14 Aug 2004)
New Revision: 1110
Added:
trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/drivers-scsi-sym53c8xx_revert.dpatch
Modified:
trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog
trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/00list-1
Log:
propogate sym53c8xx revert patch into kernel-source and out of ia64
kernel-patch
Modified: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog 2004-08-14 21:29:41 UTC (rev 1109)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog 2004-08-14 22:05:15 UTC (rev 1110)
@@ -65,6 +65,8 @@
* Add 32bit ioctl translation support to XFS (closes: Bug#257265)
(Christoph Hellwig).
+ * Revert sym53c8xx driver (dann frazier).
+
-- Andres Salomon <dilinger@voxel.net> Sat, 14 Aug 2004 02:40:50 -0400
kernel-source-2.6.7 (2.6.7-4) unstable; urgency=high
Modified: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/00list-1
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/00list-1 2004-08-14 21:29:41 UTC (rev 1109)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/00list-1 2004-08-14 22:05:15 UTC (rev 1110)
@@ -27,3 +27,4 @@
ptmx-fix
powerpc-ibm-240-e30
xfs-ioctl32
+drivers-scsi-sym53c8xx_revert
Copied: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/drivers-scsi-sym53c8xx_revert.dpatch (from rev 1099, trunk/kernel/ia64/kernel-patch-2.6.7-ia64-2.6.7/sym53c8xx_revert.patch)
===================================================================
--- trunk/kernel/ia64/kernel-patch-2.6.7-ia64-2.6.7/sym53c8xx_revert.patch 2004-08-14 19:52:10 UTC (rev 1099)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/drivers-scsi-sym53c8xx_revert.dpatch 2004-08-14 22:05:15 UTC (rev 1110)
@@ -0,0 +1,387 @@
+#! /bin/sh -e
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Revert driver to 2.6.5 version; DV breaks on some configs
+## DP: Patch author: dann frazier
+## DP: Upstream status: willy/jejb notified - dannf getting them debug access
+
+. $(dirname $0)/DPATCH
+
+@DPATCH@
+# This is a *reversed* BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+# 2004/04/04 11:13:38-05:00 willy@debian.org
+# [PATCH] sym 2.1.18j
+#
+# sym 2.1.18j:
+# - Add SPI transport attributes (James Bottomley)
+# - Use generic code to do Domain Validation (James Bottomley)
+# - Stop using scsi_to_pci_dma_dir() (Christoph Hellwig)
+# - Change some constants to their symbolic names (Grant Grundler)
+# - Handle a race between a postponed command completing and the EH retrying
+# it (James Bottomley)
+# - If the auto request sense fails, issue a device reset (James Bottomley)
+#
+# drivers/scsi/Kconfig
+# 2004/04/04 04:24:09-05:00 willy@debian.org +1 -0
+# sym 2.1.18j
+#
+# drivers/scsi/sym53c8xx_2/sym_glue.c
+# 2004/04/04 04:24:14-05:00 willy@debian.org +142 -8
+# sym 2.1.18j
+#
+# drivers/scsi/sym53c8xx_2/sym_glue.h
+# 2004/04/04 04:24:14-05:00 willy@debian.org +7 -12
+# sym 2.1.18j
+#
+# drivers/scsi/sym53c8xx_2/sym_hipd.c
+# 2004/04/04 04:24:14-05:00 willy@debian.org +4 -3
+# sym 2.1.18j
+#
+diff -urN kernel-source-2.6.6.orig/drivers/scsi/Kconfig kernel-source-2.6.6/drivers/scsi/Kconfig
+--- kernel-source-2.6.6.orig/drivers/scsi/Kconfig 2004-05-10 06:21:38.000000000 -0600
++++ kernel-source-2.6.6/drivers/scsi/Kconfig 2004-06-09 22:38:58.886662460 -0600
+@@ -934,7 +934,6 @@
+ config SCSI_SYM53C8XX_2
+ tristate "SYM53C8XX Version 2 SCSI support"
+ depends on PCI && SCSI
+- select SCSI_SPI_ATTRS
+ ---help---
+ This driver supports the whole NCR53C8XX/SYM53C8XX family of
+ PCI-SCSI controllers. It also supports the subset of LSI53C10XX
+diff -urN kernel-source-2.6.6.orig/drivers/scsi/sym53c8xx_2/sym_glue.c kernel-source-2.6.6/drivers/scsi/sym53c8xx_2/sym_glue.c
+--- kernel-source-2.6.6.orig/drivers/scsi/sym53c8xx_2/sym_glue.c 2004-05-10 03:48:00.000000000 -0600
++++ kernel-source-2.6.6/drivers/scsi/sym53c8xx_2/sym_glue.c 2004-06-09 22:38:58.889592147 -0600
+@@ -57,10 +57,6 @@
+ #include <linux/module.h>
+ #include <linux/spinlock.h>
+ #include <scsi/scsi.h>
+-#include <scsi/scsi_tcq.h>
+-#include <scsi/scsi_device.h>
+-#include <scsi/scsi_transport.h>
+-#include <scsi/scsi_transport_spi.h>
+
+ #include "sym_glue.h"
+ #include "sym_nvram.h"
+@@ -91,8 +87,6 @@
+ /* This lock protects only the memory allocation/free. */
+ spinlock_t sym53c8xx_lock = SPIN_LOCK_UNLOCKED;
+
+-static struct scsi_transport_template *sym2_transport_template = NULL;
+-
+ /*
+ * Wrappers to the generic memory allocator.
+ */
+@@ -177,7 +171,7 @@
+
+ static void __unmap_scsi_data(struct pci_dev *pdev, struct scsi_cmnd *cmd)
+ {
+- int dma_dir = cmd->sc_data_direction;
++ int dma_dir = scsi_to_pci_dma_dir(cmd->sc_data_direction);
+
+ switch(SYM_UCMD_PTR(cmd)->data_mapped) {
+ case 2:
+@@ -194,7 +188,7 @@
+ static dma_addr_t __map_scsi_single_data(struct pci_dev *pdev, struct scsi_cmnd *cmd)
+ {
+ dma_addr_t mapping;
+- int dma_dir = cmd->sc_data_direction;
++ int dma_dir = scsi_to_pci_dma_dir(cmd->sc_data_direction);
+
+ mapping = pci_map_single(pdev, cmd->request_buffer,
+ cmd->request_bufflen, dma_dir);
+@@ -209,7 +203,7 @@
+ static int __map_scsi_sg_data(struct pci_dev *pdev, struct scsi_cmnd *cmd)
+ {
+ int use_sg;
+- int dma_dir = cmd->sc_data_direction;
++ int dma_dir = scsi_to_pci_dma_dir(cmd->sc_data_direction);
+
+ use_sg = pci_map_sg(pdev, cmd->buffer, cmd->use_sg, dma_dir);
+ if (use_sg > 0) {
+@@ -222,7 +216,7 @@
+
+ static void __sync_scsi_data_for_cpu(struct pci_dev *pdev, struct scsi_cmnd *cmd)
+ {
+- int dma_dir = cmd->sc_data_direction;
++ int dma_dir = scsi_to_pci_dma_dir(cmd->sc_data_direction);
+
+ switch(SYM_UCMD_PTR(cmd)->data_mapped) {
+ case 2:
+@@ -237,7 +231,7 @@
+
+ static void __sync_scsi_data_for_device(struct pci_dev *pdev, struct scsi_cmnd *cmd)
+ {
+- int dma_dir = cmd->sc_data_direction;
++ int dma_dir = scsi_to_pci_dma_dir(cmd->sc_data_direction);
+
+ switch(SYM_UCMD_PTR(cmd)->data_mapped) {
+ case 2:
+@@ -384,13 +378,6 @@
+ }
+ #endif
+ } else {
+- /*
+- * Error return from our internal request sense. This
+- * is bad: we must clear the contingent allegiance
+- * condition otherwise the device will always return
+- * BUSY. Use a big stick.
+- */
+- sym_reset_scsi_target(np, csio->device->id);
+ cam_status = DID_ERROR;
+ }
+ } else if (cp->host_status == HS_COMPLETE) /* Bad SCSI status */
+@@ -607,7 +594,7 @@
+ * No direction means no data.
+ */
+ dir = csio->sc_data_direction;
+- if (dir != DMA_NONE) {
++ if (dir != SCSI_DATA_NONE) {
+ cp->segments = sym_scatter(np, cp, csio);
+ if (cp->segments < 0) {
+ if (cp->segments == -2)
+@@ -931,6 +918,7 @@
+ switch(to_do) {
+ default:
+ case SYM_EH_DO_IGNORE:
++ goto finish;
+ break;
+ case SYM_EH_DO_WAIT:
+ init_MUTEX_LOCKED(&ep->sem);
+@@ -970,6 +958,7 @@
+ to_do = SYM_EH_DO_IGNORE;
+ }
+
++finish:
+ ep->to_do = to_do;
+ /* Complete the command with locks held as required by the driver */
+ if (to_do == SYM_EH_DO_COMPLETE)
+@@ -1163,8 +1152,6 @@
+ lp->s.scdev_depth = depth_to_use;
+ sym_tune_dev_queuing(np, device->id, device->lun, reqtags);
+
+- spi_dv_device(device);
+-
+ return 0;
+ }
+
+@@ -1850,8 +1837,6 @@
+ instance->can_queue = (SYM_CONF_MAX_START-2);
+ instance->sg_tablesize = SYM_CONF_MAX_SG;
+ instance->max_cmd_len = 16;
+- BUG_ON(sym2_transport_template == NULL);
+- instance->transportt = sym2_transport_template;
+
+ spin_unlock_irqrestore(instance->host_lock, flags);
+
+@@ -2370,120 +2355,6 @@
+ attach_count--;
+ }
+
+-static void sym2_get_offset(struct scsi_device *sdev)
+-{
+- struct sym_hcb *np = ((struct host_data *)sdev->host->hostdata)->ncb;
+- struct sym_tcb *tp = &np->target[sdev->id];
+-
+- spi_offset(sdev) = tp->tinfo.curr.offset;
+-}
+-
+-static void sym2_set_offset(struct scsi_device *sdev, int offset)
+-{
+- struct sym_hcb *np = ((struct host_data *)sdev->host->hostdata)->ncb;
+- struct sym_tcb *tp = &np->target[sdev->id];
+-
+- if (tp->tinfo.curr.options & PPR_OPT_DT) {
+- if (offset > np->maxoffs_dt)
+- offset = np->maxoffs_dt;
+- } else {
+- if (offset > np->maxoffs)
+- offset = np->maxoffs;
+- }
+- tp->tinfo.goal.offset = offset;
+-}
+-
+-
+-static void sym2_get_period(struct scsi_device *sdev)
+-{
+- struct sym_hcb *np = ((struct host_data *)sdev->host->hostdata)->ncb;
+- struct sym_tcb *tp = &np->target[sdev->id];
+-
+- spi_period(sdev) = tp->tinfo.curr.period;
+-}
+-
+-static void sym2_set_period(struct scsi_device *sdev, int period)
+-{
+- struct sym_hcb *np = ((struct host_data *)sdev->host->hostdata)->ncb;
+- struct sym_tcb *tp = &np->target[sdev->id];
+-
+- if (period <= 9 && np->minsync_dt) {
+- if (period < np->minsync_dt)
+- period = np->minsync_dt;
+- tp->tinfo.goal.options = PPR_OPT_DT;
+- tp->tinfo.goal.period = period;
+- if (!tp->tinfo.curr.offset ||
+- tp->tinfo.curr.offset > np->maxoffs_dt)
+- tp->tinfo.goal.offset = np->maxoffs_dt;
+- } else {
+- if (period < np->minsync)
+- period = np->minsync;
+- tp->tinfo.goal.options = 0;
+- tp->tinfo.goal.period = period;
+- if (!tp->tinfo.curr.offset ||
+- tp->tinfo.curr.offset > np->maxoffs)
+- tp->tinfo.goal.offset = np->maxoffs;
+- }
+-}
+-
+-static void sym2_get_width(struct scsi_device *sdev)
+-{
+- struct sym_hcb *np = ((struct host_data *)sdev->host->hostdata)->ncb;
+- struct sym_tcb *tp = &np->target[sdev->id];
+-
+- spi_width(sdev) = tp->tinfo.curr.width ? 1 : 0;
+-}
+-
+-static void sym2_set_width(struct scsi_device *sdev, int width)
+-{
+- struct sym_hcb *np = ((struct host_data *)sdev->host->hostdata)->ncb;
+- struct sym_tcb *tp = &np->target[sdev->id];
+-
+- tp->tinfo.goal.width = width;
+-}
+-
+-static void sym2_get_dt(struct scsi_device *sdev)
+-{
+- struct sym_hcb *np = ((struct host_data *)sdev->host->hostdata)->ncb;
+- struct sym_tcb *tp = &np->target[sdev->id];
+-
+- spi_dt(sdev) = (tp->tinfo.curr.options & PPR_OPT_DT) ? 1 : 0;
+-}
+-
+-static void sym2_set_dt(struct scsi_device *sdev, int dt)
+-{
+- struct sym_hcb *np = ((struct host_data *)sdev->host->hostdata)->ncb;
+- struct sym_tcb *tp = &np->target[sdev->id];
+-
+- if (!dt) {
+- /* if clearing DT, then we may need to reduce the
+- * period and the offset */
+- if (tp->tinfo.curr.period < np->minsync)
+- tp->tinfo.goal.period = np->minsync;
+- if (tp->tinfo.curr.offset > np->maxoffs)
+- tp->tinfo.goal.offset = np->maxoffs;
+- tp->tinfo.goal.options &= ~PPR_OPT_DT;
+- } else {
+- tp->tinfo.goal.options |= PPR_OPT_DT;
+- }
+-}
+-
+-
+-static struct spi_function_template sym2_transport_functions = {
+- .set_offset = sym2_set_offset,
+- .get_offset = sym2_get_offset,
+- .show_offset = 1,
+- .set_period = sym2_set_period,
+- .get_period = sym2_get_period,
+- .show_period = 1,
+- .set_width = sym2_set_width,
+- .get_width = sym2_get_width,
+- .show_width = 1,
+- .get_dt = sym2_get_dt,
+- .set_dt = sym2_set_dt,
+- .show_dt = 1,
+-};
+-
+ static struct pci_device_id sym2_id_table[] __devinitdata = {
+ { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_NCR_53C810,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
+@@ -2533,10 +2404,6 @@
+
+ static int __init sym2_init(void)
+ {
+- sym2_transport_template = spi_attach_transport(&sym2_transport_functions);
+- if (!sym2_transport_template)
+- return -ENODEV;
+-
+ pci_register_driver(&sym2_driver);
+ return 0;
+ }
+@@ -2544,7 +2411,6 @@
+ static void __exit sym2_exit(void)
+ {
+ pci_unregister_driver(&sym2_driver);
+- spi_release_transport(sym2_transport_template);
+ }
+
+ module_init(sym2_init);
+diff -urN kernel-source-2.6.6.orig/drivers/scsi/sym53c8xx_2/sym_glue.h kernel-source-2.6.6/drivers/scsi/sym53c8xx_2/sym_glue.h
+--- kernel-source-2.6.6.orig/drivers/scsi/sym53c8xx_2/sym_glue.h 2004-05-10 03:48:00.000000000 -0600
++++ kernel-source-2.6.6/drivers/scsi/sym53c8xx_2/sym_glue.h 2004-06-09 22:38:58.890568710 -0600
+@@ -66,10 +66,9 @@
+ # include <asm/irq.h>
+ #endif
+
+-#include <scsi/scsi.h>
+ #include <scsi/scsi_cmnd.h>
+-#include <scsi/scsi_device.h>
+ #include <scsi/scsi_host.h>
++#include "../scsi.h" /* XXX: DID_* */
+
+ #ifndef bzero
+ #define bzero(d, n) memset((d), 0, (n))
+@@ -342,12 +341,18 @@
+ #define CAM_RESRC_UNAVAIL DID_ERROR
+
+ /*
+- * Remap data direction values.
++ * Remap SCSI data direction values.
+ */
+-#define CAM_DIR_NONE DMA_NONE
+-#define CAM_DIR_IN DMA_FROM_DEVICE
+-#define CAM_DIR_OUT DMA_TO_DEVICE
+-#define CAM_DIR_UNKNOWN DMA_BIDIRECTIONAL
++#ifndef SCSI_DATA_UNKNOWN
++#define SCSI_DATA_UNKNOWN 0
++#define SCSI_DATA_WRITE 1
++#define SCSI_DATA_READ 2
++#define SCSI_DATA_NONE 3
++#endif
++#define CAM_DIR_NONE SCSI_DATA_NONE
++#define CAM_DIR_IN SCSI_DATA_READ
++#define CAM_DIR_OUT SCSI_DATA_WRITE
++#define CAM_DIR_UNKNOWN SCSI_DATA_UNKNOWN
+
+ /*
+ * These ones are used as return code from
+diff -urN kernel-source-2.6.6.orig/drivers/scsi/sym53c8xx_2/sym_hipd.c kernel-source-2.6.6/drivers/scsi/sym53c8xx_2/sym_hipd.c
+--- kernel-source-2.6.6.orig/drivers/scsi/sym53c8xx_2/sym_hipd.c 2004-05-10 03:48:00.000000000 -0600
++++ kernel-source-2.6.6/drivers/scsi/sym53c8xx_2/sym_hipd.c 2004-06-09 22:38:58.894474959 -0600
+@@ -50,8 +50,7 @@
+ * SUCH DAMAGE.
+ */
+
+-#define SYM_VERSION "2.1.18j"
+-#define SYM_DRIVER_NAME "sym-" SYM_VERSION
++#define SYM_DRIVER_NAME "sym-2.1.18i"
+
+ #include "sym_glue.h"
+ #include "sym_nvram.h"
+@@ -3184,7 +3183,7 @@
+ /*
+ * patch requested size into sense command
+ */
+- cp->sensecmd[0] = REQUEST_SENSE;
++ cp->sensecmd[0] = 0x03;
+ cp->sensecmd[1] = 0;
+ if (tp->tinfo.curr.scsi_version <= 2 && cp->lun <= 7)
+ cp->sensecmd[1] = cp->lun << 5;
+@@ -5694,7 +5693,7 @@
+ * On standard INQUIRY response (EVPD and CmDt
+ * not set), sniff out device capabilities.
+ */
+- if (cp->cdb_buf[0] == INQUIRY && !(cp->cdb_buf[1] & 0x3))
++ if (cp->cdb_buf[0] == 0x12 && !(cp->cdb_buf[1] & 0x3))
+ sym_sniff_inquiry(np, cp->cam_ccb, resid);
+ #endif
+