Age | Commit message (Collapse) | Author |
|
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@
|
|
struct scsi_rw_10.
ok gnezdo@ jmatthew@ (who also did sparc64 compile test)
|
|
driver successfully compiles on one or more of amd64, i386, hppa.
|
|
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.
|
|
&sc->sc_dev to get a device pointer rather than using the void *
whence we obtained 'sc'.
|
|
(scsi_link.adapter_softc) to a pointer of a particular softc type.
|
|
statement. All to make upcoming diff(s) smaller and easier to read.
|
|
|
|
immediately before initializing the only field in the struct.
|
|
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@
|
|
aassigned to adapter_buswidth to indicate the adapter is not a target
on the bus.
ok dlg@ as part of a larger diff.
|
|
the adapter is not a target on the bus.
ok dlg@ as part of a larger diff.
|
|
does nothing at all.
The first one spotted as CID 1452976.
Reads good to millert@
ok mpi@
|
|
'minphys()'. Just use & check for NULL instead, since 'minphys()' is
always called on the code path ([cd|sd|st]minphys) that calls
physio().
|
|
ok dlg@
|
|
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@
|
|
ok kn@
|
|
this was mistakenly committed as part of the powerdown hook stuff,
and caused "older" chips like SAS2208s to get stuck in biowait.
reported by Mischa <obsdml at high5 dot nl> and hrvoje popovski
discussed with jmatthew@ and alex wilson.
fix tested by me on a SAS3508 and SAS2208
|
|
this has been in snaps for the last week without issue, and has
been running in production on a bunch of my boxes for a week before
that, also without issue.
|
|
|
|
ok dlg@
|
|
different fields. Use the background init progress when that's the active
task.
lack of progress data noticed by deraadt@
tested on SAS2208 and SAS3508
ok dlg@
|
|
ok dlg@ deraadt@ kettenis@
|
|
SAS3 and newer controllers allow these operations at any time
through the server management interface - tested on a SAS3108
(Lenovo x3650 M5) and SAS3508 (Dell R6415).
ok dlg@
|
|
disk list, rather than assuming target numbers match the position in the
list. Now we always allocate enough sensors for the maximum number of
logical disks, so we can store sensor information indexed by target number.
While here, split up the logical disk sensor code simplify adding and
removing sensors for logical disks as they're created and destroyed.
ok dlg@
|
|
No real change because we'll never run out of ccbs that early.
Noticed during review of the preceding changes.
ok dlg@
|
|
work was done by Naoki Fukaumi, some tweaks and adjustment to match the
preceding changes by me. Tested on SAS2208, SAS3008, SAS3108, SAS3508.
ok dlg@
|
|
case. Based on a diff from Naoki Fukaumi. We decided to keep using scsi
flags rather than switching to MFII_DATA_IN/OUT (as done in mfi(4)) so
callers can include SCSI_NOSLEEP if required.
ok dlg@
|
|
debug output to use them.
ok dlg@
|
|
Investigation by Naoki Fukaumi determined that this is
necessary on some controllers and works on all of them.
Tested on SAS2208, SAS3008, SAS3108, SAS3508.
ok dlg@
|
|
The maximum number of commands may be specified in outbound scratch register
3, should be limited to 1024, and should further be reduced by one to ensure
the reply queue doesn't overflow.
The maximum number of sges in a command should be the highest power of two
that fits in the space available in the io frame and in a chained sge frame.
The maximum size of a chained frame is specified in outbound scratch
register 2.
part of a diff from Naoki Fukaumi
ok dlg@
|
|
part of a diff from Naoki Fukaumi
ok dlg@
|
|
commands later.
part of a diff from Naoki Fukaumi
ok dlg@
|
|
in passthrough IO requests, which makes AEN processing work on SAS2208
controllers, and since AEN processing works now, enable it again.
tested on SAS2208 (PERC H710P) and SAS3108 (PERC H730), SAS3.5 parts
should work too.
ok dlg@
|
|
should resolve mapping error on SAS3508 encountered by claudio@
ok jmatthew@
|
|
Lenovo ThinkSystem RAID 530/930. The main differences are in fast path
IO, which we don't use, so all we have to deal with is some changes in the
raid context layout and different PCI BARs. The mfii_iop structure gets
rearranged a bit to accommodate these.
tested on a perc h740p and a h730 (by dlg@)
ok dlg@
|
|
|
|
Errors will result in nice clean panic messages so we know what's wrong.
Reviewed by dhill visa natano jsg.
|
|
on some or all original mfii boards (2208) the aen path fires repeatedly
without reporting anything, causes enough load to start actual io.
found by naddy@
|
|
basically use htolem64 to set the address and htolem32 for the
length, not the other way round. lucky this is mostly run on x86.
found by Jon Kloske
|
|
more specificially we probe the disk if it goes from UNCONFIGURED_GOOD
to a SYSTEM disk, and detach it if goes from being a SYSTEM disk
to anything else.
this semantic comes from the lsi^Wavago code in the illumos mr_sas
driver. seems to work fine.
i think this covers all the ways a passthru disk can transition on
these boards.
|
|
|
|
this only handles MFI_EVT_PD_INSERTED_EXT and MFI_EVT_PD_REMOVED_EXT so
far. if this code is to be reused in mfi, it should probably change to
use MFI_EVT_PD_INSERTED and MFI_EVT_PD_REMOVED instead.
unlike mpii and mpi, it looks like the firmware aborts outstanding
commands against a disk when it's physically removed, so we dont
have to explicitly abort them. this is probably a carry over from
mfi generation boards which dont have an explicit abort command
they can use.
|
|
this submits MR_DCMD_CTRL_EVENT_WAIT commands via the async dcmd
path to read all events from boot onward, and eventually ends up
waiting after the boot messages are consumed.
right now none of the events are handled, but this can be added now
this framework is in place.
the board does generate human readable log messages for every event.
we can send them somewhere (dmesg or syslog for example), but for
now theyre masked by #if 0.
|
|
async dcmds are submitted via an mpii request (like the scsi commands
are) which uses the ccb_request buffer, meaning that the dcmd itself
has to go somewhere else. this reuses the sense buffer on the ccb
for the dcmd, and provides wrappers for accessing that space and
submitting a dcmd via the passthru command.
|
|
|
|
there's a struct timeout in scsi_xfer for this purpose, which is
used to schedule a timeout of the command in the future. the timeout
adds the xs to a list in mfii_softc of outstanding commands that
are to be aborted. this list is processed in a task so we can sleep
for an mfii_ccb. the new ccb is used to issue an abort against the
specific command that timed out.
to avoid having a timeout complete at the same time as a command
on the chip, a refcnt is added to ccbs. the chip and the timeout
get a ref each. the mfii completion path will attempt to timeout_del,
and if that's succesful it will subtract the timeouts ref as well
as its own. if it fails, the abort path owns the ccb and becomes
responsible for calling scsi_done on behalf of the mfii completion
path.
|
|
|