Home | History | Annotate | Download | only in dev
History log of /src/sys/arch/hp300/dev/rdreg.h
RevisionDateAuthorComments
 1.21  10-Feb-2024  andvar s/indicies/indices/ in comments.
 1.20  25-Nov-2022  tsutsui Use proper integer types for HP-IB xfer parameters.

No visible regression on 425t and HPDisk.
 1.19  21-Nov-2022  tsutsui Use common macro for numbers of cylinders and blocks for HP-IB disks.

No binary changes.
 1.18  23-May-2022  andvar s/boundries/boundaries/, s/itterate/iterate/ and few more typos.
 1.17  11-Jul-2021  tsutsui Add Device and drive info of 2202A, 7908A, 7911A, and 7941A.

Geometries and description info are taken from hpdrive.ini.sample
in HPDrive. Briefly tested on HPDisk.
 1.16  09-Jul-2021  tsutsui Add support of multiple rd(4) disks on all punits for HPDisk.

Special thanks to Anders Gustafsson, the author of "HPDisk"
(GPIB disk emulator) http://www.dalton.ax/hpdisk/
for providing bare boards and improving firmwares for NetBSD/hp300.
 1.15  05-Jul-2021  tsutsui Cleanup duplicated CS/80 indentify structures. From OpenBSD.

https://marc.info/?l=openbsd-cvs&m=113227249626888&w=2
> Define the CS/80 identify structure only once and correctly, instead of
> duplicating it in every CS/80 driver and using an hardcoded number for
> its size.
> No functional change.

https://marc.info/?l=openbsd-cvs&m=113273001020159&w=2
> Pick HP-IB describe structures changes from main kernel code here as well.
 1.14  18-May-2021  tsutsui Consistently use #define<tab> here.
 1.13  08-Feb-2011  rmind branches: 1.13.60; 1.13.72; 1.13.74;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.12  11-Dec-2005  christos branches: 1.12.100; 1.12.106; 1.12.108;
merge ktrace-lwp.
 1.11  19-Apr-2004  wiz Spell removable with only two es. Inspired by jmc@openbsd.
 1.10  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.9  11-Feb-2002  wiz branches: 1.9.16;
"doesn't" should have an 's'.
 1.8  27-May-2001  gmcgarry branches: 1.8.2; 1.8.8;
Alignment fix. rd disks now work on ELF systems.
 1.7  09-Feb-1996  scottr branches: 1.7.42;
Info from Mike Hibler <mike@cs.utah.edu> indicates that the probable
intent for the value of the C_REL constant was 0xc0. Testing has turned
up no adverse effect on tape or disk devices, and in fact this change
apparently makes my 9145 tape work as expected. (!) Closes PRs 1874 and
1971.
 1.6  31-Dec-1995  thorpej XXX TEMPORARY STOP-GAP MEASURE! A 12-bit command modifier was being
squished into an 8-bit position in a command stream! Which one is wrong?
Changed the constant from 0x140 to 0x40, which is what ended up happening
anyhow. This exists in the old Utah sources, too! How long has this
bug existed?!
 1.5  26-Oct-1994  cgd branches: 1.5.2;
new RCS ID format.
 1.4  23-May-1994  mycroft Merge with 4.4-Lite.
 1.3  01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.2  22-May-1993  cgd add rcsids to everything and clean up headers
 1.1  13-May-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1  13-May-1993  cgd add hp300 kernel files. generic kernel files might need some help...
 1.5.2.1  12-Feb-1996  thorpej Bring in C_REL fix from main branch; reported to make 9145 tapes work
