From owner-freebsd-current Mon Apr 17 01:39:46 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id BAA12018 for current-outgoing; Mon, 17 Apr 1995 01:39:46 -0700 Received: from bunyip.cc.uq.oz.au (bunyip.cc.uq.oz.au [130.102.2.1]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id BAA12003 for ; Mon, 17 Apr 1995 01:39:35 -0700 Received: from cc.uq.oz.au by bunyip.cc.uq.oz.au id <02910-0@bunyip.cc.uq.oz.au>; Mon, 17 Apr 1995 18:35:53 +1000 Received: from netfl15a.devetir.qld.gov.au by pandora.devetir.qld.gov.au (8.6.10/DEVETIR-E0.3a) with ESMTP id PAA19994; Mon, 17 Apr 1995 15:17:48 +1000 Received: from localhost by netfl15a.devetir.qld.gov.au (8.6.8.1/DEVETIR-0.1) id FAA08801; Mon, 17 Apr 1995 05:15:55 GMT Message-Id: <199504170515.FAA08801@netfl15a.devetir.qld.gov.au> X-Mailer: exmh version 1.6beta 3/23/95 To: "Justin T. Gibbs" cc: current@FreeBSD.org Subject: Re: Fixed seagate.c (incl. recent devconf changes) In-reply-to: Your message of "Fri, 14 Apr 1995 19:08:51 MST." <199504150208.TAA00515@estienne.cs.berkeley.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 17 Apr 1995 15:15:54 +1000 From: Stephen Hocking Sender: current-owner@FreeBSD.org Precedence: bulk > >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!