summaryrefslogtreecommitdiffstats
path: root/sys/dev/pv (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Initialize var since it's used in a condition a little bit afterwards.mestre2021-02-111-2/+2
| | | | | | CID 1501713 ok jmatthew@
* Report full IP address information to the host. Contrary to what I wrotejmatthew2021-01-151-9/+300
| | | | | | here 10 years ago, xdr isn't scary at all. ok dlg@
* Make vm_rpc_send_rpci_tx_buf() use the buffer passed in, not the bufferjmatthew2021-01-131-2/+2
| | | | | | | allocated as part of the softc, though it's always been the same buffer so far. ok dlg@
* put M_ZERO in the right placejmatthew2021-01-131-2/+2
| | | | ok dlg@
* Rename the macro MCLGETI to MCLGETL and removes the dead parameter ifp.jan2020-12-123-5/+5
| | | | | | OK dlg@, bluhm@ No Opinion mpi@ Not against it claudio@
* hvn(4): msleep(9) -> msleep_nsec(9)cheloha2020-12-041-2/+2
| | | | | | | | | | | | | | In hvn_alloc_cmd() we may spin waiting for a free rndis_cmd. We check the list once per tick and block with msleep(9) if there aren't any free objects. In practice though we don't need to poll for a free rndis_cmd because our sleep is protected by a mutex, so we can't miss a wakeup(9). That is, it's safe to use msleep_nsec(9) here and not set a timeout (INFSLP). Tested by Andre Stoebe <as@nul.space> (Hyper-V on Windows 10). "LGTM" mikeb@, ok mpi@
* hvn(4), hyperv(4): more tsleep(9) -> tsleep_nsec(9) conversionscheloha2020-12-042-12/+24
| | | | | | | | | | Replace all tsleep(..., 1) calls in these drivers with tsleep_nsec(9) calls. In every case we can use the nearby delay(9) intervals as the timeout. Tested by Andre Stoebe <as@nul.space> (Hyper-V on Windows 10). "LGTM" mikeb@, ok mpi@
* Ensure resid is correctly set in the INQUIRY case.krw2020-10-151-0/+1
|
* Replace simple one-line bcopy()/memcpy() of faked data into scsi_xfer with callkrw2020-10-152-4/+5
| | | | | to scsi_copy_internal_data(). Thus getting xs->resid properly set and adding the usual uio/size sanity checks.
* Nuke commented out variable declaration.krw2020-10-151-2/+1
|
* Since dlg@'s 2009 scsi midlayer refactoring the 'struct scsi_generic *cmd'krw2020-09-224-23/+23
| | | | | | | | | | | | 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 '32' with SID_SCSI2_ALEN (a.k.a. 31) when building emulated INQUIRYkrw2020-09-052-4/+4
| | | | | responses. This is what the SCSI specifications say is the correct value and already used in several cases.
* Replace TAILQ concatenation loop with TAILQ_CONCATbket2020-09-041-5/+2
| | | | OK millert@, florian@
* Replace '.response_format = 2' with '.response_format = SID_SCSI2_RESPONSE'.krw2020-09-033-5/+5
|
* When building emulated INQUIRY results use the SCSI_REV_* #define's tokrw2020-09-021-2/+2
| | | | initialize the 'version' field. Not numbers.
* When building emulated INQUIRY results use the SCSI_REV_* #define's tokrw2020-09-021-2/+2
| | | | initialize the 'version' field. Not numbers.
* Rename [READ|WRITE]_BIG to [READ|WRITE]_10. Rename struct scsi_rw_big tokrw2020-09-012-16/+16
| | | | | | struct scsi_rw_10. ok gnezdo@ jmatthew@ (who also did sparc64 compile test)
* avoid a invalid pointer deref in hvn_stop()jsg2020-08-301-1/+1
| | | | | | | intr_barrier() now uses the argument so directly call sched_barrier(NULL) which is what intr_barrier() used to do until recently. problem reported by and fix tested by Andre Stoebe
* Declare hw_{prod,serial,uuid,vendor,ver} in <sys/systm.h>.visa2020-08-261-2/+1
| | | | OK deraadt@, mpi@
* Nuke unused struct scsi_link members of adapter softc's where thekrw2020-07-224-7/+3
| | | | driver successfully compiles on one or more of amd64, i386, hppa.
* Move remaining scsi bus initialization info from "prototype scsi link"krw2020-07-204-21/+23
| | | | | | | 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-194-22/+23
| | | | | | | 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-164-19/+19
| | | | | | | | 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.
* Garbage collect unused vioscsi_softc member "sc_scsibus".krw2020-07-111-3/+2
|
* Expunge some Captain Obvious comments, tweak whitespace a bit, move a debugkrw2020-07-113-6/+7
| | | | statement. All to make upcoming diff(s) smaller and easier to read.
* Shuffle a bit of code to stop using sc->sc_link to hold values forkrw2020-07-102-9/+11
| | | | | | | openings outside of the one used at config_found() time. Adapters should take care of their own data. ok dlg@ for a sligthly different vioblk.c version.
* Change users of IFQ_SET_MAXLEN() and IFQ_IS_EMPTY() to use the "new" API.patrick2020-07-103-6/+6
| | | | ok dlg@ tobhe@
* Add support for timeconting in userland.pirofti2020-07-062-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | This diff exposes parts of clock_gettime(2) and gettimeofday(2) to userland via libc eliberating processes from the need for a context switch everytime they want to count the passage of time. If a timecounter clock can be exposed to userland than it needs to set its tc_user member to a non-zero value. Tested with one or multiple counters per architecture. The timing data is shared through a pointer found in the new ELF auxiliary vector AUX_openbsd_timekeep containing timehands information that is frequently updated by the kernel. Timing differences between the last kernel update and the current time are adjusted in userland by the tc_get_timecount() function inside the MD usertc.c file. This permits a much more responsive environment, quite visible in browsers, office programs and gaming (apparently one is are able to fly in Minecraft now). Tested by robert@, sthen@, naddy@, kmos@, phessler@, and many others! OK from at least kettenis@, cheloha@, naddy@, sthen@
* avoid a NULL deref in xen_intr_barrier()jsg2020-06-291-7/+3
| | | | | | | | intr_barrier() now uses the argument so directly call sched_barrier(NULL) which is what intr_barrier(NULL) used to do until recently. From Todd Carson on bugs@ ok dlg@
* Nuke trailing whitespace.krw2020-06-271-2/+2
|
* No need to bzero()/memset() 'struct scsibus_attach_args' variableskrw2020-06-274-7/+3
| | | | immediately before initializing the only field in the struct.
* Replace TAILQ concatenation loop with TAILQ_CONCATbket2020-06-271-7/+2
| | | | | | As a result remove unneeded variable OK kn@, millert@
* kernel: use gettime(9)/getuptime(9) in lieu of time_second(9)/time_uptime(9)cheloha2020-06-242-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | time_second(9) and time_uptime(9) are widely used in the kernel to quickly get the system UTC or system uptime as a time_t. However, time_t is 64-bit everywhere, so it is not generally safe to use them on 32-bit platforms: you have a split-read problem if your hardware cannot perform atomic 64-bit reads. This patch replaces time_second(9) with gettime(9), a safer successor interface, throughout the kernel. Similarly, time_uptime(9) is replaced with getuptime(9). There is a performance cost on 32-bit platforms in exchange for eliminating the split-read problem: instead of two register reads you now have a lockless read loop to pull the values from the timehands. This is really not *too* bad in the grand scheme of things, but compared to what we were doing before it is several times slower. There is no performance cost on 64-bit (__LP64__) platforms. With input from visa@, dlg@, and tedu@. Several bugs squashed by visa@. ok kettenis@
* Use SDEV_NO_ADAPTER_TARGET instead of the value that is beingkrw2020-06-242-3/+3
| | | | | | | aassigned to adapter_buswidth to indicate the adapter is not a target on the bus. ok dlg@ as part of a larger diff.
* Use SDEV_NO_ADAPTER_TARGET instead of the value of adapter_buswidth tokrw2020-06-242-4/+4
| | | | | | indicate the adapter is not a target on the bus. ok dlg@ as part of a larger diff.
* Nuke some pointless *_dev_probe() and *_dev_free() functions andkrw2020-06-241-14/+5
| | | | | | | set/trust the scsiconf.c probing limits. Same as was done to vioblk(4). ok dlg@
* use ifiq_input and use it's return value to apply backpressure to rxrs.dlg2020-06-221-2/+4
| | | | this is a step toward deprecating softclock based livelock detection.
* Nuke pointless vioblk_dev_probe() and vioblk_dev_free() functions andkrw2020-06-211-21/+5
| | | | | | | tweak adapter_target and adapter_buswidth values to provide desired semantic of providing only target 0/lun 0 device per vioblk(4) device. Tested by sf@
* dev/rndvar.h no longer has statistical interfaces (removed during variousderaadt2020-05-297-16/+5
| | | | | | conversion steps). it only contains kernel prototypes for 4 interfaces, all of which legitimately belong in sys/systm.h, which are already included by all enqueue_randomness() users.
* Force a guest info update when we get a Capabilities_Register command.jmatthew2020-02-161-3/+11
| | | | | | | | ESXi doesn't carry the guest info over when a guest gets moved to a different host, and this appears to be the only hint the guest gets that this has happened. ok dlg@
* IPS_MAXFER, NAX_XFER, and MAXBSIZE are all definedkrw2020-02-142-12/+10
| | | | | | as (64 * 1024). Reduce confusion by using MAXPHYS (a.k.a. (64 * 1024)) as other drivers do.
* Resolve a few issues with interrupt handlingmikeb2020-02-131-2/+4
| | | | | | | | | Upon a failed task_add, the adjusted reference counter needs to be decremented. xen_intr_schedule should follow the same logic as xen_intr. Tested by Niklas Hallqvist. Ok mpi@
* Bring a few stragglers into line with the idiom used by the other 40+krw2020-02-123-20/+16
| | | | | | 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-054-7/+7
| | | | | | '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-263-5/+5
| | | | | | | | 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.
* cleanup unused headers generated by configjsg2020-01-242-5/+3
| | | | ok tedu@ krw@ deraadt@
* Use a consistant idiom/format when declaring scsi_adapter structureskrw2020-01-231-3/+2
| | | | | | | | | | | in drivers. Terse one liners, NULLs instead of 0's, explicitly specify all members, etc. Nuke #ifdef notyet blocks related to the scsi_adapter in aic. No intentional functional change. ok tedu@
* xbf(4): tsleep(9) -> tsleep_nsec(9); ok mikeb@cheloha2020-01-221-2/+2
|
* xenstore: *sleep(9) -> *sleep_nsec(9); ok mikeb@cheloha2020-01-111-7/+9
|