properly, and even seems to make HP-IB disks a bit faster.
 1.7.42.1  21-Jun-2001  nathanw Catch up to -current.
 1.8.8.2  28-Feb-2002  nathanw Catch up to -current.
 1.8.8.1  27-May-2001  nathanw file rdreg.h was added on branch nathanw_sa on 2002-02-28 04:09:25 +0000
 1.8.2.1  16-Mar-2002  jdolecek Catch up with -current.
 1.9.16.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.16.2  18-Sep-2004  skrll Sync with HEAD.
 1.9.16.1  03-Aug-2004  skrll Sync with HEAD
 1.12.108.1  17-Feb-2011  bouyer Sync with HEAD
 1.12.106.1  06-Jun-2011  jruoho Sync with HEAD.
 1.12.100.1  05-Mar-2011  rmind sync with head
 1.13.74.1  31-May-2021  cjep sync with head
 1.13.72.2  01-Aug-2021  thorpej Sync with HEAD.
 1.13.72.1  17-Jun-2021  thorpej Sync w/ HEAD.
 1.13.60.2  06-Dec-2022  martin Pull up following revision(s) (requested by tsutsui in ticket #1552):

sys/arch/hp300/dev/rd.c: revision 1.120
sys/arch/hp300/dev/rd.c: revision 1.121
sys/arch/hp300/dev/rd.c: revision 1.122
sys/arch/hp300/dev/rd.c: revision 1.123
sys/arch/hp300/dev/rd.c: revision 1.124
sys/arch/hp300/dev/rdreg.h: revision 1.19
sys/arch/hp300/dev/rd.c: revision 1.111
sys/arch/hp300/dev/rd.c: revision 1.112
sys/arch/hp300/dev/rd.c: revision 1.113
sys/arch/hp300/stand/common/rd.c: revision 1.12
sys/arch/hp300/dev/rd.c: revision 1.114
sys/arch/hp300/stand/common/rd.c: revision 1.13
sys/arch/hp300/dev/rd.c: revision 1.115
sys/arch/hp300/stand/common/rd.c: revision 1.14
sys/arch/hp300/dev/rd.c: revision 1.116
sys/arch/hp300/stand/common/rd.c: revision 1.15
sys/arch/hp300/dev/rd.c: revision 1.117
sys/arch/hp300/dev/rd.c: revision 1.118
sys/arch/hp300/dev/rd.c: revision 1.119
sys/arch/hp300/dev/rdvar.h: revision 1.27
sys/arch/hp300/dev/rdreg.h: revision 1.20

Sync a list of HP-IB disk IDs with kernel's one.
Now bootloader can boot from 2202A, 7908A, 7911A, and 7941A.
Tested on 425t and HPDisk.

Make local variables static and read only ones const.

Use common macro for numbers of cylinders and blocks for HP-IB disks.
No binary changes.

Fix "rd(4) at punits not configured on HPDisk are misprobed" problem.
- check not only stat value returned by C_QSTAT command against
each punit but also desc.d_name returned by C_DESC command
because it looks HPDisk responds to commands against punits supported
but not-configured punits at 1-3
- prepare rdreset_unit() function to manage reset punit ops during
probe without valid softc

The stragety is taken from OpenBSD with several modification.
Tested on 425t with real 9122D and HPDisk emulating two 7937H drives.
Should be pulled up to netbsd-9.

Remove now unused buffer members from softc prepared only for rdreset().

Use proper integer types for HP-IB xfer parameters.
No visible regression on 425t and HPDisk.

Sync with rdreg.h integer type changes.

Remove unnecessary declarations.

Check bounds of RAW_PART by bounds_check_with_mediasize() as other drivers.
With this check, dd(1) without a count value against a raw partition
is terminated properly at the end of media. Tested on 425t and HPDisk.
Should be pulled up to netbsd-9.

Check bounds of each partition by MI bounds_check_with_label(9).
The previous implementation was committed in rev 1.26 about 26 years ago
and it looks there is no quirk to use the old MD one.

Pass a correct dev_t arg to disk_ioctl().
Probably harmless.

Remove a duplicated static function declaration.

Set disk_geom parameters required by DIOCGPARTINFO in disk_ioctl().
With this change raid(4) no longer complains before mountroot:
RAIDframe: can't get disk size for dev rd0 (22)
Should be pulled up to netbsd-9.

Use proper RAW_PART macro rather than a magic number.

Remove more duplicated static function declarations.

Misc KNF and cosmetics.

Add empty DIOCCACHESYNC ioctl(2) for rd(4).
Without this raid(4) always complains on various raidctl(8) ops:
raid0: cache flush[0] to component 0 failed (22)
RAID1 configured by raid(4) just works HP-IB disks on hp300.

Explicitly include <sys/kernel.h> for hz(9) as man pages says.
XXX: it looks sys/param.h r1.615 and later also has extern int hz
 1.13.60.1  14-Jul-2021  martin Pull up following revision(s) (requested by tsutsui in ticket #1323):

sys/arch/hp300/dev/rd.c: revision 1.109
sys/arch/hp300/stand/Makefile.buildboot: revision 1.37
sys/arch/hp300/stand/common/ct.c: revision 1.8
sys/arch/hp300/dev/hpibvar.h: revision 1.22
sys/arch/hp300/dev/ct.c: revision 1.62
sys/arch/hp300/dev/hpibvar.h: revision 1.23
sys/arch/hp300/dev/ct.c: revision 1.63
sys/arch/hp300/dev/hpibvar.h: revision 1.24
sys/arch/hp300/dev/mt.c: revision 1.55
sys/arch/hp300/dev/rdreg.h: revision 1.14
sys/arch/hp300/dev/hpib.c: revision 1.43 (via patch)
sys/arch/hp300/dev/rdreg.h: revision 1.15
sys/arch/hp300/dev/rdreg.h: revision 1.16
sys/arch/hp300/dev/rdreg.h: revision 1.17
etc/etc.hp300/MAKEDEV.conf: revision 1.15
sys/arch/hp300/stand/common/hpibvar.h: revision 1.6
sys/arch/hp300/stand/common/rd.c: revision 1.11
sys/arch/hp300/dev/ctreg.h: revision 1.11
sys/arch/hp300/dev/rdvar.h: revision 1.24
sys/arch/hp300/dev/rdvar.h: revision 1.25
sys/arch/hp300/dev/rdvar.h: revision 1.26
sys/arch/hp300/dev/rd.c: revision 1.103
sys/arch/hp300/dev/rd.c: revision 1.104
sys/arch/hp300/dev/rd.c: revision 1.105
sys/arch/hp300/dev/rd.c: revision 1.106
sys/arch/hp300/dev/rd.c: revision 1.107
sys/arch/hp300/dev/rd.c: revision 1.108

Consistently use #define<tab> here.

Consistently use #define<tab> as rdreg.h.

No need to bother to use aprint_debug(9) inside #ifdef DEBUG block.

Pull HP-IB probe fixes from OpenBSD/hp300.
https://marc.info/?l=openbsd-cvs&m=113217630426615&w=2

Overhaul the way HP-IB devices are probed. We will now do an exhaustive
probe of the (slave, punit) tuple space, since this is the only way we
can get a dual disk or dual tape enclosure to attach two devices of the
same kind.

This allows using multiple rd(4) disk images on the same slave emulated
by HPDisk (and probably the real 9122D with dual floppy disk drives).

Thanks to Miod Vallat for suggesting this fix.

Move attach messages from common rdident() to explicit rdattach().

Cleanup duplicated CS/80 indentify structures. From OpenBSD.
https://marc.info/?l=openbsd-cvs&m=113227249626888&w=2

Define the CS/80 identify structure only once and correctly, instead of
duplicating it in every CS/80 driver and using an hardcoded number for
its size.
No functional change.
https://marc.info/?l=openbsd-cvs&m=113273001020159&w=2

Pick HP-IB describe structures changes from main kernel code here as well.

Add support of multiple rd(4) disks on all punits for HPDisk.

Special thanks to Anders Gustafsson, the author of "HPDisk"
(GPIB disk emulator) http://www.dalton.ax/hpdisk/
for providing bare boards and improving firmwares for NetBSD/hp300.

Specify -fno-unwind-tables to shrink binaries.

Before:
text data bss dec hex filename
77902 4328 137120 219350 358d6 uboot

After:
text data bss dec hex filename
64186 4328 137120 205634 32342 uboot

Create rd3 device nodes, for HPDisk.

Add Device and drive info of 2202A, 7908A, 7911A, and 7941A.

Geometries and description info are taken from hpdrive.ini.sample
in HPDrive. Briefly tested on HPDisk.

Print rd(4) capacity and geometry info as sd(4) and wd(4) do.

Before:
rd0 at hpibbus1 slave 0 punit 0: 7937H
rd0: 698 cylinders, 13 heads, 1116102 blocks, 512 bytes/block

After:
rd0 at hpibbus1 slave 0 punit 0: 7937H
rd0: 544 MB, 698 cyl, 13 head, 123 sec, 512 bytes/block x 1116102 blocks

RSS XML Feed