summaryrefslogtreecommitdiffstats
path: root/sys/scsi
Commit message (Collapse)AuthorAgeFilesLines
* If available, use the device's LOGICAL blocksize as reported byjulian1997-12-291-53/+69
| | | | | | | | | | | | | the "READ_CAPACITY" command, rather than the physical blocksize reported in the physical geometry code-page. Also don't print out worrying bogus messages when probing a device that has no media. There's no point in printing out something that is unknowable. It just confuses things. Move the check for valid blocksize out of 'open()' to the subroutine that actually finds this out, thus probe/attach can also report and act on the problem.
* back out previous commitjulian1997-12-281-24/+13
| | | | got a better version.
* Move the sector size check to the right place,julian1997-12-281-14/+25
| | | | | also cope with some drives that return funny values. The correct fix will come in a few days.
* Fix some breakage that prevented the Plasmon burners from being usedjoerg1997-12-261-67/+66
| | | | | | | | | | | | | | | | | | under -current. The actual preparation of the next track will now be deferred until just before the first write operation. Otherwise, opening the device with write intent will cause the execution of commands that are illegal in `limited command set mode' (i.e., after the write channel has been opened). While i was at it, cleaned up the worm_open() function a bit. Removed the volume overflow pre-check in worm_strategy(). It was time-consuming, and rather useless in many cases anyway (with the size being reported for just the entire volume only), so we can as well let the actual SCSI command fail instead, where it'll properly be reported as EIO. Partially submitted by & discussed with: jmz
* Add a PARITITON arg to SCSI_MKFIXED, and use it tobrian1997-12-232-5/+10
| | | | | | specify RAW_PART for the suopen() in sscioctl(). Now you can `scsi -f /dev/ssc -p'.
* Duplicate the entry for the Plasmon CD-R device, so both possibilitiesjoerg1997-12-201-4/+7
| | | | | (read/only and write/once) will be covered. This is necessary in order to fill in the proper device information record.
* Protect against a null pointer dereferencation in the case of anjoerg1997-12-201-1/+12
| | | | | | | unknown drive. Such a drive will be configured by worm(4) nevertheless (albeit with a warning), but cannot be opened except of the SCSI control device (so scsi(8) or cdrecord will continue to work).
* Ifdefed some conditionally used declarations.bde1997-12-202-2/+6
|
* Removed a stray semicolon.bde1997-12-201-2/+1
|
* Allow slow SCSI CDROMs more time to start up.jraynard1997-12-141-1/+13
| | | | | PR: 5181 Submitted by: Wilko Bulte <wilko@yedi.iaf.nl>
* Use ENOIOCTL instead of -1 (= ERESTART) for diskslice ioctls that arebde1997-12-062-4/+4
| | | | not handled at a particular level.
* In all such uses of struct buf: 's/b_un.b_addr/b_data/g'phk1997-12-028-17/+17
|
* Fixed misuse of O_ACCMODE. Cosmetic.bde1997-11-231-2/+2
| | | | Not fixed in: sound driver
* Fixed the sector size frobbing in sd_strategy() at least not tobde1997-11-231-8/+7
| | | | | | | | break for the usual sector size. dscheck() adjusts b_bcount to handle EOF, so we must scale it and not preserve it. i/o beyond the end of partitions has been broken since rev.1.96. Not fixed in: od driver
* Remove a bunch of variables which were unused both in GENERIC and LINT.phk1997-11-071-1/+6
| | | | Found by: -Wunused
* Make the Nakamichi CD-ROM changer detection detect more recent devices,joerg1997-11-061-2/+2
| | | | too.
* Use a MODE SELECT command to reset the block size, instead of calling thejmz1997-10-271-13/+33
| | | | prepare_track() function, which caused fixation problems with some drives.
* Make the Sun OEM version of the DLT a known multi-LUN device so changersjoerg1997-10-191-1/+5
| | | | | | | will work. PR: kern/4802 Submitted by: dawes@physics.usyd.edu.au (David Dawes)
* Remove the call to scsi_start_unit() from sd_open(). It was causingjoerg1997-10-122-8/+9
| | | | | | | | | | | | | | much grieve to owners of IBM drives when used in conjunction with tagged command queuing, and didn't serve any purpose at all (since experiments have proven that it simply didn't work). Instead, call scsi_start_unit() once in sd_attach(), so in case the drive has been configured to `remote start', it will spin up there. (If it has spun down later, it must have been because of administrator action (scsi(8)) anyway.) While i was at it, bump the timeout for scsi_start_unit() to 30 seconds. 10 seconds were way too few for most drives.
* Add the REGAL CDC-4X as a known CD-ROM changer device.joerg1997-10-051-1/+6
| | | | Submitted by: shanee@augusta.de (Andreas Kohout)
* Convert to use the new bufq* functions for dealing with buffergibbs1997-09-219-37/+44
| | | | queues.
* Remove line noise from the quirk list (kernel build stopper)msmith1997-09-181-2/+1
|
* Add the C1557A as a known tape changer (thus non-broken multi-LUN tapejoerg1997-09-171-1/+6
| | | | | | device). Submitted by: Andre.Albsmeier@mchp.siemens.de (Andre Albsmeier)
* Update select -> poll in drivers.peter1997-09-143-10/+12
|
* Revert the logic behind my last change, and use a function calledjoerg1997-09-131-5/+5
| | | | | | | `is_physical_memory()' now for the decision whether to dump some region of memory or not. Suggested by: davidg
* Do not ever try to coredump adapter memory regions.joerg1997-09-101-3/+7
| | | | | | | | | PR: 4486 Submitted by: tegge@idi.ntnu.no (Tor Egge) Implement a function is_adapter_memory() in order to determine what should nto be dumped at all. Currently, only populated with the ``ISA memory hole''. Adapter regions of other busses should be added.
* Add a quirk flag for CD drives that jam when seeing a START STOP UNITjoerg1997-09-073-5/+14
| | | | | | | command. PR: 2388 Submitted by: nsayer@quack.kfu.com (Nick Sayer) [basically]
* Silence the PREVENT ALLOW MEDIUM REMOVAL call.joerg1997-09-071-2/+3
| | | | Submitted by: jmattson@wco.com (Jim Mattson)
* Make the Sony TSL-7000 a known tape changer device.joerg1997-09-051-1/+9
|
* Removed unused #includes.bde1997-09-0213-77/+13
|
* Removed another vestige of devconf.bde1997-09-022-9/+2
|
* Increase the retry timeouts.steve1997-08-231-4/+4
| | | | | PR: kern/3447 Submitted by: dawes@rf900.physics.usyd.edu.au
* preparation for scsi device RESERVATION CONFLICT support.itojun1997-08-171-1/+2
| | | | PR: 4257
* Teach both disk drivers how to cope with a hardware watchdogjulian1997-08-091-2/+11
| | | | | | | while dumping core.. I'm tired of getting 1/2 of a core-dump conditional on -DHW_WDOG for now this will migrate to 2.2 as that's where I need it.
* Removed unused #includes.bde1997-08-022-7/+2
|
* My previous commit was incomplete because it ignored the READ case.jmz1997-08-011-1/+2
| | | | | Now set explicitly the block size to 2048 when the device is opened for reading.
* Ignore the block size returned by scsi_read_capacity(): this value isjmz1997-07-261-2/+3
| | | | | rarely correct and the block size is already specified in the prepare_track() functions.
* In SCSI diagnostic messages, cause "0x" to be prepended to the numberjdp1997-07-251-3/+3
| | | | in the "info" field to make it clear that it is hexadecimal.
* Don't depend on gcc's feature of permitting labels that aren't followedbde1997-07-011-2/+2
| | | | by a statement.
* Introduce an advisory exclusive lock on the scsi link structure.tegge1997-06-254-4/+47
| | | | | | | | Change sd_open, sd_close and sd_ioctl to use this lock to ensure serialization of some critical operations, thus avoiding some race conditions. Ideas picked from NetBSD (ccd and sd devices). This fixes one of the problems noted in PR kern/3688. Reviewed by: "Justin T. Gibbs" <gibbs@plutotech.com>
* Add quirk "no tags" entry for HP 3724/5 hard disk drives.se1997-06-111-1/+5
|
* Add 2 new ioctls: WORMIOCREADSESSIONINFO and WORMIOCWRITESESSION.jmz1997-06-022-5/+169
| | | | | | These commands are required for the "Disk-At-Once" write process: WORMIOCREADSESSIONINFO returns the length of the lead-in and lead-out areas and WORMIOCWRITESESSION is used to send the table of contents of the disk.
* The correct way to combine 2 4bit values into a 8bit one is (a<<4) | b, notjmz1997-05-281-7/+7
| | | | | (a<<8) || b. The conical hat please!
* Add an entry for the Epson scanners since some of them repsond to morejoerg1997-05-251-1/+12
| | | | | | than one LUN: Submitted by: simokawa@sat.t.u-tokyo.ac.jp (Hidetoshi Shimokawa)
* Initialize the buf_queue of the pt(4) driver.joerg1997-05-212-3/+16
| | | | | | | | | | PR: kern/3629: /sys/scsi/pt.c doesn't... Submitted by: simokawa@sat.t.u-tokyo.ac.jp (Hidetoshi Shimokawa) Add a catch-all record for removable SCSI devices to default them to only one LUN. PR: kern/3580: Bad LUN probes on Xyratex...
* Set the quirks for the worm drives.jmz1997-05-192-7/+13
|
* A few improvements to the worm driver.jmz1997-05-191-187/+318
| | | | | | | | | | | | | | | | | | | | | | | | | - remove all calls to scsi_stop_unit(). Some drives refuse commands when stopped. This will fix the 'device not configured' message which was cleared after opening/closing the tray. - Never set the logical block address in the scsi_cmd struct when writing. The computation was bogus for block sizes not a multiple of DEV_BSIZE. (the bug is still there in the READ case) - reset the block size to the 2048 bytes in finalize_track() track to avoid an error when mounting a disk after an audio write. - remove the WORMIOCQUIRKSELECT ioctl. Quirks are now recorded at probe time (see scsiconf.c) - change and expand the argument to the WORMIOCPREPTRACK ioctl. It now possible to select more track options (copy bits, ISRC codes, track type, track number) - add an error handler to catch false errors (warnings in fact) and record the error type. - add an ioctl call (WORMIOERROR) to get more information on the nature of the error when a command or a write failed. - add an ioctl call (WORMIOCFINISHTRACK) to finalize a track without closing the device (closing the device still finalize the track if the command was not performed) Approved by: joerg
* Add the D_DISK flag to the cdevsw structs of various CD-ROM drivers.joerg1997-05-101-2/+2
|
* Duplicate the TOC handling ioctls from the cd(4) driver. Duplicatingjoerg1997-05-051-2/+182
| | | | | | | | the work is silly, and all this will be a moot point with Justin's CAM driver, and there are still many ioctls missing -- but i need these right now. It's silly to need to move the CD-R back to the other drive in order to determine the session start info when burning multi- session CD-Rs.
* This mega-commit brings the following:joerg1997-05-041-1/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | . It makes cd9660 root f/s working again. . It makes CD9660 a new-style option. . It adds support to mount an ISO9660 multi-session CD-ROM as the root filesystem (the last session actually, but that's what is expected behaviour). Sigh. The CDIOREADTOCENTRYS did a copyout() of its own, and thus has been unusable for me for this work. Too bad it didn't simply stuff the max 100 entries into the struct ioc_read_toc_entry, but relied on a user supplied data buffer instead. :-( I now had to reinvent the wheel, and created a CDIOREADTOCENTRY ioctl command that can be used in a kernel context. While doing this, i noticed the following bogosities in existing CD-ROM drivers: wcd: This driver is likely to be totally bogus when someone tries two succeeding CDIOREADTOCENTRYS (or now CDIOREADTOCENTRY) commands with requesting MSF format, since it apparently operates on an internal table. scd: This driver apparently returns just a single TOC entry only for the CDIOREADTOCENTRYS command. I have only been able to test the CDIOREADTOCENTRY command with the cd(4) driver. I hereby request the respective maintainers of the other CD-ROM drivers to verify my code for their driver. When it comes to merging this CD-ROM multisession stuff into RELENG_2_2 i will only consider drivers where i've got a confirmation that it actually works.
OpenPOWER on IntegriCloud