summaryrefslogtreecommitdiffstats
path: root/sys/cam
Commit message (Collapse)AuthorAgeFilesLines
* Fix inquiry length detection for the ses(4) driver. It was using theken2001-03-161-4/+4
| | | | | | | | | | | inq_len member of the ccb_getdev structure, but we've never filled that value in.. So we now get the length from the inquiry data returned by the drive. (Since we will fetch as much inquiry data as the drive claims to support.) Reviewed by: mjacob Reported by: Andrzej Tobola <san@iem.pw.edu.pl>
* In xpt_set_transfer_settings(), force async if either the period or theken2001-03-131-10/+12
| | | | | | | | | | | offset is set to 0. Re-arrange the DT limiting code so that we don't end up setting the period to 0xa if the user really wants async. The previous behavior seemed to confuse the aic(4) driver. PR: kern/22733 Reviewed by: gibbs
* o Support AUTO SENSE correctly.non2001-02-252-80/+82
| | | | | | | | | | | o Offset and period in synch messages and width negotiation should be done for per target not per lun. Move these from *lun_info to *targ_info. o Change in handling XPT_RESET_DEV and XPT_GET_TRAN_SETTINGS . o Change CAM_* xpt_done return values. o Busy loop did not timeout. Change this to timeout as original NetBSD/pc98. Reviewed by: bsd-nomads ML
* In the SCSI_NO_SENSE_STRINGS case, properly fill the table with thegibbs2001-02-241-1/+1
| | | | | | | asc and ascq pair rather than asc, asc. PR: 25291 Submitted by: Stephen Ferrari <sferrari@yahoo.com>
* Restore a print_sense=FALSE that got nuked by accident in last delta.mjacob2001-02-221-0/+1
| | | | Noticed by: Dan Nelson <dnelson@emsphone.com>
* Use the correct device names (now that we have devfs to embarrass us).mjacob2001-02-211-7/+7
| | | | PR: 25254
* 1. The key SSD_KEY_RECOVERED_ERROR is not an error at all and shouldmjacob2001-02-111-7/+15
| | | | | | | | | | | | | | | | | | | | not be retried. It is an indication that there was an error that was corrected during the execution of the command. This is per ANSI SCSI2 spec. It's possible that these should also be noted to the console (as indicative, perhaps, of growing media defect lists in drives), but the default of printing errors out if bootverbose in this case is probably enough. Also, there'd been a missing ERESTART for that clause anyway. 2. If you have an ABORTED COMMAND, it's almost invariably a SCSI parity error. You should never be silent about these since users should do something about this if it occurs (moving that power cord *away* from the SCSI cable is always a good first start). This should print irrespective of bootverbose because it's an actual real error even if we retry a transmission. Reviewed by: audit@freebsd.org, gibbs@freebsd.org
* - Catch up to the new swi API changes:jhb2001-02-091-8/+6
| | | | | | | - Use swi_* function names. - Use void * to hold cookies to handlers instead of struct intrhand *. - In sio.c, use 'driver_name' instead of "sio" as the name of the driver lock to minimize diffs with cy(4).
* Change the peripheral driver list from a linker set to module drivenpeter2001-02-0712-26/+65
| | | | | driver registration. This should allow things like da, sa, cd etc to be in seperate KLD's to the cam core and make them preloadable.
* Another round of the <sys/queue.h> FOREACH transmogriffer.phk2001-02-043-16/+8
| | | | | Created with: sed(1) Reviewed by: md5(1)
* Mechanical change to use <sys/queue.h> macro API instead ofphk2001-02-047-38/+35
| | | | | | | fondling implementation details. Created with: sed(1) Reviewed by: md5(1)
* Back out rev 1.102. The IBM DNES drives work fine for me, jedgar and otherken2001-01-291-11/+0
| | | | | | | | | | folks. My guess is that reducing the number of tags is just masking the real problem for the PR submitter. I'll re-open the PR and see if I can work with the submitter to diagnose the problem. PR: 21139
* Fix region code reporting.ken2001-01-281-4/+3
| | | | Reported by: Andrew Gordon <arg@arg1.demon.co.uk>
* #ifdef a local variable only used in debugging code.jhb2001-01-241-1/+4
| | | | Reviewed by: -scsi
* Const'ify cam_sim.sim_name to quiet warnings.jhb2001-01-242-9/+9
| | | | Reviewed by: -scsi
* "Rejected with status" is better than "Rejected for status".mjacob2001-01-241-1/+1
|
* Mark the (ancient) MaxOptix Tahiti 1 drive as a known rogue that wouldjoerg2001-01-231-0/+10
| | | | | | respond to all LUNs. Reviewed by: ken
* Make some attempt to accomodate kern/24221- propate residual to mt_residmjacob2001-01-191-0/+41
| | | | | | | even if it might overflow. If we do a read or set of hardware or logical block position, we also clear Tape Frozen status.
* Add tags quirk for IBM DNES drives.mjacob2001-01-161-0/+11
| | | | | PR: 21139 Obtained from: campt@miralink.com
* Use the residual from a spacing operation to try and figure out wheremjacob2001-01-161-10/+38
| | | | | | | | | | | | | | | | we *really* are. It should be noted that there is a degenerate case where soft tape location will be lost (not causing a frozen state- but causing the loss of reporting fileno/blockno)- that's where you backspace over a filemark- you stop backspacing as soon as you cross the filemark, but you have no idea what the record number now is because you have no idea how many records you are into the file you just backed into. Such is life. While I'm at it, also pick up residuals from writing filemarks. PR: 24222
* Get rid of those pesky "driver mistake" messages... destroy the create_d dev_tmjacob2001-01-161-1/+5
| | | | | | when you take down the device. Reviewed by: audit@freebsd.org (Warner, Justin)
* Fix PR 24220 by using the periph private field0 for a CCB for notmjacob2001-01-151-40/+50
| | | | | | | | | | | | | | only CCB type but also extra flags- one of which can be "position updated". In other changes: Add in a SA_QUIRK_NO_CPAGE quirk so that it's possible to avoid using a (broken) device's implementation of he DEVICE COMPRESSION page. Also do a couple of printout cleanups. As per some discussion on FreeBSD-scsi, skip doing tape flushing if we're reading tape logical block location (MTIOCRDSPOS).
* Check __i386__, not i386.nyan2001-01-131-1/+1
|
* Spell declarations correctly.steve2001-01-122-2/+2
|
* select() DKI is defined in <sys/selinfo.h> now.wollman2001-01-091-1/+1
|
* Add the 'No 6 byte commands' quirk for the Yano ATAPI USB bridge.n_hibma2001-01-081-0/+4
| | | | Submitted by: Iwasa Kazmi <kzmi@ca2.so-net.ne.jp>
* Generalize quirk for Sony Memory Sticks. Any device that starts withimp2000-12-141-1/+5
| | | | | | | | | | | MS will be treated as having this quirk. In the event that we falsely identify one that doesn't need it, no harm will be done. Ken suggested that we make this more generic since there may be more needed in the future. Reported by: TERAMOTO Masahiro <teramoto@comm.eng.osaka-u.ac.jp> PR: kern/23378 Reviewed by: ken
* Move `#include <sys/devicestat.h>' into #ifdef/#endif to keepnon2000-12-131-1/+1
| | | | comaptibility with NetBSD/pc98.
* Add needed include of <sys/devicestat.h>phk2000-12-071-0/+1
|
* Turn off the load_eject bit in cdstartunit(). It causes an `Invalidjoerg2000-12-041-1/+1
| | | | | | | | | | | | field in CDB' error when attempting to start a caddy-type CD drive, since those drives apparently in general refuse to load a medium. Since we never advertised the feature to load the medium upon calling cdstartunit() (i. e. upon receipt of a CDIOCSTART ioctl command), nobody should have relied on it. Besides, nobody noticed so far at all that this command is failing for caddy-type drives... Only few applications seem to use it at all (among them is workman, which made me notice it). Reviewed by: ken
* Add special quirk for this ancient Viper drive. This is all creepingmjacob2000-11-081-0/+5
| | | | | | | driver bloat -I really *have* to do a quirk table that can be loaded by the loader. Submitted by: Hellmuth Michaelis <hm@kts.org>
* Fix async notifications for listners registered to wildcard nodes. Forgibbs2000-11-061-55/+77
| | | | | | | example, a client registered to receive specific events for bus 0, target *, lun *, was not receiving notifications. Reviewed by: ken@FreeBSD.org
* Fix a problem with the previous revision (1.42) that showed up with audioken2000-11-041-0/+93
| | | | | | | | | | | | | | | | | | CDs. With audio CDs, you can't just do a READ(10) call on most drives without first setting the blocksize with a mode select command. The disklabel code does a read of the first sector of the media to find a label if it exists. This caused drives to return an error when an audio CD was in the drive, due to the problem described above. The solution is to read the table of contents on the CD, and only attempt to read the disklabel if the first track is a data track. This works on all the various CD and DVD media I have tried, but further testing (especially with Video CDs and other mode 2 media) will be needed to determine if this is a universal solution.
* 1. Oops on last commit: note a few SCSI-3 items for data compression page.mjacob2000-10-311-1/+1
| | | | | 2. Change copyright to me- per practive of scsi_sa.c that Justin had me do a while back.
* scsi_sa.hmjacob2000-10-312-11/+36
|
* Treat engine inquiry the same as path inquiry in xptioctl().gibbs2000-10-311-5/+3
| | | | | | | | Return ENOTSUP for any opcode that is not supported by the XPT device. Add back a missing local declaration that seems to have been deleted by my last commit.
* 0x03F -> 0x3F for consistancy with the rest of the file.gibbs2000-10-311-1/+1
|
* Allow async transfer negotiation updates to modify tagging behavior.gibbs2000-10-311-3/+1
| | | | | | | | | | The XPT uses this to prevent tags from being used on parallel SCSI interfaces immediately after a bus reset or BDR so that controllers have an oportunity to renegotiate without tag messages in the way. Somehow this got disabled... the functionality has been here for quite some time. Noticed by: my SCSI bus analyzer
* Allow XPT_PATH_INQ to be performed on the XPT device, as per the CAM spec.scottl2000-10-301-1/+7
| | | | | | | Return ENOTSUP for XPT_ENG_INQ and XPT_ENG_EXEC when performed on the XPT device. Reviewed by: gibbs
* Remove unused #includes.non2000-10-302-16/+6
| | | | Submitted by: phk@FreeBSD.ORG
* Remove unused #includesphk2000-10-304-7/+0
| | | | Reviewed by: ken
* Write support for the cd(4) driver.ken2000-10-301-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows writing to DVD-RAM, PD and similar drives that probe as CD devices. Note that these are randomly writeable devices, not sequential-only devices like CD-R drives, which are supported by cdrecord. Add a new flag value for dsopen(), DSO_COMPATLABEL. The cd(4) driver now uses this flag instead of the DSO_NOLABELS flag. The DSO_NOLABELS always used a "fake" disklabel for the entire disk, provided by the caller. With the DSO_COMPATLABEL flag, dsopen() will first search the media for a label, and if it finds a label, it will use that label. Otherwise it will use the fake disklabel provided by the caller. This provides backwards compatibility, since we will still have labels for ISO9660 media. It also provides new functionality, since you can now have a regular BSD disklabel on read-only media, or on writeable media (e.g. DVD-RAM). Bruce and I both think that we should eventually (in a few years) get away from using disklabels for ISO9660 media, and just use the whole disk device (/dev/cd0). At that point disklabel handling in the cd(4) driver could follow the "normal" model, as used in the da(4) driver. Also, clean up the path in a couple of places in cdregister(). (Thanks to Nick Hibma for catching that bug.) Reviewed by: bde
* Add the use of M_ZERO to some malloc calls.dwmalone2000-10-293-19/+9
| | | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Approved by: gibbs
* Remove unneeded #include <sys/proc.h> lines.phk2000-10-291-1/+0
|
* Changed not to use struct isa_device in the argument of scsi_low_activate().non2000-10-292-3/+4
| | | | | You will not need COMPAT_OLDISA in config file. This interface may have to change in future.
* Add a quirk entry for Nakamichi MJ-* changers. The changer in question isken2000-10-281-0/+4
| | | | | | a <NAKAMICH MJ-5.16S 1.06>. Submitted by: Kevin Van Maren <vanmaren@fast.cs.utah.edu>
* Add usage of M_ZERO to malloc calls where the result was just bzeroed.mjacob2000-10-271-7/+4
| | | | | PR: 22186 Submitted (partially) by: josh@zipperup.org
* Convert all users of fldoff() to offsetof(). fldoff() is badphk2000-10-272-2/+0
| | | | | | | | | | | | | | | | | | | | | | | because it only takes a struct tag which makes it impossible to use unions, typedefs etc. Define __offsetof() in <machine/ansi.h> Define offsetof() in terms of __offsetof() in <stddef.h> and <sys/types.h> Remove myriad of local offsetof() definitions. Remove includes of <stddef.h> in kernel code. NB: Kernelcode should *never* include from /usr/include ! Make <sys/queue.h> include <machine/ansi.h> to avoid polluting the API. Deprecate <struct.h> with a warning. The warning turns into an error on 01-12-2000 and the file gets removed entirely on 01-01-2001. Paritials reviews by: various. Significant brucifications by: bde
* - Overhaul the software interrupt code to use interrupt threads for eachjhb2000-10-251-29/+17
| | | | | | | | | | | | | | | | | | | type of software interrupt. Roughly, what used to be a bit in spending now maps to a swi thread. Each thread can have multiple handlers, just like a hardware interrupt thread. - Instead of using a bitmask of pending interrupts, we schedule the specific software interrupt thread to run, so spending, NSWI, and the shandlers array are no longer needed. We can now have an arbitrary number of software interrupt threads. When you register a software interrupt thread via sinthand_add(), you get back a struct intrhand that you pass to sched_swi() when you wish to schedule your swi thread to run. - Convert the name of 'struct intrec' to 'struct intrhand' as it is a bit more intuitive. Also, prefix all the members of struct intrhand with 'ih_'. - Make swi_net() a MI function since there is now no point in it being MD. Submitted by: cp
* Add PC-Card/ISA SCSI host adpater drivers from NetBSD/pc98non2000-10-235-0/+3490
| | | | | | | | | (a NetBSD port for NEC PC-98x1 machines). They are ncv for NCR 53C500, nsp for Workbit Ninja SCSI-3, and stg for TMC 18C30 and 18C50. I thank NetBSD/pc98 and bsd-nomads people. Obtained from: NetBSD/pc98
OpenPOWER on IntegriCloud