summaryrefslogtreecommitdiffstats
path: root/sys/cam
Commit message (Collapse)AuthorAgeFilesLines
* Decrease poll interval from 1000 to 100us. This significantly reducesmav2010-09-221-3/+3
| | | | kernel dump time, especially with minidump.
* Use destroy_dev_sched(9) instead of destroy_dev(9) in passcleanup() asmdf2010-09-201-1/+5
| | | | | | | | it is indirectly a d_close method. Prompted by: kib Reviewed by: mav MFC after: 2 weeks
* Correct bioq_disksort so that bioq_insert_tail() offers barrier semantic.gibbs2010-09-022-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the BIO_ORDERED flag for struct bio and update bio clients to use it. The barrier semantics of bioq_insert_tail() were broken in two ways: o In bioq_disksort(), an added bio could be inserted at the head of the queue, even when a barrier was present, if the sort key for the new entry was less than that of the last queued barrier bio. o The last_offset used to generate the sort key for newly queued bios did not stay at the position of the barrier until either the barrier was de-queued, or a new barrier (which updates last_offset) was queued. When a barrier is in effect, we know that the disk will pass through the barrier position just before the "blocked bios" are released, so using the barrier's offset for last_offset is the optimal choice. sys/geom/sched/subr_disk.c: sys/kern/subr_disk.c: o Update last_offset in bioq_insert_tail(). o Only update last_offset in bioq_remove() if the removed bio is at the head of the queue (typically due to a call via bioq_takefirst()) and no barrier is active. o In bioq_disksort(), if we have a barrier (insert_point is non-NULL), set prev to the barrier and cur to it's next element. Now that last_offset is kept at the barrier position, this change isn't strictly necessary, but since we have to take a decision branch anyway, it does avoid one, no-op, loop iteration in the while loop that immediately follows. o In bioq_disksort(), bypass the normal sort for bios with the BIO_ORDERED attribute and instead insert them into the queue with bioq_insert_tail(). bioq_insert_tail() not only gives the desired command order during insertion, but also provides barrier semantics so that commands disksorted in the future cannot pass the just enqueued transaction. sys/sys/bio.h: Add BIO_ORDERED as bit 4 of the bio_flags field in struct bio. sys/cam/ata/ata_da.c: sys/cam/scsi/scsi_da.c Use an ordered command for SCSI/ATA-NCQ commands issued in response to bios with the BIO_ORDERED flag set. sys/cam/scsi/scsi_da.c Use an ordered tag when issuing a synchronize cache command. Wrap some lines to 80 columns. sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c sys/geom/geom_io.c Mark bios with the BIO_FLUSH command as BIO_ORDERED. Sponsored by: Spectra Logic Corporation MFC after: 1 month
* Revert r211434. Offline discussions have convinced me that this shouldmjacob2010-08-201-18/+2
| | | | be left alone for now.
* Now is as good a time as any to find out if we induce breakagemjacob2010-08-171-2/+18
| | | | | | | by issueing aborts for any pending commands when we're decommssioning a disk. MFC after: 3 months
* Fix two (very common) occurrences of s/sytem/system in comments.bcr2010-08-022-2/+2
| | | | | Approved by: mav MFC after: 3 days
* Export PCI IDs of ATA/SATA controllers through CAM and ata(4) layers tomav2010-07-254-0/+16
| | | | | GEOM. This information needed for proper soft-RAID's on-disk metadata reading and writing.
* ATA device reset starts probe sequence from the beginning. If reset causedmav2010-07-061-4/+19
| | | | | | by timeout/error of one of probe commands, process may continue infinitely. Make CAM ATA more robust to faulty devices and false positive detections, abort probe after two restarts on timeouts or ten on other errors.
* Don't lock buses around a call to xptperiphlistmatch- the buses will bemjacob2010-06-291-2/+0
| | | | | | | locked at appropriate places. MFC after: 1 week X-MFC: 208752
* For the target port groups structures, don't allocate the initial element.ken2010-06-141-3/+4
| | | | | | | | This makes things easier for target implementations to calculate how many elements they need to allocate. Discussed with: mjacob, gibbs MFC after: 1 week
* Rearrange how things are done to avoid dereferencing stale pointers inmjacob2010-06-081-30/+32
| | | | | | | | | | the case of immediate unconfigure after configure. Hold the periph an extra count while we have the task to create sysctl context outstanding so that the periph doesn't go away unexpectedly. Sponsored by: Panasas Reviewed by: scsi@ MFC after: 1 month
* One byte off for scsi_target_group cdb.mjacob2010-06-081-1/+1
| | | | MFC after: 2 weeks
* Implement the usage of Report Luns as part of SCSI probing for SCP3 ormjacob2010-06-084-33/+380
| | | | | | | | | | | better devices. This can be disabled on a per-device basis using quirks as well. This also handles the case where there is actually no connected LUN 0 (which can definitely be the case for storage arrays). Reviewed by: scsi@ MFC after: 1 month
* Make additional definitions up to and including SPC-4. Add in definitionsmjacob2010-06-083-131/+276
| | | | | | | | | | for REPORT and SET TARGET PORT GROUP commands (foundations for future work). Regularize opcodes to be upper case hex. Pick *one* of tab or space after #define (tab) and stick with that. MFC after: 2 weeks
* redfacedly noting a missing part of a patch.mjacob2010-06-071-0/+1
| | | | | | Pointy Hat To: Me MFC after: 2 Week X-MFC: 208896
* Do a minor amount of stylifying. Also, get a Fibre Channel WWPN if one existsmjacob2010-06-071-2/+27
| | | | for a da unit and create a sysctl OID for it.
* Add allocation error hadling.mav2010-06-051-0/+7
| | | | | Found with: Coverity Prevent(tm) CID: 3897
* Fix double free on error.mav2010-06-051-4/+2
| | | | | Found with: Coverity Prevent(tm) CID: 4573
* scsi_cd: pass correct pointer to free()avg2010-06-041-1/+1
| | | | | | Found with: Coverity Prevent(tm) CID: 2986 MFC after: 4 days
* Protect periph drivers list and rearrange things to minimize the chance ofmjacob2010-06-022-27/+41
| | | | | | | | | | stepping oneself during probing. Don't blindly decrement a periph probe count. Reviewed by: scsi@ Obtained from: Alexander Motin, Atillio Rao, Others MFC after: 1 month
* Add a new primitive, XPT_SCAN_TGT, to cover the range between scanning amjacob2010-05-264-14/+53
| | | | | | | | | | | whole bus (XPT_SCAN_BUS) and a single lun on that bus (XPT_SCAN_LUN). It's less resource comsumptive than scanning a whole bus when the caller knows only one target has changes. Reviewed by: scsi@ Sponsored by: Panasas MFC after: 1 month
* Change ad_firmware_geom_adjust() to operate on a struct disk * only andmarius2010-05-201-1/+10
| | | | | | | | | hook it up to ada(4) also. While at it, rename *ad_firmware_geom_adjust() to *ata_disk_firmware_geom_adjust() etc now that these are no longer limited to ad(4). Reviewed by: mav MFC after: 3 days
* Remove unnecessary headers which were inherited from cam_xpt.c withoutmarius2010-05-202-8/+0
| | | | | | | reason. Reviewed by: mav MFC after: 3 days
* Pick up the right change, not it's close cousin. The onemjacob2010-05-111-2/+4
| | | | | | | | previously submitted was wrong. Point hat: mjacob X-MFC: 207933 MFC after: 1 week
* Deal sensibly with more than 26 sg devices. It isn't a completemjacob2010-05-111-1/+6
| | | | | | | solution. Sponsored by: Panasas MFC after: 1 week
* Make SATA XPT negotiate and enable some additional SATA features, such as:mav2010-05-023-3/+163
| | | | | | | - device initiated power management (some devices support only this way); - Automatic Partial to Slumber Transition (more power saving); - DMA auto-activation (expected to slightly improve performance). More features could be added later, when hardware supports.
* Add xpt_schedule_dev_sendq() call, lost at r203108. It is not needed inmav2010-05-021-0/+2
| | | | | | | usual operation, but required in some conditions to make queue running after being shrinked. MFC after: 3 days
* Revert r198705.mav2010-04-301-28/+1
| | | | | | | | | | | As scottl@ noticed, max_target/max_lun was intended to be only a hint for existing bus scanner. Some FC/SAS SIMs report fake values there, that are smaller then maximum supported IDs. In that case this check makes impossible manual scan outside hinted range. For ATA/SATA SIMs respective check was instead implemented at SIM level. Newer SCSI SIMs expected to have these checks at driver or firmware level. Some older SCSI SIMs have no this check and the issues will get back there.
* Report PMP absence using target 15, same as for precence (not a wildcard),mav2010-04-301-4/+6
| | | | to not confuse target ID checks at SIMs.
* Update device identify data and serial number when device change detected.mav2010-04-271-2/+6
| | | | Reprobe immediately following this should have fresh data.
* MFp4:mav2010-04-262-14/+19
| | | | Move PI_TAG_ABLE check from ada driver to ATA XPT.
* scsi_cd: CD_FLAG_VALID_MEDIA is sufficient to set d_sectorsize andavg2010-04-151-4/+5
| | | | | | | | | | | | | | | d_mediasize CD_FLAG_VALID_TOC is not required for setting those media properties. PR: kern/145385 Submitted by: Juergen Lock <nox@jelal.kn-bremen.de> a slightly different version Tested by: Pavel Sukhoy <sukhoy@ripn.net>, Markus Wild <m.wild@cybernet.ch>, Juergen Lock <nox@jelal.kn-bremen.de>, uqs MFC after: 1 week
* Nullify our periph pointer in dacleanup to try and catchmjacob2010-04-021-0/+5
| | | | race conditions in callbacks/downcalls.
* Add a couple missing basic mode page codes.mjacob2010-04-011-0/+2
| | | | MFC after: 1 week
* For unhandled actions in xpt_action_default, remember to callmjacob2010-03-311-2/+5
| | | | | | | | | | xpt_done for queued requests. This solves the problem of indefinite hangs for unspecified transports when XPT_SCAN_BUS is called. A few minor cosmetics elsewhere. MFC after: 1 week
* We actually can generate a host number.mjacob2010-03-171-1/+1
| | | | MFC after: 1 month
* Make PUIS detection more strict. Previous implementation caused falsemav2010-02-261-5/+4
| | | | positives on VMWare's virtual CD-ROMs.
* Fix newlines broken at r204220.mav2010-02-261-1/+1
|
* Make xpt_rescan() more correct, as it was before r197208: do not usemav2010-02-231-1/+2
| | | | XPT_SCAN_LUN for wildcard LUN, fall back to XPT_SCAN_BUS.
* Virtualize transport part of periph announcement.mav2010-02-224-150/+188
|
* Improve output for controllers that doesn't report SATA speed.mav2010-02-221-0/+2
|
* Make CD driver a bit more robust and predictable to unreported errors.mav2010-02-151-17/+13
|
* On probe error, if restart requested, skip any retries and recovery.mav2010-02-041-1/+2
| | | | Just restart probe from the beginning immediately.
* Disable kern.cam.power_down ATM. It doesn't work fine on some controllers.mav2010-02-031-1/+1
|
* MFp4:mav2010-02-032-2/+39
| | | | | | Add Power Up In Stand-by feature support. Device with PUIS enabled require explicit command to do initial spin-up. Mark that command with CAM_HIGH_POWER flag, to allow CAM manage staggered spin-up.
* MFp4:mav2010-02-031-2/+94
| | | | | | Make CAM to stop all attached devices on system shutdown. It allows devices to park heads, reducing stress on power loss. Add `kern.cam.power_down` tunable and sysctl to controll it.
* Change the way in which fake async events generated. Do not usemav2010-02-021-60/+24
| | | | taskqueue for lock decoupling, as it causes unwanted races.
* - Use separate buffer for identify data fetching. We can't use main buffermav2010-02-023-45/+19
| | | | | here if device already running, as data need to be formatted before use. - Remove some saved_ccb variables. They are unused now.
* Some missed parts for r203376.mav2010-02-021-2/+6
|
* - Give ATA/SATA SIMs info about ATAPI packet size, supported by device.mav2010-02-022-1/+39
| | | | | - Make ATA XPT to reject longer SCSI CDBs then supported by device, or any SCSI CDBs, if device doesn't support ATAPI.
OpenPOWER on IntegriCloud