summaryrefslogtreecommitdiffstats
path: root/sys/cam
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Add the quirk entry for the Sony Memory Stick Adapter.n_hibma2000-10-201-1/+14
| | | | Add NO_SYNQ_CACHE to the Sony DSC camera entry.
* Quiet a silly warning.jhb2000-10-191-1/+1
| | | | Pointy-hat to: ps
* Implement write combining for crashdumps. This is useful whenps2000-10-171-10/+17
| | | | | | | | | | | | | | | | | | write caching is disabled on both SCSI and IDE disks where large memory dumps could take up to an hour to complete. Taking an i386 scsi based system with 512MB of ram and timing (in seconds) how long it took to complete a dump, the following results were obtained: Before: After: WCE TIME WCE TIME ------------------ ------------------ 1 141.820972 1 15.600111 0 797.265072 0 65.480465 Obtained from: Yahoo! Reviewed by: peter
* Remove unneeded #include <machine/clock.h>phk2000-10-152-2/+0
|
* Slight cleanup - this is logically equivalent code but means one lesspeter2000-10-151-6/+6
| | | | use of the evil resource_locate() function.
* Add a quirk entry for the USB Sony DSC drive.n_hibma2000-10-101-1/+6
|
* - Heavyweight interrupt threads on the alpha for device I/O interrupts.jhb2000-10-051-1/+1
| | | | | | | | | | | - Make softinterrupts (SWI's) almost completely MI, and divorce them completely from the x86 hardware interrupt code. - The ihandlers array is now gone. Instead, there is a MI shandlers array that just contains SWI handlers. - Most of the former machine/ipl.h files have moved to a new sys/ipl.h. - Stub out all the spl*() functions on all architectures. Submitted by: dfr
* Grab the ccb *after* writing filemarks.mjacob2000-10-051-1/+1
| | | | | PR: 21723 Submitted by: razuwaev@relex.ru
* Don't do destroy_dev on devices which were just aliases.mjacob2000-10-051-6/+0
|
* Remove duplicate FreeBSD RCSID.gibbs2000-09-221-2/+0
|
* Remove unneeded includemjacob2000-09-211-2/+0
| | | | (from phk@freebsd.org)
* With the help of 'Eric Christeson <echriste@ssesco.com>', determinedmjacob2000-09-141-1/+1
| | | | that QIC 525 really should be 512 byte fixed blocksize.
* Follow the hints from PHK's new messages- only make_dev for a devicemjacob2000-09-141-12/+12
| | | | once. Alias names use the make_dev_alias function.
* - 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)
OpenPOWER on IntegriCloud