tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Implement mode_select for atapi tape drives


Am 08.08.2009 um 14:10 schrieb Paul Goyette:

The attached patch implements the mode_select operation for atapi tape drives. It is enabled only via a new quirk setting, so existing drives that haven't explicitly been determined to support this op won't even attempt it. (This is essentially the same patch as in PR kern/34832.)

I've been running this in my own systems for about 3 1/2 years now, with my Seagate STT3401A (Travan 20/40GB) drive. I'll submit a separate patch later with a cleaned-up quick setting for this drive.

This patch is actually required for the above tape drive to operate properly under NetBSD. The drive supports both 512-byte and 1024- byte block sizes, but defaults to 1024-bytes. Without this patch there it isn't possible to write 512-byte records to the tape!

Any objections to committing this?

Why do you use

memset(&atapi_select, 0, atapi_select_len);

instead of

memset(&atapi_select, 0, sizeof(atapi_select));

and zap the u_int atapi_select_len variable?

Home | Main Index | Thread Index | Old Index