| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
driver successfully compiles on one or more of amd64, i386, hppa.
|
|
|
|
|
| |
sc->sc_link is preserved by the nefarious forces outside of the
adapter code.
|
|
|
|
|
|
| |
makes the ioctl and sensor paths more reliably now that they cant fail
due to a ccb allocation failure, and allows better sharing of resources
between multiple logical volumes and physical devices.
|
|
|
|
|
|
|
|
|
|
|
| |
protects the ccb runqueues and the mailbox with a single mutex.
the biggest change as a consequence of this is a rewrite of the polled
command code. it now forces the polled command onto the chip ahead of the
pending runqueue, and simply runs the interrupt handler until the ccb
completes.
tested by sthen@
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Fix set hotspare that didn't always work.
Fix several very subtle bugs because of firmware lies
Fix disk size that sometimes was incorrect
Only poke drives if something changed so it makes bio way faster on subsequent calls
Tested by several folks, thanks
Ok dlg
|
|
|
|
|
|
|
|
|
| |
completion routines to do anything useful with.
this stashes the commands status in the ccb for the ccb_done handlers to
use. the completion path for passthru commands now checks the mbox status
to see if the command actually works. this prevents phantom devices from
appearing on the passthru busses.
|
|
|
|
|
|
| |
of new fields in the future is less disruptive. This is done similar
to how struct proc is handled for ps(1). ok jmc (man page changes)
tested fkr simon, and more suggestions from millert
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
be done on the logical disks so ami_scsi_cmd can stash the name of the
device doing the io. we now walk the device tree after the logical disks
are attached and use the names of ami's child devices.
ok marco@
|
|
|
|
|
|
|
|
|
| |
is preallocated in the softc, even if the driver is only ever going to use
one of them when running. this allocates them separately during attach as a
first step toward having the driver only allocate as many ccbs as the
firmware can support.
ok krw@
|
|
|
|
|
| |
of TAILQ_TAIL when pulling ccbs off the free list since it does less
"interesting" things with pointers. changes prompted by lint bitching.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
from him since he did most of the hard work on it.
when marco added the sensor for logical disks he added some extra bits
to the softc, but inside an #if NBIO > 0 block. NBIO is set by "bio.h"
which was included in ami.c, but not in ami_pci.c which is what is
actually responsible for getting the softc allocated. because of this
the softc in the rest of the system was smaller than what ami.c needed,
so technically it was using unallocated memory. in krws case that
unallocated space was filled with garbage, hence his panic.
the moral of this story is do NOT put #if inside structs that are passed
between different source files. its too easy to have this kind of screwup
happen.
|
|
|
|
|
|
|
| |
monitor disks on ami.
Ex.: hw.sensors.0=sd2, logical disk, WARNING, drive, degraded
Requested deraadt@ ok dlg@
|
|
|
|
| |
return void instead.
|
|
|
|
|
|
|
|
|
|
| |
with the ccb queues rather than over the whole ioctl.
also get rid of the CMD_WAIT flag which is used to restrict the ioctl to
only one caller at a time. this is actually protecting from overuse of
ccbs for management tasks (like bioctl) by making sure the scsi paths
will always have their ccbs. replace the flag with a real lock so that
callers can sleep till the mgmt ccb is free, rather than returning EBUSY
|
|
|
|
|
| |
the ioctl paths can wake up, check the state of the ccb instead. when the
ccb becomes READY again then the command has completed.
|
|
|
|
|
|
| |
now that each code path that puts commands on the hardware has specific
completion routines, we dont have to deal with the memory magic in a
generic fashion.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
commands to the hardware and completing them.
previously the driver was very engineered toward moving io from the
logical disks scsi commands onto the hardware and off. as we built extra
functionality into the driver, this path grew more and more hairy as bits
were tacked on to cope.
this strips it back to dealing with getting the command onto the hardware
and off again. each path that submits commands now has to do all its work
before submitting the ccb, and supply a function for completing the ccb.
both the async and polled paths call the completion routines for commands
now. async commands that fail to get onto the hardware first go are stuck
on a queue and retried out of a timeout. previously this was only done for
scsi commands, now all paths take advantage of it.
|
|
|
|
|
|
|
| |
that sets the command up to say how its should be completed. this means
we dont have to complicate a generic handler to cope with all the different
setup paths. however, at the moment we're using the generic complicated
one :)
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
when you're using the bus dma api like we are, there are two
bus_dma_segment_t's involved, one for the pa stuff and one for the dva
stuff. we set this up ok in ami_allocmem, but then we forget half of it
when we return from that function. even worse, we assume theyre the same
thing in ami_freemem.
this diff fixes that by wrapping all the dma bits into a struct (called
struct ami_mem) and providing a few macros for accessing the useful parts
of it. we just pass this struct around now instead of having to handle all
the busdma bits in every function.
ok marco@ jason@ krw@
|
|
|
|
| |
krw@ removed all seg references and cleaned up htole32 a bit.
|
|
|
|
|
|
| |
spl calls rather than ami's macro wrappers for them.
ok krw@ marco@
|
|
|
|
|
|
|
|
| |
and the scatter gather lists with a single allocation containing both.
more importantly, actually sync the appropriate parts of this allocation
when giving the commands to or taking the response from the device.
tested by and ok krw@
|
| |
|
|
|
|
| |
mbox, no dma was ever performed on them. store them in the ccb instead.
|
| |
|
|
|
|
|
|
|
|
| |
instead use generic variables in the ccb so commands not originating from
the scsi layer can be handled by ami_done as well.
this version does not freeze like 1.82. the secret seems to be to go
ami_put_ccb before scsi_done.
|
|
|
|
| |
causing random lockups on my machine. sigh.
|
|
|
|
|
|
| |
buffer or not. this will allow us to issue arbitrary passthrough commands
without needing them to come in via ami_scsi_raw_cmd. useful for management
functionality...
|
|
|
|
| |
the passthrough bus when bounce buffers were used.
|
| |
|
|
|
|
| |
tested and ok krw@
|
|
|
|
|
|
|
| |
fake a geometry. Page 4 info does not get used for size information.
Eliminate now unused union scsi_disk_pages.
ok marco@ mickey@ pre-lock.
|
|
|
|
|
| |
feel free to commit, krw@
ok deraadt@
|
|
|
|
|
|
| |
of the system.
tested and ok krw@, dlg@, deraadt@
|
|
|
|
|
|
|
|
|
|
| |
allocmem and freemem functions. freemem now unmaps dma memory from the
kernel address space instead of leaking it.
lots of tweaks and input from marco (who also found the bug in the first
place). lots of testing by krw and marco.
ok krw@ marco@ permitted by deraadt@
|
|
|
|
|
|
| |
Add flag to determine controller type.
ok deraadt@
|
| |
|
|
|
|
| |
ok and help deraadt@
|
|
|
|
|
|
|
| |
to expose ses(4) and safte(4) information.
ok beck@, dlg@
put your ami pt diff in, deraadt@
|
|
|
|
|
| |
tested and ok dlg@ beck@
get it in @deraadt
|
| |
|
|
|
|
|
|
|
|
| |
ami(4) and bio(4).
Note that this will break trees where userland and kernel are not in sync.
ok dlg@
|
|
|
|
|
|
| |
Conditional jump to ami_ioctl() if NBIO > 0 is defined.
ok deraadt@ mickey@
|