Subject: Disklabel(5)/(8) ??
To: port-mac68k <port-mac68k@NetBSD.ORG>
From: Hauke Fath <saw@sun0.urz.uni-heidelberg.de>
List: port-mac68k
Date: 10/07/1996 01:24:37
Hi y'all,

coming the 'natural' way through the iwm driver (autoconfig code,
ioctls, fdopen(), I am digressing a bit at the moment and hacking at the
disklabel code. I shall need it soon...

I have re-enabled setdisklabel() and writedisklabel() in
mac68k/disksubr.c, fixed what I think is a minor bug in readdisklabel(),
dropped in some comments and am now able to read and write native
disklabels just fine.

But when I insert a cartridge with a native label and try to newfs(8)
it, the kernel keeps telling me that the device is not configured
(ENXIO, I suppose). I have configured a kernel with SCSIDEBUG and
increased the debug level in scsi/scsi_debug.h to level 4; but the debug
output shows me no trace of a problem. The kernel loads the disklabel
and then appears to just give up silently. 

The end of the trace looks like

----------------------------------------------------------------------
Oct  7 00:23:15 se30 /netbsd: sd2(sbc0:2:0): calling private start()
Oct  7 00:23:16 se30 /netbsd: sd2(sbc0:2:0): sdstart sd2(sbc0:2:0):
Params loaded
sd2(sbc0:2:0): sdstrategy sd2(sbc0:2:0): 512 bytes @ blk 0
Oct  7 00:23:16 se30 /netbsd: sd2(sbc0:2:0): sdstart sd2(sbc0:2:0):
scsi_cmd
Oct  7 00:23:16 se30 /netbsd: sd2(sbc0:2:0): scsi_get_xs
Oct  7 00:23:16 se30 /netbsd: sd2(sbc0:2:0):Oct  7 00:23:16 se30:
returning
Oct  7 00:23:16 se30 /netbsd: sd2(sbc0:2:0): scsi_done
Oct  7 00:23:17 se30 /netbsd: sd2(sbc0:2:0): command: 8,0,0,0,1,0-[512
bytes]
Oct  7 00:23:17 se30 /netbsd: ------------------------------
Oct  7 00:23:17 se30 /netbsd: 000: 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00
Oct  7 00:23:17 se30 /netbsd: 016: 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00
Oct  7 00:23:17 se30 /netbsd: 032: 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00
Oct  7 00:23:17 se30 /netbsd: 048: 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00
Oct  7 00:23:17 se30 /netbsd: ------------------------------
Oct  7 00:23:17 se30 /netbsd: sd2(sbc0:2:0): calling private done()
Oct  7 00:23:18 se30 /netbsd: sd2(sbc0:2:0): continuing with generic
done()
Oct  7 00:23:18 se30 /netbsd: sd2(sbc0:2:0): sc_err1,err = 0x0
Oct  7 00:23:18 se30 /netbsd: sd2(sbc0:2:0): scsi_free_xs
Oct  7 00:23:18 se30 /netbsd: sd2(sbc0:2:0): calling private start()
Oct  7 00:23:18 se30 /netbsd: sd2(sbc0:2:0): sdstart sd2(sbc0:2:0): Oct
7 00:23:18 se30 /netbsd: sd2(sbc0:2:0): sdstart sd2(sbc0:2:0): Disklabel
loaded sd2(sbc0:2:0): scsi_cmd
Oct  7 00:23:18 se30 /netbsd: sd2(sbc0:2:0): scsi_get_xs
Oct  7 00:23:19 se30 /netbsd: sd2(sbc0:2:0): returning
Oct  7 00:23:19 se30 /netbsd: sd2(sbc0:2:0): scsi_done
Oct  7 00:23:19 se30 /netbsd: sd2(sbc0:2:0): command: 1e,0,0,0,0,0-[0
bytes]
Oct  7 00:23:19 se30 /netbsd: sd2(sbc0:2:0): calling private done()
Oct  7 00:23:19 se30 /netbsd: sd2(sbc0:2:0): continuing with generic
done()
Oct  7 00:23:19 se30 /netbsd: sd2(sbc0:2:0): back in cmd()
Oct  7 00:23:19 se30 /netbsd: sd2(sbc0:2:0): sc_err1,err = 0x0
Oct  7 00:23:19 se30 /netbsd: sd2(sbc0:2:0): scsi_free_xs
Oct  7 00:23:19 se30 /netbsd: sd2(sbc0:2:0): calling private start()
Oct  7 00:23:20 se30 /netbsd: sd2(sbc0:2:0): sdstart
----------------------------------------------------------------------

- and then silence in the log, and newfs returns with "device not
configured". 

Does that ring a bell for anyone?

        hauke

-- 
"It's never straight up and down"  (DEVO)