summaryrefslogtreecommitdiffstats
path: root/sys/cam
Commit message (Collapse)AuthorAgeFilesLines
* - Remove the inthand2_t type and use the equivalent driver_intr_t type fromjhb2000-09-131-1/+1
| | | | | | | | | | | | | newbus for referencing device interrupt handlers. - Move the 'struct intrec' type which describes interrupt sources into sys/interrupt.h instead of making it just be a x86 structure. - Don't create 'ithd' and 'intrec' typedefs, instead, just use 'struct ithd' and 'struct intrec' - Move the code to translate new-bus interrupt flags into an interrupt thread priority out of the x86 nexus code and into a MI ithread_priority() function in sys/kern/kern_intr.c. - Remove now-uneeded x86-specific headers from sys/dev/ata/ata-all.c and sys/pci/pci_compat.c.
* Change the "Duplicate Wired Device entry" printout in camperiphnextunit token2000-08-291-7/+13
| | | | | | | | | also mention the peripheral name, bus, target and lun of the device we attempted to put in that slot. This gives the user a little more information about what is going on. Tested by: Andre Albsmeier <andre.albsmeier@mchp.siemens.de> Discussed with: gibbs
* Add quirk entries from Andre Albsmeier to disable the sync cache commandken2000-08-292-12/+21
| | | | | | | | | | | | | | for the Quantum "MAVERICK 540S" and "LPS525S". Also, add common string variables, since we seem to have a few Quantum and Micropolis drives in here. Fix the 'quantum' variable usage in scsi_all.c that likely got broken when someone staticized things in cam_xpt.c. (That particular problem would cause Quantum Fireball ST drives to not get spun up if they were not already spinning.) Submitted by: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
* Quick fix. <sys/conf.h> now depends on <sys/time.h>, which is not presentpeter2000-08-241-0/+2
| | | | when libcam is building this in userland.
* CAM, the module: scbus, da, cd, and st wrapped in one module.n_hibma2000-08-131-1/+24
| | | | | | | Make the umass driver depend on this module. Makes it possible to compile the kernel without SCSI support and load it when for example a USB floppy is conencted.
* Don't attempt to actually read SAF-TE temperature objects- nobody seemsmjacob2000-08-081-19/+21
| | | | | | | | | | to be obeying the original spec as to what the numeric value means. Temperature flags are unaffected- these are still the 'pseudo-thermometers' and overtemp/undertemp warnings will be caught and translated to SES objects here. PR: 20475
* The Yamaha CDR100 doesn't seem to like multi-LUN probing.ken2000-08-081-0/+4
| | | | | PR: kern/20347 Submitted by: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
* This is an overhaul of the mode page handling in camcontrol as well askbyanc2000-08-081-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | related patches. These include: * Mode page editting can be scripted. This involves two things: first, if stdin is not a tty, changes are read from stdin rather than invoking $EDITOR. Second, and more importantly, not all modepage entries must be included in the change set. This means that camcontrol can now gracefully handle more intrusive editting from the $EDITOR, including removal or rearrangement of lines. It also means that you can do stuff like: # echo "WCE: 1" | camcontrol modepage da3 -m 8 -e # newfs /dev/da3 # echo "WCE: 0" | camcontrol modepage da3 -m 8 -e * Range-checking on user-supplied input values. modeedit.c now uses the field width specifiers to determine the maximum allowable value for a field. If the user enters a value larger than the maximum, it clips the value to the max and warns the user. This also involved patching cam_cmdparse.c to be more consistent with regards to the "count" parameter to arg_put (previously is was the length of strings and 1 for all integral types). The cam_cdbparse(3) man page was also updated to reflect the revised semantics. * In the process, I removed the 64 entry limit on mode pages (not that we were even close to hitting that limit). This was a nice side-effect of the other changes. * Technically, the new mode editting functionality allows editting of character array entries in mode pages (type 'c' or 'z'), however since buff_encode doesn't grok them it is currently useless. * Camcontrol gained two new options related to mode pages: -l and -b. The former lists all available mode pages for a given device. The latter forces mode page display in binary format (the default when no mode page definition was found in scsi_modes). * Added support for mode page names to scsi_modes. Allows names to be displayed alongside mode numbers in the mode page listing. Updated scsi_modes to use the new functionality. This also adds the semicolon into the scsi_modes syntax as an optional mode page definition terminator. This is needed to name pages without providing a page format definition. * Updated scsi_all.h to include a structure describing mode page headers. * Added $FreeBSD$ line to scsi_modes. Inspired by: dwhite Reviewed by: ken
* Support for the Panasonic / Matshita USB FDD.n_hibma2000-07-311-0/+6
| | | | | Submitted by: SAKIYAMA Nobuo <sakichan@lares.dti.ne.jp> PR: kern/20300
* scsi_all.c:gibbs2000-07-182-12/+34
| | | | | | | | | Clean up the comments related to the high speed sync rate table for SPI. scsi_message.h: Bring in some SCSI3 message terminology. All SCSI2 names are still preserved for backwards compatibility.
* cam_ccb.h:gibbs2000-07-182-0/+13
| | | | | | | | | | | | | Bring back the CAM_NEGOTIATE ccb flag. This flag indicates that SPI transfer negotiation should occur concurrently with the execution of this CCB. The flag is not yet used by the XPT but is required for proper support of multi-initiator configurations where topology scans cannot rely on a bus reset to invalidate prior negotiations. cam_xpt.c: Don't allow DT transmission rates to be specified for devices that don't have the DT feature listed in their inquiry data.
* Preserve CAM_DIS_DISCONNECT as passed up from SIM (likemjacob2000-07-171-9/+16
| | | | | | | | CAM_TAG_ACTION_VALID and CAM_DIR_MASK). Remove redundant CAM_DEBUG line. Spiff up CAM_DEBUG printout for commands and move the printout up to the top where we can see it, even for the pending_ua/pending_ca cass. Add missing newline in a CAM_DEBUG.
* Whoops- forgot to commit this other pearl from Justin- only set ormjacob2000-07-171-8/+12
| | | | | | clear CAM_TAG_ACTION_VALID if this is an XPT_SCSI_IO CCB (otherwise, the peripheral driver knows best...).. Obtained from:gibbs@freebsd.org
* Don't, when doing cam_fill_ctio, add a SIMPLE Q tag unlessmjacob2000-07-142-3/+5
| | | | TAG_ACTION_VALID is set.
* Pick up some changes from Justin (add tagged queing support, remembermjacob2000-07-141-15/+96
| | | | | | | | | | | to splx(s) if cam_extend_get fails and we return ENXIO, reset ccb flags when we push ATIOs back to the SIM, do some data increment fixes, set priority of command based on whether CAM_DIS_DISCONNECT is set and related changes). Add in some more CAM_DEBUG_PERIPH debug statements and also add in support for TARGIODEBUG which then will enable or disable CAM_DEBUG_PERIPH tracing for an instance.
* Add a TARGIODEBUG ioctl to allow for CAM_DEBUG_PERIPH tracing onmjacob2000-07-141-0/+5
| | | | an opened target instance.
* Properly initialize softc. Do some minor SCSI_CDB6_LEN changes.mjacob2000-07-141-4/+4
| | | | Obtained from:gibbs@freebsd.org
* Add SCSI_CDB6_LEN macro (where 0 ==> 256).mjacob2000-07-141-0/+3
| | | | Obtained from:gibbs@freebsd.org
* Quirk entry for TeraSolutions TRC-22 RAID controller to keep mintagsdg2000-07-131-0/+5
| | | | from dropping below 55 due to temporary resource shortages.
* Use %p to print a pointer.mjacob2000-07-081-1/+1
|
* Fix breakage where we never were attaching SES devices because inq_lenmjacob2000-06-181-0/+3
| | | | was not being set > 0.
* Disable multi-lun probing on Hitachi DK31* drives.ken2000-06-041-0/+12
| | | | | PR: misc/18793 Submitted by: Paul Haddad <paul@pth.com>
* Brucify the pmap_enter_temporary() changes.dfr2000-05-291-5/+3
|
* Add a new pmap entry point, pmap_enter_temporary() to be used duringdfr2000-05-281-3/+6
| | | | | | | dumps to create temporary page mappings. This replaces the use of CADDR1 which is fairly x86 specific. Reviewed by: dillon
* Back out the previous change to the queue(3) interface.jake2000-05-2610-41/+40
| | | | | | It was not discussed and should probably not happen. Requested by: msmith and others
* Change the way that the queue(3) structures are declared; don't assume thatjake2000-05-2310-40/+41
| | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
* Apply a `fixup' to the blocksize gathered from the device after a READjoerg2000-05-221-0/+10
| | | | | | | | | | CAPACITY operation. SCSI-3 mandates this to be 2048, but some older drives like my old Plasmon CD-R report weird numbers between 2048 and up to 2352 bytes depending on the mode of the last track etc. This in turn confuses stuff like the slice code since it refuses to work with devices that do not have a blocksize which is a multiple of 512 bytes. Reviewed by: ken
* Implement a new camcontrol function, 'camcontrol format'.ken2000-05-212-0/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libcam/Makefile: Add scsi_da.c to libcam for the new scsi_format_unit() function. camcontrol.8: Update the man page for the new format functionality, and take out the examples section describing how to do it with 'camcontrol cmd'. camcontrol.c: New format functionality. Note that unlike the rest of the camcontrol subcommands, this one is interactive by default. Because of the potential destructiveness of the format command, I thought it necessary to get confirmation from the user before spamming a disk. You can disable the interactive behavior, and the status meter with command line arguments. scsi_da.c: Add the new scsi_format_unit() cdb building function and use #ifdef _KERNEL to make this file compile in both the kernel and userland. The format unit function is currently only defined in the non-kernel case, because nothing in the kernel is using it. If that changes, it should be un-ifdefed and compiled in both cases. scsi_da.h: New function declaration, CDB structure and format data structures. Thanks to Nick Hibma for providing some valuable input on these changes.
* Implement an optimization of the VM<->pmap API. Pass vm_page_t's directlypeter2000-05-211-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to various pmap_*() functions instead of looking up the physical address and passing that. In many cases, the first thing the pmap code was doing was going to a lot of trouble to get back the original vm_page_t, or it's shadow pv_table entry. Inspired by: John Dyson's 1998 patches. Also: Eliminate pv_table as a seperate thing and build it into a machine dependent part of vm_page_t. This eliminates having a seperate set of structions that shadow each other in a 1:1 fashion that we often went to a lot of trouble to translate from one to the other. (see above) This happens to save 4 bytes of physical memory for each page in the system. (8 bytes on the Alpha). Eliminate the use of the phys_avail[] array to determine if a page is managed (ie: it has pv_entries etc). Store this information in a flag. Things like device_pager set it because they create vm_page_t's on the fly that do not have pv_entries. This makes it easier to "unmanage" a page of physical memory (this will be taken advantage of in subsequent commits). Add a function to add a new page to the freelist. This could be used for reclaiming the previously wasted pages left over from preloaded loader(8) files. Reviewed by: dillon
* Add support for the DVD ioctl interface.ken2000-05-122-1/+1083
|
* Some prettifying for the quirk comments.mjacob2000-05-091-5/+16
| | | | | | | | | | Add a SA_QUIRK_NO_MODESEL type and use it for the OnStream real SCSI device (not the broken one). This one is still broken in that it can't be set to the same fixed block size it reports [ unflattering comments about this company elided ]. If we're unable to set buffered mode on, complain, but drive on. It's not a fatal error to not be in buffered mode.
* *sigh* I must have been on something that night. Make xpt_periph ann_hibma2000-05-072-1/+3
| | | | | extern with the original in cam_xpt.c instead of replicating xpt_periph in all the sources using it (and hence not initialising it)
* Separate the struct bio related stuff out of <sys/buf.h> intophk2000-05-058-7/+8
| | | | | | | | | | | | | | | <sys/bio.h>. <sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall not be made a nested include according to bdes teachings on the subject of nested includes. Diskdrivers and similar stuff below specfs::strategy() should no longer need to include <sys/buf.> unless they need caching of data. Still a few bogus uses of struct buf to track down. Repocopy by: peter
* Add in include of <machine/clock.h> which defines DELAY.mjacob2000-05-021-0/+1
|
* Add $FreeBSD$peter2000-05-013-0/+4
|
* Remove unneeded #include <sys/kernel.h>phk2000-04-291-1/+0
|
* Remove unneeded <sys/buf.h> includes.phk2000-04-182-2/+0
| | | | | Due to some interesting cpp tricks in lockmgr, the LINT kernel shrinks by 924 bytes.
* Don't include <sys/buf.h> twice.phk2000-04-182-2/+0
|
* Overlooked a s/b_act/bio_queue/ substitution due to targ not being in LINT.phk2000-04-161-2/+2
| | | | Spotted by: mjacob
* Complete the bio/buf divorce for all code below devfs::strategyphk2000-04-156-281/+281
| | | | | | | | | | Exceptions: Vinum untouched. This means that it cannot be compiled. Greg Lehey is on the case. CCD not converted yet, casts to struct buf (still safe) atapi-cd casts to struct buf to examine B_PHYS
* Add a hack to cam that makes the cam_xpt available to the rest of then_hibma2000-04-032-2/+2
| | | | | | | | | | | | | | | | | | | | | | | kernel. Justin agress that there is no other reasonable alternative to do automatic rescans on connect. The problem is that when a new device attaches to a SIM (SCSI host controller) we need to send a XPT_SCAN_BUS command to the SIM using xpt_action. This requires however that there is a peripheral available to take the command (otherwise xpt_done and later bomb). The RESCAN ioctl uses the same periph. This enables a USB mass storage drive to do an automatic rescan on connection of the drive. The automatic dropping of a CAM entry on disconnection was already working (asynchronous event). The next thing to do is find someone to commit a change to vpo to do the same thing. Just port umass_cam_rescan and friends across to that driver. Approved by: gibbs
* Move B_ERROR flag to b_ioflags and call it BIO_ERROR.phk2000-04-026-35/+35
| | | | | | | | | | | | | (Much of this done by script) Move B_ORDERED flag to b_ioflags and call it BIO_ORDERED. Move b_pblkno and b_iodone_chain to struct bio while we transition, they will be obsoleted once bio structs chain/stack. Add bio_queue field for struct bio aware disksort. Address a lot of stylistic issues brought up by bde.
* Fix two problems in the ch(4) driver.ken2000-04-021-2/+13
| | | | | | | | | | | | - Mike Smith discovered a panic in the changer probe code if the probe command (mode sense) fails. So we need to release the CCB used in the probe before we unlock the peripheral. (i.e. the same fix mjacob put in the CD and DA drivers) - A newline was missing in a warning message. (PR kern/17512) PR: kern/17512 Submitted by: Louis Mamakos <louie@uu.net> (newline fix)
* Remove B_READ, B_WRITE and B_FREEBUF and replace them with a newphk2000-03-206-16/+15
| | | | | | | | | | | | | | | | | | | | | field in struct buf: b_iocmd. The b_iocmd is enforced to have exactly one bit set. B_WRITE was bogusly defined as zero giving rise to obvious coding mistakes. Also eliminate the redundant struct buf flag B_CALL, it can just as efficiently be done by comparing b_iodone to NULL. Should you get a panic or drop into the debugger, complaining about "b_iocmd", don't continue. It is likely to write on your disk where it should have been reading. This change is a step in the direction towards a stackable BIO capability. A lot of this patch were machine generated (Thanks to style(9) compliance!) Vinum users: Greg has not had time to test this yet, be careful.
* o clear the ccb_flags field before sending an accept target I/O ccb togibbs2000-03-181-6/+9
| | | | | | | | | | | | | | | an HBA. Garbage in this field confuses the driver in targdone(). o When completing a CCB on behalf of a user process, we need to *de-queue* the ccb from our pending ccb list, not queue it again. o All continue target I/O operations need to have a timeout set. We use 5 seconds throughout this driver. o Remove some logging printfs. o During abort processing, remove ccbs that are on the pending queue from the pending queue, not the work queue.
* Per Justin's request- remove his name from Copyright.mjacob2000-03-181-6/+1
|
* Add a quirk entry for Y-E Data USB floppy drive.n_hibma2000-03-151-0/+10
| | | | Driver follows in the next few days.
* Various typo's.n_hibma2000-03-155-6/+7
| | | | One minor nit. The speed was displayed wrong when below 1Mb/s.
* Some minor fixing - final for 4.0. Debugging messages toned down a bit.mjacob2000-02-291-21/+15
| | | | Approved: jkh
* Fix 'camcontrol inquiry'. The inquiry data structure changes (increased token2000-02-202-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 256 bytes) caused it to break on many devices. The SCSI spec says that for commands with 8-bit length fields, a value of 0 means 256 bytes. As it turns out, many devices don't deal with that properly. Some interpret the 0 as 0, and return no data. Others return more than 256 bytes of data, and cause an overrun. The fix is to tell the device we've only allocated SHORT_INQUIRY_LENGTH (36 bytes) of inquiry data, instead of sizeof(struct scsi_inquiry_data). camcontrol.c: Change inq_len in the call to scsi_inquiry() to SHORT_INQUIRY_LENGTH, and add a long comment explaining the reason for the change. scsi_all.h: Add a comment above the definitinon of SHORT_INQUIRY_LENGTH alerting people that it is both the initial probe inquiry length, and the minimum amount of data needed for scsi_print_inquiry() to function. scsi_all.c: Add a comment about SHORT_INQUIRY_LENGTH being the minimum amount of data needed for scsi_print_inquiry() to function. Reviewed by: gibbs Approved by: jkh Reported by: "John W. DeBoskey" <jwd@unx.sas.com>
OpenPOWER on IntegriCloud