Subject: Re: Powerbook 150
To: Gerardo Alvarez <gerardoalvarez@telefonica.net>
From: Kazuyuki Inanaga <happyday@pp.iij4u.or.jp>
List: port-mac68k
Date: 01/14/2004 02:55:23
Hello,

    This post is too much delayed, maybe your PB150 is already running with
Dayna PORT SCSI/Link. I (also) got a small success on Classic II.

At 5:40 PM +0100 03.12.4, Gerardo Alvarez wrote:
>I have a PB150 here which I managed to boot and install with Takeshi Shibagakis
>kernel (release soft_float). It has a 4,5 GB IDE HD, and 24 Mb RAM.
>
>I have just received a Dayna PORT SCSI/Link ethernet adapter, which works great
>under macos 7.6, but I cant find how to make it work under NetBSD, although I
>remember I saw a page with some code for that.

I think you have read next;

Subject: Re: scsi-ethernet again
http://mail-index.NetBSD.org/port-mac68k/2002/09/17/0002.html
http://www.ff.iij4u.or.jp/~ngc/eng/netbsde.htm

I have a DaynaPORT SCSI/Link-T, and it is working fine with my PowerBook165
('030 33MHz, NO-FPU, SCSI, 8MB RAM) on NetBSD 1.6G.
This 1.6G kernel is built by Hiroshi Noguchi(above), and userland is by
Takeshi Shibagaki (release 'soft_float', same as yours).

See dmesg;
http://www.pp.iij4u.or.jp/~happyday/daynaport.html

I got that kernel "1.6G (PB180C)" from Noguchi's Japanese webpage, but the
download link is disabled now. Anyway, I'd like to build my own 1.6.1 kernel
for my Macintosh Classic II ('030 16MHz, with FPU, SCSI, 10MB RAM) +
DaynaPORT SCSI/Link-T.

My procedure;

1) Get and gunzip the driver for DaynaPORT SCSI/Link
http://www.ff.iij4u.or.jp/~ngc/data/if_dse.c.gz

2) Put the driver file into sys/dev/scsipi, and add the description in
sys/dev/scsipi/files.scsipi for dse. (like as device se)
    ...
    device	se: ifnet, ether, arp
    attach	se at scsibus
    file	dev/scsipi/if_se.c		se
	needs-flag

    device	dse: ifnet, ether, arp
    attach	dse at scsibus
    file	dev/scsipi/if_dse.c		dse
	needs-flag

3) Edit machine description file, and add one line for dse.

># SCSI devices
    ...
    se*	at scsibus? target ? lun ?	# SCSI ethernet
    dse*	at scsibus? target ? lun ?	# SCSI ethernet

That's all and easy. But alas, I got Error Stop. (cross compiling on i386)

/usr/tools/bin/m68k--netbsdelf-gcc  -msoft-float -ffreestanding  -O2 -Werror
-Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes
-Wstrict-prototypes -Wno-uninitialized  -Dmac68k -I.  -I../../../../arch
-I../../../.. -nostdinc -DHZ="0x3c" -DM68040 -DM68030 -DM68020 -DFPU_EMULATE
-DLKM -DGRF_COMPAT -DMAXUSERS=16 -D_KERNEL -D_KERNEL_OPT   -c
/usr/src/sys/arch/mac68k/compile/GENERIC_DAYNA/../../../../dev/scsipi/if_
dse.c
/usr/src/sys/arch/mac68k/compile/GENERIC_DAYNA/../../../../dev/scsipi/if_
dse.c:302: `noread' undeclared here (not in a function)
[...]
*** Error code 1

Stop.
nbmake: stopped in /usr/src/sys/arch/mac68k/compile/GENERIC_DAYNA

Needs some works to catch up 1.6.1?  Yes, I think so.
"if_dse.c" based on "if_se.c" (driver for Cabletron EA41x SCSI to Ethernet
adaptor). I expected to find something with comparing two. After some trial
and error, I found an easy (crazy) way.

In "if_dse.c":
301	const struct cdevsw dse_cdevsw = {
302		dseopen, dseclose, noread, nowrite, dseioctl,
303		nostop, notty, nopoll, nommap,
304	};

I rudely deleted these 4 lines. I don't know what these are. These 4 "no*"
cause Error and Stop on the make process, anyway. To my surprise, Error Stop
dosen't appear anymore, and DaynaPORT SCSI/Link-T works with my Classic II.
Can you believe that?

See dmesg, some statistics and 'machine description file' on my webpage.
I've found one problem. "Bus error - core dumped" appears less than once in
every booting. Why? Because I did crazy, of course ;-)

"probe(ncrscsi0:0:6:1): illegal request" appears on this kernel, 1.6G
(PB180C), too. It is a problem belongs DaynaPORT SCSI/Link-T, isn't it?  It
doesn't appear on 1.6G (PB180C) + Cabletron EA412. It's harmless, I don't
care it :)

I'm also trying to make PB165 works, it's not so easy for me because of
NO-FPU ...  DaynaPORT SCSI/Link-T works on my PB165, but I see some
problems. Noguchi's 1.6G kernel + Shibagaki's 'soft_float' works fine on
PB165, I believe they did something "Magic". I'd like to hear the spell ...
Please let me(us) know when you got some progress on your PB150.

Thanks,
Kazu Inanaga