summaryrefslogtreecommitdiffstats
path: root/sys/cam
Commit message (Collapse)AuthorAgeFilesLines
* - Pick up a correct path_id for the bus on AC_PATH_REGISTERED.simokawa2003-09-301-6/+12
| | | | - Call cam_periph_invalidate() only if the periph is found.
* GEOMify.phk2003-09-301-78/+39
|
* Detach black hole device on AC_PATH_DEREGISTERED.simokawa2003-09-251-19/+20
|
* (scsi_request_sense): Set allocation length in REQUEST_SENSE CCB.thomas2003-09-211-0/+1
| | | | Reviewed by: ken
* (camperiphdone): When the cam_periph layer performs sense recovery,thomas2003-09-211-1/+1
| | | | | | | | completion of recovery is indicated by positioning the CAM_AUTOSNS_VALID bit in the status field of the CCB, not in the flags field. This fixes an endless loop of sense recovery actions. Reviewed by: ken
* I forgot whom I got this from- only set single initiator buffered modemjacob2003-09-131-2/+4
| | | | if we've recorded in our softc that we should set it.
* Disable the use of cloning use in floppy and CD drivers.phk2003-09-111-4/+4
| | | | | | | | | | This commit puts the relevant code snippets under #ifdef GONE_IN_5 (rather than #ifndef BURN_BRIDGES) thereby disabling the code now. The code wil be entirely removed before 5.2 unless we find reasons why this would be a bad idea. Approach suggested by: imp
* In case vmapbuf() fails, release all of the held resources.alc2003-09-101-5/+3
| | | | Submitted by: tegge
* Put the device cloning functions for disk-drivers under #ifndef BURN_BRIDGES.phk2003-09-051-0/+8
| | | | | | | | | | | For the floppy driver, use fdcontrol to manipulate density selection. For the CD drivers, the 'a' and 'c' suffix is without actual effect and any applications insisting on it can be satisfied with a symlink: ln -s /dev/cd0 /dev/cd0a Ongoing discussion may result in these pieces of code being removed before the 5-stable branch as opposed to after.
* Calling KNOTE with locks held may result in recursion when it calls backnjl2003-09-041-2/+13
| | | | | | | | into targreadfilt(). Unlock around calls to notify_user(). If an application is sending CCBs while the endpoint is shutting down, this may result in incomplete disable. A more complete solution will come with a "dying" flag. Submitted by: simokawa
* Upon receiving a CCB for a LUN that is not enabled, be sure to unlock thenjl2003-09-041-0/+1
| | | | | | softc on exit. Submitted by: simokawa
* Remove the quirk for the FujiFilm camera. Submitter indicates it is nownjl2003-09-041-8/+0
| | | | | | | | | | | working without the quirk. PR: Submitted by: guido Reviewed by: Approved by: Obtained from: MFC after: 30 days
* Unbreak buildworld. sys/taskqueue.h is a kernel-only include.ken2003-09-031-1/+1
| | | | Pointy Hat to: ken
* Move dynamic sysctl(8) variable creation for the cd(4) and da(4) driversken2003-09-032-43/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | out of cdregister() and daregister(), which are run from interrupt context. The sysctl code does blocking mallocs (M_WAITOK), which causes problems if malloc(9) actually needs to sleep. The eventual fix for this issue will involve moving the CAM probe process inside a kernel thread. For now, though, I have fixed the issue by moving dynamic sysctl variable creation for these two drivers to a task queue running in a kernel thread. The existing task queues (taskqueue_swi and taskqueue_swi_giant) run in software interrupt handlers, which wouldn't fix the problem at hand. So I have created a new task queue, taskqueue_thread, that runs inside a kernel thread. (It also runs outside of Giant -- clients must explicitly acquire and release Giant in their taskqueue functions.) scsi_cd.c: Remove sysctl variable creation code from cdregister(), and move it to a new function, cdsysctlinit(). Queue cdsysctlinit() to the taskqueue_thread taskqueue once we have fully registered the cd(4) driver instance. scsi_da.c: Remove sysctl variable creation code from daregister(), and move it to move it to a new function, dasysctlinit(). Queue dasysctlinit() to the taskqueue_thread taskqueue once we have fully registered the da(4) instance. taskqueue.h: Declare the new taskqueue_thread taskqueue, update some comments. subr_taskqueue.c: Create the new kernel thread taskqueue. This taskqueue runs outside of Giant, so any functions queued to it would need to explicitly acquire/release Giant if they need it. cd.4: Update the cd(4) man page to talk about the minimum command size sysctl/loader tunable. Also note that the changer variables are available as loader tunables as well. da.4: Update the da(4) man page to cover the retry_count, default_timeout and minimum_cmd_size sysctl variables/loader tunables. Remove references to /dev/r???, they aren't used any longer. cd.9: Update the cd(9) man page to describe the CD_Q_10_BYTE_ONLY quirk. taskqueue.9: Update the taskqueue(9) man page to describe the new thread task queue, and the taskqueue_swi_giant queue. MFC after: 3 days
* Remove quirk for Apacer Handydrive. Kevin Oberman <oberman@es.net> reportsnjl2003-08-251-8/+0
| | | | | | | that it works without the quirk. This and any other quirk changes will be MFCd after the release unless they fix a known problem. MFC after: 1 month
* Sort quirks into sections.njl2003-08-251-19/+20
|
* Add the DA_Q_NO_PREVENT quirk which keeps da(4) from sending PREVENT/ALLOWnjl2003-08-221-6/+15
| | | | | | | | | commands. Add a quirk for the Creative Nomad MuVo USB device that uses it as well as NO_SYNCHRONIZE_CACHE. PR: kern/53094 Submitted by: Richard Nyberg <rnyberg@it.su.se> MFC after: 3 days
* Quirk for Jungsoft NEXDISK USB flash key. Fails to mount withoutnjl2003-08-221-0/+8
| | | | | | | | NO_SYNCHRONIZE_CACHE. PR: kern/54737 Submitted by: David Thiel <lx@redundancy.redundancy.org> MFC after: 3 days
* Add quirks for the EXATELECOM i-Bead mp3 player.njl2003-08-221-0/+8
| | | | | | PR: kern/51675 Submitted by: Nicolas Jombart <ecu@ipv42.net> MFC after: 3 days
* Remove all USB quirks that only specify DA_Q_NO_6_BYTE. They are no longernjl2003-08-061-158/+0
| | | | | | | needed. Other USB quirks remain in hopes that user testing will reveal which ones are also no longer needed. Courtesy of: USENIX lunch break
* Remove unused cmd6workaround() calls.njl2003-08-061-15/+2
| | | | MFC after: 1 day
* Fix the new DA_OLD_QUIRKS option for normal and module compiles.njl2003-07-291-0/+1
| | | | Pointed out by: bde
* Deprecate USB and Firewire quirks. We should now never send 6 byte commandsnjl2003-07-291-18/+23
| | | | | | | to such devices. If a device fails due to this commit, add: options DA_OLD_QUIRKS to the kernel config and recompile. Then send the output of "camcontrol inquiry da0" to scsi@freebsd.org so the quirk can be re-enabled.
* Add a PATH_INQ flag, PIM_NO_6_BYTE, which indicates the SIM never wishes tonjl2003-07-283-1/+18
| | | | | | | | | | receive 6 byte commands. Add a check for this flag to da(4) and cd(4) so that they honor it. This is a quick workaround for many devices (especially USB) that require da(4) quirks to operate. The more complete approach is to finish the new transport code which will be aware of the SCSI version a transport implements. MFC after: 1 day
* Reference PR for IntelligentStick quirk entry.thomas2003-07-181-1/+1
| | | | PR: kern/53005
* Add quirk entry for IntelligentStick disc-on-key USB devices.thomas2003-07-171-0/+8
| | | | | | | Reported by Samuel Tardieu <sam@rfc1149.net>. Reviewed by: roberto MFC after: 1 week
* Merge common XPT_CALC_GEOMETRY functions into a single convenience function.njl2003-06-141-20/+1
| | | | | | | | | | | | | Devices below may experience a change in geometry. * Due to a bug, aic(4) never used extended geometry. Changes all drives >1G to now use extended translation. * sbp(4) drives exactly 1 GB in size now no longer use extended geometry. * umass(4) drives exactly 1 GB in size now no longer use extended geometry. For all other controllers in this commit, this should be a no-op. Looked over by: scottl
* Merge common XPT_CALC_GEOMETRY functions into a single convenience function.njl2003-06-142-0/+27
| | | | | | | | | | | | | | | | | | Devices below may experience a change in geometry. * Due to a bug, aic(4) never used extended geometry. Changes all drives >1G to now use extended translation. * sbp(4) drives exactly 1 GB in size now no longer use extended geometry. * umass(4) drives exactly 1 GB in size now no longer use extended geometry. For all other controllers in this commit, this should be a no-op. PR: Submitted by: Looked over by: scottl Approved by: Obtained from: MFC after:
* Use __FBSDID().obrien2003-06-1012-24/+40
|
* Use __FBSDID().obrien2003-06-105-11/+18
|
* Check in some months long pending minor debug output changes.mjacob2003-06-021-26/+47
| | | | | | Clarify that the implicit fallthrough was *not* intentional (thanks, Poul!) and reorganize the code so a correct fallthrough (with /* FALLTHROUGH */) occurs.
* Remove unused variables.phk2003-06-011-11/+1
| | | | | | | Remove break after return. Add XXX comment where intent is unclear. Found by: FlexeLint
* Add /* FALLTHROUGH */phk2003-06-011-0/+4
| | | | Found by: FlexeLint
* Add /* FALLTHROUGH */phk2003-05-313-9/+7
| | | | | | | Move /* FALLTHROUGH */ to correct location. Remove unused variable(s). Found by: FlexeLint
* Add /* FALLTHROUGH */phk2003-05-311-7/+4
| | | | | | | Remove unused variable(s). Order switch in canonical order. Found by: FlexeLint
* Add /* FALLTHROUGH */phk2003-05-311-0/+3
| | | | Found by: FlexeLint
* Use symbolic constants instead of "4".phk2003-05-312-15/+9
| | | | | | Use arrays instead of relying on struct packing. Identical md5(scsi_ch.o).
* Don't use return(foo(...)); in a function returning void.phk2003-05-311-6/+8
| | | | Found by: FlexeLint
* Add a quirk for OTi USB flash key.njl2003-05-151-0/+8
| | | | | PR: kern/51825 Approved by: re (rwatson)
* Fix three problems in large (>2TB) device handling:ken2003-05-031-2/+2
| | | | | | | | | | | - Make sure we don't release the READ CAPACITY CCB twice - If we have a device that needs a 16 byte READ CAPACITY command, make sure we call xpt_schedule() so we can get a CCB. - Don't unlock the peripheral until we're fully probed. Many thanks to Julian Elischer for providing hardware and testing this. Tested by: julian
* Fix compile errors on ia64 in dagetcapacity. Set block_len and maxsectorken2003-05-011-0/+2
| | | | | | to 0 initially. It seems that the ia64 backend isn't as "smart" as the i386 backend, which realized that those variables were only set or used when error == 0, and thus were not used uninitialized.
* Use %j instead of %q in printf to unbreak sparc64.phk2003-04-301-3/+4
|
* Add support to CAM for devices with more than 2^32 blocks. (2TB if you'reken2003-04-304-88/+347
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | using 512 byte blocks). cam_ccb.h: Bump up volume_size and cylinders in ccb_calc_geometry to 64 bits and 32 bits respectively, so we can hold larger device sizes. cylinders would overflow at about 500GB. Bump CAM_VERSION for this change. Note that this will require a recompile of all applications that talk to the pass(4) driver. scsi_all.c: Add descriptions for READ/WRITE(16), update READ/WRITE(12) descriptions, add descriptions for SERVICE ACTION IN/OUT. Add a new function, scsi_read_capacity_16(), that issues the read capacity service action. (Necessary for arrays larger than 2^32 sectors.) Update scsi_read_write() to use a 64 bit LBA and issue READ(16) or WRITE(16) if necessary. NOTE the API change. This should be largely transparnet to most userland applications at compile time, but will break binary compatibility. The CAM_VERSION bump, above, also serves the purpose of forcing a recompile for any applications that talk to CAM. scsi_all.h: Add 16 byte READ/WRITE structures, structures for 16 byte READ CAPACITY/SERVICE ACTION IN. Add scsi_u64to8b() and scsi_8btou64. scsi_da.c: The da(4) driver probe now has two stages for devices larger than 2TB. If a standard READ CAPACITY(10) returns 0xffffffff, we issue the 16 byte version of read capacity to determine the true array capacity. We also do the same thing in daopen() -- use the 16 byte read capacity if the device is large enough. The sysctl/loader code has also been updated to accept 16 bytes as a minimum command size.
* Deprecate machine/limits.h in favor of new sys/limits.h.kan2003-04-292-2/+2
| | | | | | | Change all in-tree consumers to include <sys/limits.h> Discussed on: standards@ Partially submitted by: Craig Rodrigues <rodrigc@attbi.com>
* SCSI Quirks for:njl2003-04-271-1/+35
| | | | | | | | | Casio QV-R3 USB camera, which appears to use a Pentax chipset M-Systems DiskOnKey USB flash key Feiya "slider" dual-slot flash reader SmartDisk (Mitsumi) USB floppy drive PR: kern/46545, kern/47793, kern/50020, kern/50226
* Remove the unused ioctl routine.phk2003-04-121-32/+0
|
* Sufficient access checks are performed by vmapbuf() that calling useracc()alc2003-04-061-19/+0
| | | | is pointless. Remove the calls to useracc().
* Use bioq_flush() to drain a bio queue with a specific error code.phk2003-04-014-54/+12
| | | | | | | | Retain the mistake of not updating the devstat API for now. Spell bioq_disksort() consistently with the remaining bioq_*(). #include <geom/geom_disk.h> where this is more appropriate.
* Clean up dynamically allocated sysctl variables when we run dacleanup() andken2003-03-262-0/+14
| | | | | | | | | | | cdcleanup(). This fixes sysctl problems ("can't re-use a leaf") when someone adds another peripheral at the same unit number. (e.g. rescan da0, it goes away, then rescan again and da0 comes back, but since we haven't cleaned up the sysctl variables from the last da0 instance, we can't register the variables for the new instance under the same name.) Reported by: njl Tested by: njl
* Run a revision of the devstat interface:phk2003-03-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Kernel: Change statistics to use the *uptime() timescale (ie: relative to boottime) rather than the UTC aligned timescale. This makes the device statistics code oblivious to clock steps. Change timestamps to bintime format, they are cheaper. Remove the "busy_count", and replace it with two counter fields: "start_count" and "end_count", which are updated in the down and up paths respectively. This removes the locking constraint on devstat. Add a timestamp argument to devstat_start_transaction(), this will normally be a timestamp set by the *_bio() function in bp->bio_t0. Use this field to calculate duration of I/O operations. Add two timestamp arguments to devstat_end_transaction(), one is the current time, a NULL pointer means "take timestamp yourself", the other is the timestamp of when this transaction started (see above). Change calculation of busy_time to operate on "the salami principle": Only when we are idle, which we can determine by the start+end counts being identical, do we update the "busy_from" field in the down path. In the up path we accumulate the timeslice in busy_time and update busy_from. Change the byte_* and num_* fields into two arrays: bytes[] and operations[]. Userland: Change the misleading "busy_time" name to be called "snap_time" and make the time long double since that is what most users need anyway, fill it using clock_gettime(CLOCK_MONOTONIC) to put it on the same timescale as the kernel fields. Change devstat_compute_etime() to operate on struct bintime. Remove the version 2 legacy interface: the change to bintime makes compatibility far too expensive. Fix a bug in systat's "vm" page where boot relative busy times would be bogus. Bump __FreeBSD_version to 500107 Review & Collaboration by: ken
OpenPOWER on IntegriCloud