summaryrefslogtreecommitdiff
path: root/sys/scsi/st.c
AgeCommit message (Collapse)Author
2005-06-24Move st.c to new mode sense mechanism. Don't save page0 data (if any), justKenneth R Westerback
ask for it when needed. Eliminate the page_0_size quirk. Tested on various tape drives by myself, hshoexer@ and henning@.
2005-06-05Fix scsi_mode_select() and scsi_mode_select_big() to send just theKenneth R Westerback
required number of bytes, rather than a full scsi_mode_sense_buf. Some devices (e.g. my HP SureStore DAT/24) decline to accept such oversized transfers. Instead, force callers to fill in the data_length field in the header and use that information to set the size of the transfer.
2005-05-14Add scsi_mode_[sense|select]_big() and use it instead ofKenneth R Westerback
atapi_mode_[sense|select](). This will allow the removal of atapi_base.c and atapi_all.h files, and sets the stage for better usb mode sense handling amoung other things. Remove cd_scsibus_[get|set]_mode() and sd_scsibus_mode_sense() shims in favour of scsi_mode_[sense|select](). Add zero'ing of reserved length field in scsi_mode_select(). Change some uchar * type parameters to scsi_mode_header *. No functional changes. Mostly from NetBSD. ok dlg@.
2005-04-06De-register scsi.Kenneth R Westerback
2005-04-05Factor out scsi_mode_sense() and scsi_mode_select() like NetBSD does.Kenneth R Westerback
Eliminate some duplicate structures and defines along the way. SCSI CD drives will now pay attention to the 'flags' parameter for MODE SENSE and MODE SELECT commands. No other functional change. ok tdeval@
2004-11-30No longer require write permission for read-only SCSI commandsKenneth R Westerback
submitted via ioctl. Eliminate scsi_do_safeioctl(), thus permitting ch, ss and st devices to submit SCSI commands. Return EPERM rather than EBADF when permissions are inadequate. Allows more programs to run with fewer permissions. Problem diagnosed by Nikolay Sturm in mplayer port. Tested by Nikolay, ok deraadt@.
2004-10-16Fix 'Tape block size (32754) not a multiple of dump block sizeKenneth R Westerback
(1024).' errors in restore(1). Check for SDEV_OPEN in sc_link->flags (where it lives) rather than sense->flags (where it doesn't). Problem noted by John Danks on misc@ and reinforced by Otto & Hugh. ok marco@ hugh@.
2004-08-01Remove openings = 1 and inherit the value from the HBA instead. This keeps ↵Marco Peereboom
the tape device stuffed with data and therefore it rewinds less often to reposition. ok krw@
2004-06-22Add additional retries in TUR to allow for tape devices to settle after a reset.Marco Peereboom
More informative failure message and silence "already open" message. ok krw@
2004-05-28Clean up sense error logic and printing a bit, partly inspired byKenneth R Westerback
NetBSD. Try to limit special handling of sense errors in sd and st to a minimum. ok marco@
2004-05-17Elminate SCSIRET_* synonyms for EJUSTRETURN and ERESTART by usingKenneth R Westerback
EJUSTRETURN and ERESTART instead. Delete unused SCSIRET_RETRY define. From NetBSD. ok marco@
2004-05-17Add a quirk entry for TEAC compact cassette tape drive, taken from NetBSD.Kenji Aoyama
ok miod@ tdeval@ marco@ krw@
2004-05-09Add missing <cr>'s to various SC_DEBUG() calls, along with a few otherKenneth R Westerback
SC_DEBUG() spacing tweaks. ok deraadt@
2003-05-18constify the quirck tables and fix the scsi_inqmatch() proto accordingly; ↵Michael Shalayeff
krw@ ok
2003-03-11Fix incorrect restriction on valid scsi tape density code values, allowing allKenneth R Westerback
currently valid values (0 - 0xff) to be used in mt(1). Add sanity check to catch negative values. Minor cleanup so mt_count values are stored in daddr_t variables and not ints. Eliminate unnecessary cast of mt_op, since it is already a shot. Leave possible move of mt_count to int32_t rather than daddr_t to post-3.3. Problem found, and original diff by Joseph Bender. costa@ henning@ tdeval@ ok
2002-12-30Add new parameter to scsi_test_unit_ready(): retries number.Alexander Yurchenko
Use increased retries number and don't ignore SCSI_IGNORE_NOT_READY when call scsi_test_unit_ready() for cd-rom, this makes system wait if drive is loading media. Tested by millert@ and fgsch@; some input and ok from krw@. Problem reported by The lord of the CD-writers Igor Grabin <violent@death.kiev.ua>.
2002-06-09More (the last round?) of splasserts and splbio around biodone.Artur Grabowski
2002-06-04spelling; raj@cerias.purdue.eduTheo de Raadt
2002-03-14First round of __P removal in sysTodd C. Miller
2001-06-22KNFTheo de Raadt
2000-04-08These days, attach can occur outside the tsleep-restricted world ofConstantine Sapuntzakis
BSD autoconf. Don't use POLL & NOSLEEP mode if attaching after autoconf
1999-09-05ATAPI tapes are always fixed blocksizeNiklas Hallqvist
1999-07-25Merge sd stuff from NetBSD-current. Helps with LS-120, ZIPConstantine Sapuntzakis
More SCSI logic from NetBSD-current Some tape fixes. ATAPI tapes do not work yet for most operations.
1998-07-23do delays based on command type -- this works a lot better, make "mt status"Theo de Raadt
show much more information; ross
1998-02-22Detect and report a weird error case (residual > request)Niklas Hallqvist
1998-02-16Add the "VIPER 150/21531" to quirk list (ST_Q_SENSE_HELP; pkTheo de Raadt
1998-01-10be silent for ILI errors ; giannici@neomedia.itTheo de Raadt
1997-09-05Add SCSITERSE option which omits the (large) ASC/ASCQ table.Todd C. Miller
Old scsi error printing code is now gone.
1997-09-03be silent for SCSI_SILENT transactionsTheo de Raadt
1997-08-22Add more detailed SCSI error printing by Matthew Jacob. Enabled byTodd C. Miller
default. Use "option SCSIVERBOSE=0" to turn off (only added 8Kb to my kernel). From the NetBSD commit message: Add in more detailed SCSI error printing, based off of final SCSI-2 spec. This will also print out things like progress indicator errors, and will also dump out additional sense bytes that haven't been decoded.
1997-08-19Back out part of revision 1.16 where the tape was unmounted in stclose ondgregor
a non-rewinding device. When the tape was re-opened again, st_mount_tape called st_load, which causes the tape to be rewound. The best way to fix this problem would be to not call st_load in st_mount_tape if the tape is already in the drive and has already been loaded. But, I haven't figured out a good, safe way to do that yet....
1997-07-11Rename REWIND to DOREWIND to avoid colliding with the SCSI opcode of theThorsten Lockert
same name
1997-07-11Allow media to be removed on last close even if the device used was theThorsten Lockert
no-rewind device. Ensure we re-detect media on first open even if media was present at boot.
1997-04-14Merge in various pieces of current NetBSD scsi code, including but not limitedJason Downs
to: * New changer driver. * Better optical support. * Different `done' semantics. * New quirks for SCSI QIC tape driver, SCSI floppy drives. * Better support for SCSI-I devices. Everybody needs to test this.
1997-02-24This changes the timeout on the st device so that the new tape drives thatjkatz
are recognized are usable :-) If this break things for other people, please feel free to change it back. from port-vax@netbsd.org
1996-12-11b_resid cleanups, pointed out by minoura@kw.netlaputa.or.jp in netbsd pr#3007Theo de Raadt
1996-08-11limit ioctl priviledgesTheo de Raadt
1996-05-10SC_DEBUG cleanupTheo de Raadt
1996-04-21partial sync with netbsd 960418, more to comeTheo de Raadt
1996-04-19NetBSD 960317 mergeNiklas Hallqvist
1996-02-20Several changes from NetBSD:briggs
- scsi prototypes - remove #ifdef notdef made unnecessary by previous changes (PR#1597) put in missing "if (error)" that caused tape IO to always fail. (closes PR#2086) - Minor change.
1996-02-09NetBSD PR 2048. Prototype st_erase.briggs
1996-01-16from netbsd:Theo de Raadt
Honor cache request and add the SCSI tape device configuration page. Fixes PRs 807, 1201, and 1705. From John Kohl <jtk@kolvir.blrc.ma.us>.
1995-12-14from netbsd; Add quirk for Exabyte 8200/rev. 263H (from Paul Goyette; PR#1797)Theo de Raadt
1995-11-21make this workTheo de Raadt
1995-11-20add erase support and another wangtek tape drive; from ↵Theo de Raadt
rhialto@polder.ubc.kun.nl; netbsd pr#1705
1995-11-19if you read with a smaller buffer than the block on the tape, b_resid and ↵Theo de Raadt
b_count would be incorrect; from jtk@kolvir.arlington.ma.us; netbsd pr#1597
1995-10-18initial import of NetBSD treeTheo de Raadt