Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Apr 1995 15:15:54 +1000
From:      Stephen Hocking <sysseh@devetir.qld.gov.au>
To:        "Justin T. Gibbs" <gibbs@estienne.CS.Berkeley.EDU>
Cc:        current@FreeBSD.org
Subject:   Re: Fixed seagate.c (incl. recent devconf changes)
Message-ID:  <199504170515.FAA08801@netfl15a.devetir.qld.gov.au>
In-Reply-To: Your message of "Fri, 14 Apr 1995 19:08:51 MST." <199504150208.TAA00515@estienne.cs.berkeley.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
> >Recently I reported a bug (i386/337) about the -current seagate controller
> >code not working with my hardware. I also enclosed a fix, but I'm not sure if 
> >after the recent set of SCSI changes that it has made it in or is event being 
> >considered yet. Anyway, incorporating the recent changes, here's the working
> >version. It's slow, but it works, unlike the later version.
> >
> 
> Your changes are based on a very old version of the driver.  This makes
> it difficult for us to see what you changed and what was changed in other
> revisions of the driver.  Can you make your changes relative to version 1.7
> (today's current) and resubmit them as context diffs (diff -c)?  
> 
> Thank you very much for your submission, and I hope we can integrate your
> changes once we get them in a format where we can better understand what
> they are. :)
> 
> --
> Justin T. Gibbs
> ==============================================
> TCS Instructional Group - Programmer/Analyst 1
>   Cory | Po | Danube | Volga | Parker | Torus
> ==============================================

OK, here it is, against the seagate.c found on the 2.0 CDROM....

*** /tmp/seagate.c.2.0	Mon Apr 17 15:13:16 1995
--- seagate.c	Thu Apr 13 13:25:07 1995
***************
*** 104,111 ****
   * the use of blind transfers coded in assembler. SEA_ASSEMBLER is no good
   * without SEA_BLINDTRANSFER defined.
   */
! #define SEA_BLINDTRANSFER	1	/* do blind transfers */
! #define SEA_ASSEMBLER	1	/* Use assembly code for fast transfers */
  
  /*
   * defining SEANOMSGS causes messages not to be used (thereby disabling
--- 104,111 ----
   * the use of blind transfers coded in assembler. SEA_ASSEMBLER is no good
   * without SEA_BLINDTRANSFER defined.
   */
! #undef SEA_BLINDTRANSFER	1	/* do blind transfers */
! #undef SEA_ASSEMBLER	1	/* Use assembly code for fast transfers */
  
  /*
   * defining SEANOMSGS causes messages not to be used (thereby disabling
***************
*** 390,395 ****
--- 390,404 ----
  }
  #endif
  
+ static char sea_description [80]; /* XXX BOGUS!!! */
+ static struct kern_devconf sea_kdc[NSEA] = {{
+ 	0, 0, 0, "sea", 0, { MDDT_ISA, 0, "bio" },
+ 	isa_generic_externalize, 0, 0, ISA_EXTERNALLEN, &kdc_isa0, 0,
+ 	DC_UNCONFIGURED, sea_description,
+ 	DC_CLS_MISC             /* host adapters aren't special */
+ } };
+ 
+ 
  /***********************************************************************\
  * Check if the device can be found at the port given and if so, detect	*
  * the type of board. Set it up ready for further work. Takes the	*
***************
*** 514,519 ****
--- 523,530 ----
    sea->st0x_dr = (void *) (((unsigned char *) sea->basemaddr) +
  			   ((sea->ctrl_type == SEAGATE) ? 0x1c00 : 0x1e00));
  
+   strcpy(sea_description, (sea->ctrl_type == SEAGATE) ? "Seagate ST01/ST02":
+                                          "Future Domain TMC-885/TMC-950");
    /* Test controller RAM (works the same way on future domain cards?) */
    *(sea->basemaddr + SEAGATERAMOFFSET) = 0xa5;
    *(sea->basemaddr + SEAGATERAMOFFSET + 1) = 0x5a;
***************
*** 537,560 ****
    return(1);
  }
  
- static struct kern_devconf kdc_sea[NSEA] = { {
- 	0, 0, 0,		/* filled in by dev_attach */
- 	"sea", 0, { MDDT_ISA, 0, "bio" },
- 	isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- 	&kdc_isa0,		/* parent */
- 	0,			/* parentdata */
- 	DC_BUSY,		/* host adaptors are always busy */
- 	"Seagate ST01/02 SCSI controller"
- } };
- 
  static inline void
  sea_registerdev(struct isa_device *id)
  {
  	if(id->id_unit)
! 		kdc_sea[id->id_unit] = kdc_sea[0];
! 	kdc_sea[id->id_unit].kdc_unit = id->id_unit;
! 	kdc_sea[id->id_unit].kdc_isa = id;
! 	dev_attach(&kdc_sea[id->id_unit]);
  }
  
  /***********************************************\
--- 548,561 ----
    return(1);
  }
  
  static inline void
  sea_registerdev(struct isa_device *id)
  {
  	if(id->id_unit)
! 		sea_kdc[id->id_unit] = sea_kdc[0];
! 	sea_kdc[id->id_unit].kdc_unit = id->id_unit;
! 	sea_kdc[id->id_unit].kdc_isa = id;
! 	dev_attach(&sea_kdc[id->id_unit]);
  }
  
  /***********************************************\
***************
*** 571,576 ****
--- 572,578 ----
    printf("sea_attach called\n");
  #endif
  
+   sea_kdc[unit].kdc_state = DC_BUSY; /* host adapters are always busy */
    /* fill in the prototype scsi_link */
    sea->sc_link.adapter_unit = unit;
    sea->sc_link.adapter_targ = sea->our_id;


        I do not speak for the Worker's Compensation Board of Queensland -
                     They don't pay me enough for that!




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199504170515.FAA08801>