Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 May 1996 09:57:47 +0000 ()
From:      Werner Griessl <croot@btp1da.phy.uni-bayreuth.de>
To:        crosswjo@hp-pcd.cv.hp.com
Cc:        questions@freebsd.org
Subject:   Re: Secondary EIDE Controller Problems...
Message-ID:  <199605090957.JAA19028@btp1da.phy.uni-bayreuth.de>
In-Reply-To: <9605082330.AA15366@hpcvusd.cv.hp.com> from John Crosswhite at "May 8, 96 04:30:14 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
> ----
> I am sending this to the list again.  It looks as if the first copy never
> made it.  Apologies for any duplicates.
> ----
> 
> My Config:
> 
> ASUS P55TP4XE
> Using both EIDE Ports:
> Primary   Port:  2 1.2 Gig Hard Disks
> Secondary Port:  1 Toshiba EIDE CD-ROM Drive
> FreeBSD 2.1.0-RELEASE
> 
> My kernel has the appropriate lines for wdc1 and wcd0.  Both of which 
> are straight from LINT.  Except for the wcd0 line which, of course, has a
> reference to wdc1.  Sorry, I am at work and do not have my kernel conf file 
> handy for exact quotation.  But, you get the idea.  Pretty generic stuff here.
> 
> I also have the ATAPI option enabled.
> 
> The problem is this:
> 
> At boot time when probes are taking place for wdc1 I get the following:
> 
> wdc1 not found at 0xblahblah
> 
> Which, I would take to mean that the secondary EIDE port
> is not sitting on the default IO port.  Now, how would I go about finding 
> what the I/O port address is for my secondary EIDE port?  This is an ASUS 
> motherboard and I have done nothing to change any of its default settings.  
> (Except disk geometries)
> 
> Does anybody have a configuration like this working?
> 
> Thanks AGAIN!
> 
> John Crosswhite
> crosswjo@cs.orst.edu
> 

I had the same problem and posted a patch for wd.c a few days ago to questions.
With your configuration (cdrom as master on the secondary port) this patch
should solve your problem.
The problem is that the probe in wd.c fails with only a cdrom-drive on the
2. port, probably not another port address.

Here is my original mail:


Last week I got my atapi-cdrom-drive and had some problems with
my FreesBSD-2.1R .
The kernel detected the drive only as slave on the IDE-port.
Unfortunately with this configuration (disk master, cdrom slave)
the disk transfer slows down by a factor of 2.

So I had a look into the source of wd.c and voila, a few changes to
wd.c made the cdrom-drive working on the second IDE-port as master drive !

Here is the patchfile (hopefully not only working for me) :

---------- cut here and copy to wd.c.patch -----------------------------
*** wd.c.ori	Fri May  3 08:16:31 1996
--- wd.c	Fri May  3 08:44:31 1996
***************
*** 480,500 ****
  		} else {
  			free(du, M_TEMP);
  			wddrives[lunit] = NULL;
! 		}
! 	}
  #ifdef ATAPI
! 	/*
! 	 * Probe all free IDE units, searching for ATAPI drives.
! 	 */
! 	for (unit=0; unit<2; ++unit) {
! 		for (lunit=0; lunit<NWD && wddrives[lunit]; ++lunit)
! 			if (wddrives[lunit]->dk_ctrlr == dvp->id_unit &&
! 			    wddrives[lunit]->dk_unit == unit)
! 				goto next;
  		atapi_attach (dvp->id_unit, unit, dvp->id_iobase,
  			&kdc_wdc[dvp->id_unit]);
- next:   }
  #endif
  	/*
  	 * Discard any interrupts generated by wdgetctlr().  wdflushirq()
  	 * doesn't work now because the ambient ipl is too high.
--- 480,496 ----
  		} else {
  			free(du, M_TEMP);
  			wddrives[lunit] = NULL;
! 
! /* included werner@btp1da.phy.uni-bayreuth.de (29.4.1996) */
  #ifdef ATAPI
! 		/* no disk !, search for ATAPI drive */
  		atapi_attach (dvp->id_unit, unit, dvp->id_iobase,
  			&kdc_wdc[dvp->id_unit]);
  #endif
+ 
+ 		}
+ 	}
+ 
  	/*
  	 * Discard any interrupts generated by wdgetctlr().  wdflushirq()
  	 * doesn't work now because the ambient ipl is too high.
----- then do a "patch < wd.c.patch" and recompile the kernel -----------

This should also work in STABLE (the wd.c is the same as in Release)

Werner


This is the dmesg-output from my system with the patched wd.c:
...
wdc0 at 0x1f0-0x1f7 irq 14 flags 0x80008000 on isa
wdc0: unit 0 (wd0): <WDC AC21000H>, 32-bit
wd0: 1033MB (2116800 sectors), 2100 cyls, 16 heads, 63 S/T, 512 B/S
wdc1 at 0x170-0x177 irq 15 flags 0x80008000 on isa
wdc1: unit 0 (atapi): <HITACHI CDR-7730/1002>, removable, iordy
wcd0: 689Kb/sec, 128Kb cache, audio play, 128 volume levels, ejectable tray
wcd0: medium type unknown, unlocked
...

Werner
P.S.: Please let me know if it works for you




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