aboutsummaryrefslogtreecommitdiff
path: root/sys/cam
Commit message (Collapse)AuthorAgeFilesLines
* Revert rev 1.140, it was a bit pre-mature.Paul Saab2004-06-211-5/+0
| | | | Notes: svn path=/head/; revision=130866
* Add a quirk for ciss to stop trying to read the serial number offPaul Saab2004-06-211-0/+5
| | | | | | | of logical volumes. Notes: svn path=/head/; revision=130864
* Second half of the dev_t cleanup.Poul-Henning Kamp2004-06-171-1/+1
| | | | | | | | | | | | | | The big lines are: NODEV -> NULL NOUDEV -> NODEV udev_t -> dev_t udev2dev() -> findcdev() Various minor adjustments including handling of userland access to kernel space struct cdev etc. Notes: svn path=/head/; revision=130640
* Do the dreaded s/dev_t/struct cdev */Poul-Henning Kamp2004-06-167-38/+38
| | | | | | | Bump __FreeBSD_version accordingly. Notes: svn path=/head/; revision=130585
* Reformat the comments for cam_hdr so that they can be read.Scott Long2004-06-071-8/+7
| | | | Notes: svn path=/head/; revision=130200
* Quirk for Neuros USB audio device.Nate Lawson2004-05-021-0/+8
| | | | | | | | PR: kern/63645 Submitted by: Aron Stansvik <elvstone@osdever.net> Notes: svn path=/head/; revision=128840
* The opt_da.h file doesn't exist anymore since the DA_OLD_QUIRKS optionMaxime Henrion2004-04-191-1/+0
| | | | | | | has been removed. Unbreak the build by not including it anymore. Notes: svn path=/head/; revision=128426
* Add miscellaneous USB device quirks.Nate Lawson2004-04-191-5/+29
| | | | | | | | | | | | PR: kern/53067 PR: kern/54737 PR: kern/54786 PR: kern/57046 MFC after: 1 day Notes: svn path=/head/; revision=128416
* Remove all quirks hidden under DA_OLD_QUIRKS.Nate Lawson2004-04-191-120/+0
| | | | Notes: svn path=/head/; revision=128415
* Compare the *number* of patterns to zero, not the *pointer* to theColin Percival2004-02-281-1/+1
| | | | | | | | | | patterns. (These lines are correct the other two times they appear.) Reported by: "Ted Unangst" <tedu@coverity.com> Approved by: rwatson (mentor), ken (scsi) Notes: svn path=/head/; revision=126348
* Check that periph is non-NULL before dereferencing it.Colin Percival2004-02-221-1/+1
| | | | | | | | Reported by: "Ted Unangst" <tedu@coverity.com> Approved by: rwatson (mentor), ken (scsi@) Notes: svn path=/head/; revision=126104
* Device megapatch 4/6:Poul-Henning Kamp2004-02-217-1/+14
| | | | | | | | | | | Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags. Notes: svn path=/head/; revision=126080
* Device megapatch 1/6:Poul-Henning Kamp2004-02-217-16/+1
| | | | | | | | | | Free approx 86 major numbers with a mostly automatically generated patch. A number of strategic drivers have been left behind by caution, and a few because they still (ab)use their major number. Notes: svn path=/head/; revision=126076
* Change the disk(9) API in order to make device removal more robust.Poul-Henning Kamp2004-02-182-44/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the "struct disk" were owned by the device driver and this gave us problems when the device disappared and the users of that device were not immediately disappearing. Now the struct disk is allocate with a new call, disk_alloc() and owned by geom_disk and just abandonned by the device driver when disk_create() is called. Unfortunately, this results in a ton of "s/\./->/" changes to device drivers. Since I'm doing the sweep anyway, a couple of other API improvements have been carried out at the same time: The Giant awareness flag has been flipped from DISKFLAG_NOGIANT to DISKFLAG_NEEDSGIANT A version number have been added to disk_create() so that we can detect, report and ignore binary drivers with old ABI in the future. Manual page update to follow shortly. Notes: svn path=/head/; revision=125975
* Fix type in comment, 's/writtent/written/'Johan Karlsson2004-01-181-1/+1
| | | | | | | | PR: 56954 Submitted by: Dan Langille <dan@langille.org> Notes: svn path=/head/; revision=124645
* Move the ciss quirk to the right section, also update the commentPaul Saab2003-12-081-8/+7
| | | | | | | | stating that the controllers do not support SYNC CACHE since ciss only supports a small subset of the scsi spec. Notes: svn path=/head/; revision=123285
* ciss doesn't like scsi SYNC CACHE. turn it offPaul Saab2003-12-081-0/+8
| | | | Notes: svn path=/head/; revision=123283
* SS_FATAL|ENXIO rather than SS_RDEF for illegal track mode.David E. O'Brien2003-12-011-1/+1
| | | | | | | | | | | This reduces the 90+ lines boot output of spewage GEOM does for my Plextor SCSI burner. Submitted by: scottl Approved by: scottl Notes: svn path=/head/; revision=123083
* - Implement selwakeuppri() which allows raising the priority of aSeigo Tanimura2003-11-091-1/+1
| | | | | | | | | | | | | | | | thread being waken up. The thread waken up can run at a priority as high as after tsleep(). - Replace selwakeup()s with selwakeuppri()s and pass appropriate priorities. - Add cv_broadcastpri() which raises the priority of the broadcast threads. Used by selwakeuppri() if collision occurs. Not objected in: -arch, -current Notes: svn path=/head/; revision=122352
* Sprinkle GIANT_REQUIRED asserts around the xpt layer to aid with locking theScott Long2003-11-091-0/+58
| | | | | | | SCSI drivers. Notes: svn path=/head/; revision=122347
* Don't be so chatty when performing manual sense. This should make ATAPICAMScott Long2003-11-081-2/+2
| | | | | | | devices a lot more quiet. Notes: svn path=/head/; revision=122307
* In camperiphdone(), make sure we check for fatal errors and bail outKenneth D. Merry2003-10-272-16/+17
| | | | | | | | | | | | | | | | | | | | | | | | | instead of retrying them blindly. This should fix some of the problems people have been having with cdrom drives taking a long time to probe. This should also eliminate the need for the initial TUR in cdsize(). cam_periph.c: Don't keep retrying if the error we get back is a fatal error. This should help us detect the transition from "Logical unit not ready, cause not reportable" to "Medium not present" in the "TUR many" handler. (The TUR many handler gets triggered for Logical unit not ready, cause not reportable errors.) scsi_cd.c: Remove the initial test unit ready in cdsize(). Hopefully it isn't necessary after the above change. Submitted by: gibbs (mostly) Tested by: peter MFC After: 2 weeks Notes: svn path=/head/; revision=121602
* Use bio_offset instead of bio_blknoPoul-Henning Kamp2003-10-181-2/+2
| | | | Notes: svn path=/head/; revision=121209
* There is no need to muck about with the B_PHYS flag here. We never evenPoul-Henning Kamp2003-10-181-8/+0
| | | | | | | get close to DEV_STRATEGY() which is the only place it is relevant. Notes: svn path=/head/; revision=121194
* (dacleanup, dasysctlinit): Defend against calling sysctl_ctx_free onThomas Quinot2003-10-081-2/+5
| | | | | | | | | | | an uninitialized sysctl_ctx, using flag DA_FLAG_SCTX_INIT. This prevents a panic encoutered with some umass units that probe correctly but fail to attach. Same problem, and same fix, as scsi_cd.c rev. 1.86. Reviewed by: njl, ken Notes: svn path=/head/; revision=120906
* (cdcleanup): Defend against calling sysctl_ctx_free before the sysctl_ctxThomas Quinot2003-10-071-12/+15
| | | | | | | | | | | | | | has been initialized. (cdsysctlinit): Set flag CD_FLAG_SCTX_INIT after sysctl_ctx has been initialized. This resolves a panic encountered when a cd drive is sucessfully probed but fails to attach. Reviewed by: ken Notes: svn path=/head/; revision=120884
* Add disk_destroy() call to detach processing.Poul-Henning Kamp2003-10-061-0/+15
| | | | | | | Add short tempered TUR to cdsize() as a workaround. Notes: svn path=/head/; revision=120854
* Be kind to 64bit architectures.Hidetoshi Shimokawa2003-10-021-5/+5
| | | | Notes: svn path=/head/; revision=120663
* - Pick up a correct path_id for the bus on AC_PATH_REGISTERED.Hidetoshi Shimokawa2003-09-301-6/+12
| | | | | | | - Call cam_periph_invalidate() only if the periph is found. Notes: svn path=/head/; revision=120601
* GEOMify.Poul-Henning Kamp2003-09-301-78/+39
| | | | Notes: svn path=/head/; revision=120599
* Detach black hole device on AC_PATH_DEREGISTERED.Hidetoshi Shimokawa2003-09-251-19/+20
| | | | Notes: svn path=/head/; revision=120426
* (scsi_request_sense): Set allocation length in REQUEST_SENSE CCB.Thomas Quinot2003-09-211-0/+1
| | | | | | | Reviewed by: ken Notes: svn path=/head/; revision=120314
* (camperiphdone): When the cam_periph layer performs sense recovery,Thomas Quinot2003-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 Notes: svn path=/head/; revision=120313
* I forgot whom I got this from- only set single initiator buffered modeMatt Jacob2003-09-131-2/+4
| | | | | | | if we've recorded in our softc that we should set it. Notes: svn path=/head/; revision=120019
* Disable the use of cloning use in floppy and CD drivers.Poul-Henning Kamp2003-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 Notes: svn path=/head/; revision=119994
* In case vmapbuf() fails, release all of the held resources.Alan Cox2003-09-101-5/+3
| | | | | | | Submitted by: tegge Notes: svn path=/head/; revision=119957
* Put the device cloning functions for disk-drivers under #ifndef BURN_BRIDGES.Poul-Henning Kamp2003-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. Notes: svn path=/head/; revision=119761
* Calling KNOTE with locks held may result in recursion when it calls backNate Lawson2003-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 Notes: svn path=/head/; revision=119742
* Upon receiving a CCB for a LUN that is not enabled, be sure to unlock theNate Lawson2003-09-041-0/+1
| | | | | | | | | softc on exit. Submitted by: simokawa Notes: svn path=/head/; revision=119741
* Remove the quirk for the FujiFilm camera. Submitter indicates it is nowNate Lawson2003-09-041-8/+0
| | | | | | | | | | | | | | working without the quirk. PR: Submitted by: guido Reviewed by: Approved by: Obtained from: MFC after: 30 days Notes: svn path=/head/; revision=119728
* Unbreak buildworld. sys/taskqueue.h is a kernel-only include.Kenneth D. Merry2003-09-031-1/+1
| | | | | | | Pointy Hat to: ken Notes: svn path=/head/; revision=119718
* Move dynamic sysctl(8) variable creation for the cd(4) and da(4) driversKenneth D. Merry2003-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 Notes: svn path=/head/; revision=119708
* Remove quirk for Apacer Handydrive. Kevin Oberman <oberman@es.net> reportsNate Lawson2003-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 Notes: svn path=/head/; revision=119465
* Sort quirks into sections.Nate Lawson2003-08-251-19/+20
| | | | Notes: svn path=/head/; revision=119461
* Add the DA_Q_NO_PREVENT quirk which keeps da(4) from sending PREVENT/ALLOWNate Lawson2003-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 Notes: svn path=/head/; revision=119308
* Quirk for Jungsoft NEXDISK USB flash key. Fails to mount withoutNate Lawson2003-08-221-0/+8
| | | | | | | | | | | NO_SYNCHRONIZE_CACHE. PR: kern/54737 Submitted by: David Thiel <lx@redundancy.redundancy.org> MFC after: 3 days Notes: svn path=/head/; revision=119279
* Add quirks for the EXATELECOM i-Bead mp3 player.Nate Lawson2003-08-221-0/+8
| | | | | | | | | PR: kern/51675 Submitted by: Nicolas Jombart <ecu@ipv42.net> MFC after: 3 days Notes: svn path=/head/; revision=119275
* Remove all USB quirks that only specify DA_Q_NO_6_BYTE. They are no longerNate Lawson2003-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 Notes: svn path=/head/; revision=118556
* Remove unused cmd6workaround() calls.Nate Lawson2003-08-061-15/+2
| | | | | | | MFC after: 1 day Notes: svn path=/head/; revision=118546
* Fix the new DA_OLD_QUIRKS option for normal and module compiles.Nate Lawson2003-07-291-0/+1
| | | | | | | Pointed out by: bde Notes: svn path=/head/; revision=118179