| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
This also fixes two NULL ptr derefs in later code path.
OK patick@, krw@
|
|
|
|
|
|
|
|
| |
should ensure that we don't read a stale command ID and complete the
wrong scsi io. powerpc64 base builds were crashing like this fairly
regularly.
ok deraadt@ dlg@
|
|
|
|
|
| |
to scsi_copy_internal_data(). Thus getting xs->resid properly set and adding the
usual uio/size sanity checks.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
| |
responses. This is what the SCSI specifications say is the correct value and
already used in several cases.
|
| |
|
|
|
|
| |
initialize the 'version' field. Not numbers.
|
|
|
|
|
|
| |
struct scsi_rw_10.
ok gnezdo@ jmatthew@ (who also did sparc64 compile test)
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
adapter_buswidth, adapter_softc) from struct scsi_link to struct
scsibus_attach_args.
Additional compile tests by jmatthew@ (sparc64) and aoyam@ (luna88k).
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
somehow. Cleaning it out and config/compile from scratch and all seems
well.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
configured but have a size of 0.
Should eliminate the 31 bogus sd(4) devices reported by Janne
Johansson (occasionally known as jj@) on some Micron SSD's that passed
through his hands.
Doesn't break my nvme SSD's, nor jca@'s.
ok deraadt@
|
|
|
|
| |
immediately before initializing the only field in the struct.
|
|
|
|
| |
"Bump nvme(4) max physio() i/o size to 128K"
|
|
|
|
|
|
| |
The coverity-related diff breaks sparc64's ability to read the disk.
ok deraadt
|
| |
|
|
|
|
|
|
|
|
|
|
| |
12. PAGE_SHIFT is 12 (a.k.a. PAGE_SIZE == 4096) or more on OpenBSD
architectures. So remove some dead code by unconditionally setting
sc_mps (memory page size) to 1 << PAGE_SHIFT.
CID 1491655.
No functional change.
|
|
|
|
|
|
|
|
| |
different things in the NVMe world. Only the latter is currently
implemented in nvme(4) so rename sc_max_sgl to sc_max_prpl to reflect
this.
No functional change.
|
|
|
|
| |
No functional change.
|
|
|
|
|
|
|
|
|
| |
and ffs(16)-1 with the constant results (i.e. 6 and 4). Add comments
to clarify use of these constants. Net result, one less invocation of
ffs(), softc smaller by one u_int, and less potential confusion over
'mps'.
No functional change.
|
|
|
|
| |
Nuke the latter and use the former to get the same value.
|
| |
|
|
|
|
|
|
| |
work with nvme.
ok jmatthew
|
|
|
|
|
|
| |
'minphys()'. Just use & check for NULL instead, since 'minphys()' is
always called on the code path ([cd|sd|st]minphys) that calls
physio().
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
| |
from nvme(4) on sparc64 as the OBP device paths contain namespace identifiers
that we end up matching to targets when trying to find the device we booted
from. Also results in (slightly) cleaner code and less confusion as the
numbers now match instead of being off-by-one.
ok dlg@
|
|
|
|
| |
ok deraadt mpi
|
|
|
|
| |
ok dlg
|
|
|
|
| |
ok mikeb@
|
| |
|
|
|
|
|
|
|
|
| |
only active during hibernation, preallocating the the submission and completion
queues during attach as they need to be page-aligned.
tested on an x270 that successfully hibernates now.
ok dlg@
|
|
|
|
|
|
|
|
| |
NVM_ADMIN_DEL_IOCQ does not need prp1 (just as NVM_ADMIN_DEL_IOSQ).
Remove what is likely a cut'n'paste error from the *_ADD_* code.
tested by claudio@
ok jmatthew@
|
|
|
|
|
|
|
| |
Based on an initial patch by ehrhardt@ . Thanks to claudio@ for testing
and deraadt@ for advice.
"go ahead" deraadt@
|
|
|
|
|
|
|
|
|
|
| |
scsi layer, which will add one sector back
fixes incorrect disk size reporting which was causing fdisk to
create a protective MBR of one too many sectors, which caused our
EFI bootloader to fail to recognize it as a GPT disk
ok dlg
|
|
|
|
|
| |
Errors will result in nice clean panic messages so we know what's wrong.
Reviewed by dhill visa natano jsg.
|
|
|
|
|
|
|
|
| |
some (broken) controllers require ordered split transfers.
From linux a310acd7a7ea53533886c11bb7edd11ffd61a036
Tested by gonzalo@, ok dlg@
|
|
|
|
|
|
| |
Makes gonzalo@'s Macbookair7,1 NVMe report the correct version.
ok dlg@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
it seems devices using levelled intx interrupts need to explicitely ack
interrupts by masking and unmasking the source around the completion
ring handling. without this completions can be lost, which in turn
causes long (permanent?) stalls in the block layer under heavy write
load.
ive experienced this problem with an intel nvme part that only has
intx and msix support. because we dont support msix yet we only
use intx on it. it appeared to lock up before this fix.
this has been tested on both that intel board and a samsung with msi.
this fix was based on work found in code by nonaka
|
|
|
|
| |
found by NONAKA Kimihiro while he was porting nvme to netbsd.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this solves my memory corruption problem with a samsung sm951 in a
particular slot on a dell 2950.
hilariously, i had picked values which masked this problem on
sparc64. i randomly picked 128 as the number of entries on the
queues, and dmamem allocs get rounded up to PAGE_SIZE. on amd64 and
sparc64 this meant i was asking for 128 * 8 (sizeof pointer), or
1024 bytes, which got rounded up to 4096 and 8192 on each arch
respectively. 128 * 64 (the size of a submission queue entry) is
8192, so it worked fine on sparc64 for that reason, but randomly
blows up on amd64. the 2950 above allocated mbufs out of the page
after the submission queue, which i ended over overwriting.
anyway. let's move on.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
still a bit magical, but good enough for now.
|
|
|
|
| |
this should be enough to make io reliable
|
|
|
|
|
| |
we run with 2 entries for the nvme controller identify, and then bump it
up to cover the maxphys divided by the page size we negotiate.
|