change these from bp->b_un.b_addr to bp->b_data, as well. This also
allows us more flexibility to experiment with other data buffer types
hung off of struct buf.
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.
The old timeout()/untimeout() API has been removed from the kernel.
- Make local-only function and variables static.
- Move function prototypes and extern variable declarations to
header files.
- Delete unused variables.
There's still a handful of extern declaraions that should be fixed up.
+ Add a quirk table.
+ Assume all else is a modern drive that can do variable block
lengths (this is the main reason for this work - the old driver
only ever seemed to write 512 byte blocks!).
+ Keep track of values for mtget's mt_fileno, mt_blkno.
+ Handle a few extra MTIOCTOP commands.
Ideas gleaned from our MI scsi tape driver and the FreeBSD CAM tape
driver. Tested on a TKZ09 (DEC badged Exabyte 8500), a TLZ06 (DEC
DAT) and TK50.
Many thanks to Pierre Bergdolt for helping with testing.
Update the pmax SCSI drivers (rz and tz) to use <machine/conf.h>.
Fix the driver entry points to have the correct signatures -- add
"ioflag" args to read() and write(), add "struct proc *p" arg to
open and close.
Stop using __BDEVSW_DUMP_OLD_TYPE, and update the rzdump and tzdump
entry points to have the correct, MI signatures.
NB: this is just syntactic sugar: both the caller and the dump entry
points ignore the additional args, and do exactly what they did before.
This must be fixed before using dump entry points in non-pmax drivers
(e.g., the MI scsi code).
-Wall -Wmissing-prototypes:
Add prototypes.
Fix printf() format strings (%x vs pointer-arg, %x with a long int).
Fix a possibly-uninitialized shadowing local variable "resid" in tzdone().
include <sys/systm.h> to get prototypes for printf() and bcopy().
"struct pmax_device" to avoid conflict with <sys/device.h>.
Change the signature of interrupt-handlers to take a void *
(a pointer to the softc) and return an int (indicating spurious
interrupts or other conditions.)
pmax conf.c references them. A cut-and-paste job from the pmax
rzwrite() and rzread(). tzwrite() and tzread() are utterly untested.
tzwrite() should also check for write-protect, or handle writes to a
write-protected tape gracefully.