summaryrefslogtreecommitdiffstats
path: root/sys/dev/pv/hvs.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Ensure resid is correctly set in the INQUIRY case.krw2020-10-151-0/+1
|
* Since dlg@'s 2009 scsi midlayer refactoring the 'struct scsi_generic *cmd'krw2020-09-221-3/+3
| | | | | | | | | | | | member of 'struct scsi_xfer' has always been pointed at the 'struct scsi_generic cmdstore' member of the same instance. So nuke 'cmdstore' and remove the '*' from cmd. Take the address of cmd as required by the various casts. No intentional functional change. luna88k test by aoyama@, sparc64 test by jmatthew@ Identification of 2009's last *cmd use and ok jmatthew@
* Rename SID_INQUIRY_HDR (a.k.a. 5) to more explicit SID_SCSI2_HDRLEN and use itkrw2020-09-051-2/+3
| | | | | | | | to replace various uses of '5' when calculating the amount of data in the INQUIRY response. Matches up more naturally with SID_SCSI2_ALEN. Also use to fix SCSIDEBUG display of INQUIRY responses to show correct count of bytes received/available.
* Replace '.response_format = 2' with '.response_format = SID_SCSI2_RESPONSE'.krw2020-09-031-1/+1
|
* Nuke unused struct scsi_link members of adapter softc's where thekrw2020-07-221-1/+0
| | | | driver successfully compiles on one or more of amd64, i386, hppa.
* Move remaining scsi bus initialization info from "prototype scsi link"krw2020-07-201-4/+4
| | | | | | | fields to struct scsibus_attach_args. Nuke the struct scsi_link * (saa_sc_link) in scaibus_attach_args. Explicitly initialize each field in scsibus_attach_args variables.
* Move the adapter related items (luns, adapter, adapter_target,krw2020-07-191-5/+5
| | | | | | | adapter_buswidth, adapter_softc) from struct scsi_link to struct scsibus_attach_args. Additional compile tests by jmatthew@ (sparc64) and aoyam@ (luna88k).
* Access adapter softc via link->bus->sb_adapter_softc.krw2020-07-161-3/+3
| | | | | | | | In sparc64 autoconf access 'luns' via sb_luns and 'adapter_buswidth' via sb_adapter_buswidth. Removes last post-config uses of the copies of bus related information in scsi_link.
* Expunge some Captain Obvious comments, tweak whitespace a bit, move a debugkrw2020-07-111-0/+1
| | | | statement. All to make upcoming diff(s) smaller and easier to read.
* No need to bzero()/memset() 'struct scsibus_attach_args' variableskrw2020-06-271-1/+0
| | | | immediately before initializing the only field in the struct.
* Use SDEV_NO_ADAPTER_TARGET instead of the value that is beingkrw2020-06-241-1/+1
| | | | | | | aassigned to adapter_buswidth to indicate the adapter is not a target on the bus. ok dlg@ as part of a larger diff.
* Bring a few stragglers into line with the idiom used by the other 40+krw2020-02-121-5/+5
| | | | | | scsi drivers. i.e. eliminate the struct scsi_adapter member in the softc and rely on the pointer to a static scsi_adapter in the struct scsi_link member.
* Nuke unnecessary abstraction 'scsi_minphys()' which just callskrw2020-02-051-1/+1
| | | | | | 'minphys()'. Just use & check for NULL instead, since 'minphys()' is always called on the code path ([cd|sd|st]minphys) that calls physio().
* Shuffle some names around to make reading the code less headachekrw2020-01-261-1/+1
| | | | | | | | inducing. Rename scsi_adapter member 'scsi_minphys' to 'dev_minphys' to reflect what it is supposed to do. Use consistent naming convention (<dev>_minphys) for the actual device functions. No functional change.
* Adopt the SCSI versioning #define's from FreeBSD. Eliminate thekrw2019-09-011-3/+3
| | | | | | | | | | | now unneeded version_to_spc() mapping array, a duplicate #define and a couple of magic numbers. Toss in some comments for future generations of spelunkers. Makes it possible to check for specific SPC versions when new features or eliminated features require such a check. No intentional functional change.
* Don't use misleadingly named SCSISPC() which returns SCSI version notkrw2019-08-301-1/+1
| | | | | | SPC version. Use raw data in version field to check the SPC level until SCSISPC() is straightened out. Actually a bit clearer to read as the raw data is what is manipulated in adjacent code.
* Correct the upper bound for the command size before the passthroughmikeb2017-08-101-1/+1
| | | | Coverity CID 1453317; Severity: unlikely, not user-visible.
* Buffer size for the SCSI vendor string should be 8 char longmikeb2017-08-101-1/+1
| | | | | | | | A vendor and part of the product string got copied into a larger on-stack buffer as a result of an out-of-bounds access, however only 4 characters are meaningful in this context. Coverity CID 1453206; Severity: insignificant.
* Add a comment explaining why pciide(4) must skip attaching disksmikeb2017-07-131-1/+7
| | | | Requested by kettenis@.
* Prefer paravirtualized interface for IDE disks as wellmikeb2017-07-121-1/+5
|
* Avoid testing an uninitialised variable in the SCSI_BUSY/SCSI_QUEUE_FULLjsg2017-06-271-1/+1
| | | | | | paths of hvs_scsi_cmd_done(). ok mikeb@
* Minor cleanup; when polling delay before calling the interrupt handlermikeb2017-06-261-7/+12
|
* Request deferred interrupt processingmikeb2017-06-231-0/+5
|
* Don't confuse SCSI command status and transfer error code.mikeb2017-06-211-23/+33
| | | | While here, make SCSI command completion routine more robust.
* Include the request id in the I/O debug outputmikeb2017-06-211-4/+4
|
* Provide storage for the response message in each CCBmikeb2017-06-151-36/+26
|
* Remove the structure definition for an old (pre Win8) I/O request typemikeb2017-06-151-20/+13
| | | | | since the new one is backwards compatible and the correct length of the request can be specified w/o an actual definition.
* Put back copying of the response message into the polling callbackmikeb2017-06-151-8/+14
| | | | | | | | | | The response message is allocated on the stack of hvs_intr and its content is valid during a single message processing loop iteration. Due to the fact that polled transfers finish completion in a callee context, the cached pointer to the response message becomes stale very quickly. To avoid this situation the poll completion callback needs to make sure the content of the response is provided to the next completion routine.
* Correct the number of targets vs number of LUNsmikeb2017-06-151-11/+10
| | | | | | | | | | jsg@ has found out that the number of targets wasn't correct and it turns out that the device supports up to 2 targets and 1 or 64 LUNs depending on whether it's taking over an IDE device or is a virtual SCSI. While here make sure the command response is copied back only for synchronous commands that are issued during initialization phase.
* Borrow some of dlg's smarts to make this look like a real SCSI drivermikeb2017-06-141-113/+155
|
* Special handling for request 0 clashes with CCB 0mikeb2017-06-141-24/+19
|
* Increase the maximum amount of requests and do some cleanupmikeb2017-06-141-103/+8
|
* Hyper-V storage drivermikeb2017-06-141-0/+988
Based on the FreeBSD driver, attaches only to emulated SCSI controllers.