Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Aug 1996 22:46:27 -0700
From:      Arve Ronning <arver@sn.no>
To:        Bill Paul <wpaul@skynet.ctr.columbia.edu>
Cc:        Jan Knepper <106030.3360@CompuServe.COM>, freebsd-hackers@freebsd.org, arver@sn.no
Subject:   Re: 2.1.5R & ATAPI CDROM Problems
Message-ID:  <32195133.28D@sn.no>

next in thread | raw e-mail | index | archive | help
Jan Knepper wrote:
> 
> Arve Ronning is accused of writing:
> 
> /* Hello FreeBSD world !
> 
> After installing a Hitachi CDR-7730 ATAPI CDROM drive on my FreeBSD
> 2.1.5R box (and verifying that it works under DOS) I discovered a
> problem with mounting it :......  */
> 
> Did, or did you not get the 'modification' of Bill Paul I sent you?
> It worked for him, it might work for you!
> 
> Don't worry, be Kneppie,
> Jan

Thanks Jan, I *did* get your response. It just took me a while
to do the actual patching & testing. Following your advice, I
send the results to Bill Paul who wrote:

> Tonight I blew a few hours playing with the ATAPI support. The result
> was the small patch appended to this message, which seems to make the
> detection of ATAPI devices happen much more reliably. This patch is
> for 2.2-current.

So Bill, I applied your patches by hand since I only have 2.1.5R.
Hopefully, this is what you would expect :

*** wd.c.ori	Mon Oct 23 00:14:38 1995
--- wd.c	Mon Aug 19 11:36:05 1996
***************
*** 365,371 ****
  			du->dk_error = inb(du->dk_port + wd_error);
  			/* printf("Error (drv 1) : %x\n", du->dk_error); 
*/
  
! 			if(du->dk_error != 0x01)
  				goto nodevice;
  		} else	/* drive 0 fail */
  			goto nodevice;
--- 365,371 ----
  			du->dk_error = inb(du->dk_port + wd_error);
  			/* printf("Error (drv 1) : %x\n", du->dk_error); 
*/
  
! 			if(du->dk_error != 0x01 && du->dk_error != 0x81) 
/*arve*/
  				goto nodevice;
  		} else	/* drive 0 fail */
  			goto nodevice;
***************
*** 1449,1454 ****
--- 1449,1455 ----
  			return (1);
  		outb(du->dk_port + wd_sdh, WDSD_IBM | (du->dk_unit << 
4));
  		DELAY(5000);	/* usually unnecessary; drive select is 
fast */
+ 		inb(du->dk_port + wd_status); /*arve*/
  		if ((inb(du->dk_port + wd_status) & (WDCS_BUSY | 
WDCS_READY))
  		    != WDCS_READY
  		    || wdcommand(du, 0, 0, 0, 0, WDCC_RESTORE | WD_STEP) 
!= 0


Compared to the original 2.1.5R kernel this did not change the behaviour
of the system at all (which I did not expect it to, except may be the
extra inb()) :

- The probes still said
wdc0 at 0x1f0-0x1f7 irq 14 on isa
wdc0: unit 0 (wd0): <QUANTUM FIREBALL1080A>
wd0: 1039MB (2128896 sectors), 2112 cyls, 16 heads, 63 S/T, 512 B/S
wdc1 at 0x170-0x177 irq 15 on isa
wdc1: unit 0 (wd2): <ST3250A-XR>
wd2: 204MB (417792 sectors), 1024 cyls, 12 heads, 34 S/T, 512 B/S
wdc1: unit 1 (atapi): <HITACHI CDR-7730/0008a>, removable, iordy
wcd0: 689Kb/sec, 128Kb cache, audio play, 128 volume levels, ejectable 
tray
wcd0: medium type unknown, unlocked

- doing 'mount_cd9660 /dev/wcd0c /mnt' still responded
mount_cd9660: /dev/wcd0c: Device not configured

No testing was done on other IDE configurations like removing
wd2 (which holds the /var partition; will it boot without /var ?)
or moving wcd0 to wdc0 unit 1. The good news is that the patch does not
seem to break anything, at least not with my configuration. Although
I can't be too sure since I can't mount wcd0.

I hope this will serve as a small contribution towards your need
for testing the patches. If you want me to try out different IDE
configurations, please send some advice on moving /var to wd0.

Arve




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