Date: Fri, 10 Jan 1997 00:46:58 -0500 (EST) From: Bill Paul <wpaul@skynet.ctr.columbia.edu> To: current@freebsd.org Subject: 2.2-BETA and HP 12000e Superstore DAT changer Message-ID: <199701100547.AAA27283@skynet.ctr.columbia.edu>
next in thread | raw e-mail | index | archive | help
We recently got an HP Superstore 12000e DAT autoloader. (HP and their equipment grants -- gotta love 'em.) This is basically an HP 1533C DAT drive with a 6 cartridge magazine. If you use 120m tapes, the manual claims 4GB native capacity per tape (24 GB total) or 8 GB compressed capacity per tape (48 GB total). (I tend not to pay too much attention to the compressed stats.) The drive has a switchblock for controlling certain features and two thumbwheels on the back: one for the SCSI target setting and one for setting changer options. (The manual does not describe what the different changer settings do exactly, but so far I haven't needed to change the factory setting, so I'm not too worried it.) After finally digging up a 1542CF SCSI controller, I tried to get this thing to work with FreeBSD 2.2-BETA. Other than flipping on the switch that forces compression (since I don't know how to enable it via software with FreeBSD), I left all the settings as they came from the factory. I used the following lines in the kernel config: controller aha0 at isa? port "IO_AHA0" bio irq ? drq 5 vector ahaintr controller scbus0 at aha0 tape st0 at scbus0 target 3 unit 0 device ch0 at scbus0 target 3 unit 1 The dape drive itself is probed correctly at target 3, LUN 0 and works fine. However the changer at LUN 1 is never detected. After groping through the scsi subsystem code for a while, I happened onto the scsi_probe_bus() function in sys/scsi/scsiconf.c. Here there is a flag called 'maybe_more' which defaults to 0. Apparently this controls whether or not the function will probe for more than just LUN 0, and since it's 0 by default, it never does. After I changed this to 1 and made a new kernel, the changer device was correctly probed and now it also works fine, thanks to Gary Palmer who gave me a sample program that uses the chio interface which I customized to handle the 12000e's changer. (If you want a copy of this program, ftp to skynet.ctr.columbia.edu and download /pub/freebsd/changer.c.) The SCSI changer driver works great with this device: I can load any of the 6 tapes from the magazine into the drive and even query the drive to see which slot is currently loaded. It would be nice if we had a chcontrol utility in the base system to do this though; people shouldn't have to hack together their own custom tools for these kinds of things. (Note that HP supplies a special 'mtx' utility with the drive for just this purpose, however it is not supplied with source code, and the only 386 binaries are for SCO Open Deathtrap/Open Sewer. The HP utility is also meant to be used with a SCSI passthru device to send commands directly to the drive; consequently it doesn't require a special kernel driver.) My question is: why does scsiconf not probe for other LUNs? In this case I even deliberately wired down the devices to specific targets and LUNs, and the kernel _still_ wouldn't probe the changer until I munged the code. This strikes me as a little bogus: when I tell the kernel that there's a device at target 3, LUN 1, it should bleeding well probe for a device there. -Bill -- ============================================================================= -Bill Paul (212) 854-6020 | System Manager, Master of Unix-Fu Work: wpaul@ctr.columbia.edu | Center for Telecommunications Research Home: wpaul@skynet.ctr.columbia.edu | Columbia University, New York City ============================================================================= "It is not I who am crazy; it is I who am mad!" - Ren Hoek, "Space Madness" =============================================================================
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701100547.AAA27283>