[parisc-linux] A small sym2 backport

Joel Soete soete.joel at tiscali.be
Sun Dec 21 07:38:03 MST 2003


Hi all,

here is a small patch resulting from my atempt to back port the new sym2 driver:
=========><=========
diff -Naur sym53c8xx_2.Orig/sym53c8xx.h sym53c8xx_2/sym53c8xx.h
--- sym53c8xx_2.Orig/sym53c8xx.h        2003-12-18 09:20:36.000000000 +0100
+++ sym53c8xx_2/sym53c8xx.h     2003-12-18 10:01:37.000000000 +0100
@@ -99,30 +96,27 @@
  /*
   *  Host template defintion
   */
-#if (LINUX_VERSION_CODE >= 0x020400) || defined(HOSTS_C) || defined(MODULE)
-
  #include <scsi/scsicam.h>

  #define SYM53C8XX {                                                    \
-       name:                   "sym53c8xx",                            \
-       detect:                 sym53c8xx_detect,                       \
-       release:                sym53c8xx_release,                      \
-       info:                   sym53c8xx_info,                         \
-       queuecommand:           sym53c8xx_queue_command,                \
-       use_new_eh_code:        1,                                      \
-       eh_abort_handler:       sym53c8xx_eh_abort_handler,             \
-       eh_device_reset_handler:sym53c8xx_eh_device_reset_handler,      \
-       eh_bus_reset_handler:   sym53c8xx_eh_bus_reset_handler,         \
-       eh_host_reset_handler:  sym53c8xx_eh_host_reset_handler,        \
-       bios_param:             scsicam_bios_param,                     \
-       can_queue:              0,                                      \
-       this_id:                7,                                      \
-       sg_tablesize:           0,                                      \
-       cmd_per_lun:            0,                                      \
-       use_clustering:         DISABLE_CLUSTERING,                     \
-       highmem_io:             1}
-
-#endif /* defined(HOSTS_C) || defined(MODULE) */
+       .name                   = "sym53c8xx",                          \
+       .detect                 = sym53c8xx_detect,                     \
+       .release                = sym53c8xx_release,                    \
+       .info                   = sym53c8xx_info,                       \
+       .queuecommand           = sym53c8xx_queue_command,              \
+       .use_new_eh_code        = 1,                                    \
+       .eh_abort_handler       = sym53c8xx_eh_abort_handler,           \
+       .eh_device_reset_handler= sym53c8xx_eh_device_reset_handler,    \
+       .eh_bus_reset_handler   = sym53c8xx_eh_bus_reset_handler,       \
+       .eh_host_reset_handler  = sym53c8xx_eh_host_reset_handler,      \
+       .bios_param             = scsicam_bios_param,                   \
+       .can_queue              = 0,                                    \
+       .this_id                = 7,                                    \
+       .sg_tablesize           = 0,                                    \
+       .cmd_per_lun            = 0,                                    \
+       .use_clustering         = DISABLE_CLUSTERING,                   \
+       .highmem_io             = 1                                     \
+}

  /*
   *  Translate kernel configuration parameters
@@ -292,27 +286,26 @@
   *
   *  Can be overriden at startup by a command line.
   */
-#define SYM_LINUX_DRIVER_SETUP                 \
-{                                              \
-       1,      /* pci_parity */                \
-       1,      /* scsi_parity */               \
-       CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS,     \
-       CONFIG_SCSI_SYM53C8XX_DEFAULT_SYNC,     \
-       7,      /* burst_order */               \
-       1,      /* scsi_led */                  \
-       1,      /* max_wide */                  \
-       1,      /* scsi_diff */                 \
-       0,      /* irq_mode */                  \
-       1,      /* scsi_bus_check */            \
-       7,      /* host_id */                   \
-       62,     /* max_offs */                  \
-       CONFIG_SCSI_SYM53C8XX_MAX_LUN,          \
-       3,      /* pci_fix_up */                \
-       0,      /* reverse_probe */             \
-       0,      /* verbose */                   \
-       0,      /* debug */                     \
-       3,      /* settle_delay */              \
-       1,      /* use_nvram */                 \
+#define SYM_LINUX_DRIVER_SETUP {                                       \
+       .pci_parity     = 1,                                    \
+       .scsi_parity    = 1,                                    \
+       .max_tag        = CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS,   \
+       .min_sync       = CONFIG_SCSI_SYM53C8XX_DEFAULT_SYNC,   \
+       .burst_order    = 7,                                    \
+       .scsi_led       = 1,                                    \
+       .max_wide       = 1,                                    \
+       .scsi_diff      = 1,                                    \
+       .irq_mode       = 0,                                    \
+       .scsi_bus_check = 1,                                    \
+       .host_id        = 7,                                    \
+       .max_offs       = 62,                                   \
+       .max_lun        = CONFIG_SCSI_SYM53C8XX_MAX_LUN,        \
+       .pci_fix_up     = 3,                                    \
+       .reverse_probe  = 0,                                    \
+       .verbose        = 0,                                    \
+       .debug          = 0,                                    \
+       .settle_delay   = 3,                                    \
+       .use_nvram      = 1,                                    \
  }

  /*
@@ -321,27 +314,26 @@
   *  Override initial setup from boot command line:
   *    sym53c8xx=safe:y
   */
-#define SYM_LINUX_DRIVER_SAFE_SETUP            \
-{                                              \
-       0,      /* pci_parity */                \
-       0,      /* scsi_parity */               \
-       0,      /* max_tag */                   \
-       50,     /* min_sync */                  \
-       0,      /* burst_order */               \
-       0,      /* scsi_led */                  \
-       1,      /* max_wide */                  \
-       1,      /* scsi_diff */                 \
-       0,      /* irq_mode */                  \
-       2,      /* scsi_bus_check */            \
-       7,      /* host_id */                   \
-       15,     /* max_offs */                  \
-       1,      /* max_lun */                   \
-       0,      /* pci_fix_up */                \
-       0,      /* reverse_probe */             \
-       2,      /* verbose */                   \
-       0,      /* debug */                     \
-       10,     /* settle_delay */              \
-       1,      /* use_nvram */                 \
+#define SYM_LINUX_DRIVER_SAFE_SETUP {                          \
+       .pci_parity     = 0,                                    \
+       .scsi_parity    = 0,                                    \
+       .max_tag        = 0,                                    \
+       .min_sync       = 50,                                   \
+       .burst_order    = 0,                                    \
+       .scsi_led       = 0,                                    \
+       .max_wide       = 1,                                    \
+       .scsi_diff      = 1,                                    \
+       .irq_mode       = 0,                                    \
+       .scsi_bus_check = 2,                                    \
+       .host_id        = 7,                                    \
+       .max_offs       = 15,                                   \
+       .max_lun        = 1,                                    \
+       .pci_fix_up     = 0,                                    \
+       .reverse_probe  = 0,                                    \
+       .verbose        = 2,                                    \
+       .debug          = 0,                                    \
+       .settle_delay   = 10,                                   \
+       .use_nvram      = 1,                                    \
  }

  /*
=========><=========

I test it against 2.4.23-pa3 on my c110 and b2k and seems Ok.

If there is still some interest fill free to ci (i don't have cvs access)

hth,
	Joel



More information about the parisc-linux mailing list