summaryrefslogtreecommitdiff
path: root/sys/scsi
AgeCommit message (Collapse)Author
2003-09-30quantum atlas iv 9 wls lies about tagsMichael Shalayeff
2003-09-26Typos: defintion -> definition, proccess -> processMiod Vallat
There are more occurences hiding in binutils, lynx and afs but I am too lazy to report them upstream at the moment.
2003-08-06Remove some double semicolons (hmm, do two semis equal a maxi?).Todd C. Miller
I've skipped the GNU stuff for now. From Patrick Latifi.
2003-07-30reverse booleans so it's clear what we're looking for. ok krw@Ted Unangst
2003-06-26Simplify code a bit by eliminating a few early returns in the senseKenneth R Westerback
key case statement and let the common code after the case do the right thing. Return EINVAL for sense key SKEY_ILLEGAL_REQUEST whether SCSI_SILENT is set or not. ok tdeval@ nate@
2003-06-25Avoid a divide by zero byKenneth R Westerback
1) Ensuring that both sd_scsi.c and sd_atapi.c report a device as offline when its disksize cannot be determined. 2) Ensuring blksize is always non-zero, with a default value of 512. 3) Eliminating a couple of unneeded 'sectors' variables, which makes the code easier for me to read if nothing else. The bug was introduced when sd_atapi.c was changed to allow 'incomplete' implementations to be reported as online. REALLY incomplete implementations (i.e. not even the disksize can be determined) would be reported online with a blksize of zero. Also fix a couple of knf nits in Mickey's last commit, and add another check for an rpm of 0. ok (pre-Mickey diffs) tdeval@ marc@ frantzen@
2003-06-24try to devise drive's rpm and default to 3600 should we fail miserably.Michael Shalayeff
derived from pr2815 from Marco Peereboom krw@ deraadt@ ok
2003-05-21Make sure that the first scsi command issued to a device duringKenneth R Westerback
sdattach() has the flag SCSI_IGNORE_MEDIA_CHANGE set. This was not true for devices with the quirk SDEV_NOSTARTUNIT, such as some umass devices. This fixes the display of the disk parameters for any loaded media. Previously the displayed parameters would show 0 size, 0 sectors and a faked number of cylinders, etc. By ignoring the error generated by devices trying to tell us the media may have changed since the last command the SCSI command completes correctly and valid values are obtained/displayed. We are interested in the current values and unconcerned about any previous ones. Tested by drahn@.
2003-05-18constify the quirck tables and fix the scsi_inqmatch() proto accordingly; ↵Michael Shalayeff
krw@ ok
2003-05-17READ_CD_CAPCITY -> READ_CD_CAPACITY in comment.Kenneth R Westerback
2003-05-17paramters -> parameters in comment.Kenneth R Westerback
2003-05-17dale's camera has a usb quirk nowNathan Binkert
2003-05-16Provide most if not all the support required for the usb changes NateKenneth R Westerback
is trying to bring in. 1) Change name of SDEV_NOCDB6 to SDEV_ONLYBIG to align it with the same quirk in NetBSD, and make it more clear what it is trying to do. i.e. force the use of READ_BIG/WRITE_BIG commands, not suppress all use of 6 byte CDB's. 2) Check SDEV_ONLYBIG in cd.c as well as sd.c. i.e. both places where a choice is made to use the 6 or 10 byte versions of READ/WRITE. 3) Actually make use of the ADEV_NOTUR (No TEST UNIT READY) quirk to suppress the emission of TEST UNIT READY commands. 4) Add some explanatory comments from NetBSD to scsiconf.h so that the use of the quirks is made clear. ok miod@ tdeval@ nate@
2003-05-13Don't report devices with incomplete implementations as OFFLINE.Kenneth R Westerback
Fixes frantzen@'s pentax digital camera. Suggested by Costa. ok csapuntz@ frantzen@.
2003-05-06String fixes. Scsi now strcpy/strcat/sprintf/strncat free. SomeKenneth R Westerback
strncpy still present for manipulating d_packname/d_typename. ok deraadt@.
2003-05-06sprintf -> snprintf. strncpy -> bcopy since d_packname is not really aKenneth R Westerback
string. Ensure that all of d_packname is used by not null-terminating string that is put in it. Suggestions and motivation to remove strncpy() from deraadt@. ok deraadt@ tedu@.
2003-05-03sprintf -> snprintf.Kenneth R Westerback
Almost identical to a previously submitted diff from tedu@. ok tedu@ tdeval@
2003-04-06The disklabel fields d_packname and d_typename are not null terminated stringsKenneth R Westerback
and should not be created or used as such. This fixes some instances of both behaviours, and sets the stage for some strcpy -> strncpy fixup. ok tdeval@ millert@ deraadt@
2003-03-28OCHIO* dies horrible death by dd; as per renaming done beforeMichael Shalayeff
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
2003-02-20Eliminate unused parameter to scsi_free_xs().Kenneth R Westerback
ok deraadt@ tdeval@
2003-01-17The end of the track is one frame before the first frame of the next trackJason Wright
(and right before the leadout track in the case of the last track). Some CDROM's are evidentally picky about being asked to play the first frame of the leadout.
2003-01-05spellingTheo de Raadt
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-12-15Fix/Cleanup some SCSI #defines.Kenneth R Westerback
1) Correctly define MODE_SENSE_BIG as 0x5a, not 0x54. 2) Delete duplicate #define's of some opcodes in scsi_disk.h. 3) Delete multiple #define's for same opcode in scsi_disk.h. 4) Replace uses of deleted opcodes in umass.c with remaining ones. ok millert@ tdeval@
2002-11-30Actually implement the NODOORLOCK quirkNathan Binkert
2002-10-17renumber the CHIO* since they clash w/ the CDIO, keep the old ones as OCHIO, ↵Michael Shalayeff
EOL set to post 3.3
2002-09-04Write sentences.Thierry Deval
2002-09-04Add support for RBC (simplified direct) devices.Thierry Deval
ok costa@, krw@
2002-08-12initialize part earlier in case of debugging.Federico G. Schwindt
2002-08-03spell 'debugging' correctly with double 'g' (in comments)Peter Valchev
2002-06-14spelling; from Brian Poole <raj@cerias.purdue.edu>Todd T. Fries
2002-06-09More (the last round?) of splasserts and splbio around biodone.Artur Grabowski
2002-06-09some splassert and protection of biodone.Artur Grabowski
2002-06-09splassert a splbio assumption.Artur Grabowski
2002-06-08KISS. the spl variable doesn't have to be called s, but it make the code ↵Artur Grabowski
less confusing.
2002-06-08splbio around biodoneArtur Grabowski
2002-06-04spelling; raj@cerias.purdue.eduTheo de Raadt
2002-05-27punctuationThierry Deval
2002-05-23Signed/unsigned int bug caused lp->d_npartitions to be set to zero.Constantine Sapuntzakis
Should fix disklabel warnings on disks with no data track. The old code was unnecessary complex too.
2002-05-22Eh, mark scsi_free_xs with splassert(IPL_BIO) too.Artur Grabowski
I know it's called the right way _now_, but that can change.
2002-05-22splassert(IPL_BIO) in scsi_done (its children have this assumption).Artur Grabowski
protect scsi_free_xs in scsi_scsi_cmd with splbio. ok by deraadt@ and krw@
2002-04-21Use PR_, not M_ flags to pool_get.Artur Grabowski
2002-03-15Kill #if __STDC__ used to do K&R vs. ANSI varargs/stdarg; just do thingsTodd C. Miller
the ANSI way.
2002-03-14Final __P removal plus some cosmetic fixupsTodd C. Miller
2002-03-14First round of __P removal in sysTodd C. Miller
2002-03-09Be less parochial and remember that others may need to use quirks!Kenneth R Westerback
Just set the SDEV_NOTAGS, SDEV_NOWIDE, SDEV_NOSYNC bits in quirks. DON'T zero all other bits that may have already been set. Noted (and fix tested) by lebel@.
2002-02-28Start quirks off with NOWIDE, NOSYNC and NOTAGS and remove theKenneth R Westerback
restrictions as the results of the INQUIRY command and the quirks table indicate. This should (for drivers that pay attention) make for more successful communication with devices having quirks, by using the lowest common denominator until more information is available. Issue a second TEST_UNIT_READY command after the INQUIRY command has been processed to allow drivers waiting for valid quirks data to set sync/wide/tags asap. Rework a little bit of the logic to ensure that negotiation messages produced by the TEST_UNIT_READY command do not get mixed up with attachment messages. This has the side benefit of putting the negotiation messages before the device description, where they have usually been displayed in the past. If a driver is examining and using quirks data before the INQUIRY command is processed, and not renegotiating after the INQUIRY command, it may now end up with async 8 bit, non-tagged transfers. Before it would have ended up with possibly unusable transfer parameters when talking to a device with quirks. ok costa@
2002-02-16Disable tagged queueing for HP C3725S and IBM DCAS drives whereTodd C. Miller
is is broken.
2002-02-01cdstrategy(): check that media is loaded before doing anything with theHans Insulander
cd. ok art@