Subject: scsipi/st.c issues
To: tech-kern NetBSD Mailinglist <tech-kern@NetBSD.ORG>
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
List: tech-kern
Date: 09/20/1999 21:16:30
I am in the middle of suggesting the st(4) driver to cooperate with
Tandberg TDC 4222 and SLR 5 drives. While I am trying to make some sense of
the code, a few questions come up:

Quirks; in

struct quirkdata {
	u_int quirks;
#define	ST_Q_FORCE_BLKSIZE	0x0001
#define	ST_Q_SENSE_HELP		0x0002	/* must do READ for good MODE SENSE */
#define	ST_Q_IGNORE_LOADS	0x0004
#define	ST_Q_BLKSIZE		0x0008	/* variable-block media_blksize > 0 */
#define	ST_Q_UNIMODAL		0x0010	/* unimode drive rejects mode select */
	u_int page_0_size;
#define	MAX_PAGE_0_SIZE	64
	struct modes modes[4];

there is some global flag missing for dealing with QIC-like EOM handling
(one filemark) in "quirkdata.quirks". Currently, a drive slips through the
cracks in st_decide_mode() when it gets probed as running in "default
mode", i.e. st->density == 0.

As a result, newer QIC drives are nailed to 512 bytes fixed blocksize when
they should be 1024 bytes or variable (what is preferable, btw., if you are
free to choose?). Furthermore, you get two filemarks at EOM which prohibits
tarring/dumping several files onto one tape - appending to a tape gives a
flood of errors. This was broken around 1.3, it worked for me with a 1.2G

The drive- and density-related flags should be documented in st(4) or,
better, in scsi_quirks(9).

What "page 0" is "quirkdata.page_0_size" referring to? The "vital product
data" page length? And how would I determine the correct length for a given

Comments appreciated.


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