History log of /freebsd-10.1-release/sys/dev/ips/
Revision Date Author Comments
272461 03-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


254263 12-Aug-2013 scottl

Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCI
command register. The lazy BAR allocation code in FreeBSD sometimes
disables this bit when it detects a range conflict, and will re-enable
it on demand when a driver allocates the BAR. Thus, the bit is no longer
a reliable indication of capability, and should not be checked. This
results in the elimination of a lot of code from drivers, and also gives
the opportunity to simplify a lot of drivers to use a helper API to set
the busmaster enable bit.

This changes fixes some recent reports of disk controllers and their
associated drives/enclosures disappearing during boot.

Submitted by: jhb
Reviewed by: jfv, marius, achadd, achim
MFC after: 1 day


249595 17-Apr-2013 hiren

Improving r249461 by providing a better way to handle the clang warning.

PR: kern/177164
Reviewed by: jhb
Approved by: sbruno (mentor)


249461 14-Apr-2013 hiren

Fixing a clang warning indicating uninitialized variable usage.

PR: kern/177164
Approved by: sbruno (mentor)


232854 12-Mar-2012 scottl

Convert a number of drivers to obtaining their parent DMA tag from their
PCI device attachment.


200620 17-Dec-2009 mjacob

Fix argument order in a call to mtx_init.

MFC after: 1 week


198329 21-Oct-2009 brueffer

Check pointer for NULL before dereferencing it, not after.

PR: 138384
Submitted by: Patroklos Argyroudis <argp@census-labs.com>
MFC after: 1 week


196403 20-Aug-2009 jhb

Temporarily revert the new-bus locking for 8.0 release. It will be
reintroduced after HEAD is reopened for commits by re@.

Approved by: re (kib), attilio


196037 02-Aug-2009 attilio

Make the newbus subsystem Giant free by adding the new newbus sxlock.
The newbus lock is responsible for protecting newbus internIal structures,
device states and devclass flags. It is necessary to hold it when all
such datas are accessed. For the other operations, softc locking should
ensure enough protection to avoid races.

Newbus lock is automatically held when virtual operations on the device
and bus are invoked when loading the driver or when the suspend/resume
take place. For other 'spourious' operations trying to access/modify
the newbus topology, newbus lock needs to be automatically acquired and
dropped.

For the moment Giant is also acquired in some key point (modules subsystem)
in order to avoid problems before the 8.0 release as module handlers could
make assumptions about it. This Giant locking should go just after
the release happens.

Please keep in mind that the public interface can be expanded in order
to provide more support, if there are really necessities at some point
and also some bugs could arise as long as the patch needs a bit of
further testing.

Bump __FreeBSD_version in order to reflect the newbus lock introduction.

Reviewed by: ed, hps, jhb, imp, mav, scottl
No answer by: ariff, thompsa, yongari
Tested by: pho,
G. Trematerra <giovanni dot trematerra at gmail dot com>,
Brandon Gooch <jamesbrandongooch at gmail dot com>
Sponsored by: Yahoo! Incorporated
Approved by: re (ksmith)


166901 23-Feb-2007 piso

o break newbus api: add a new argument of type driver_filter_t to
bus_setup_intr()

o add an int return code to all fast handlers

o retire INTR_FAST/IH_FAST

For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current

Reviewed by: many
Approved by: re@


163024 05-Oct-2006 maxim

o Add Adaptec ServeRAID 7x IDs. IDs taken from Linux.

PR: kern/90012
Submitted by: Andrey V. Elsukov
MFC after: 1 month


161425 17-Aug-2006 imp

while (0); -> while (0) in multi-line macros


158651 16-May-2006 phk

Since DELAY() was moved, most <machine/clock.h> #includes have been
unnecessary.


154006 03-Jan-2006 scottl

Shuffle some definitions so that this can be included from userland.


154005 03-Jan-2006 scottl

Add some more data structures and definitions for communicating with the
ServeRAID firmware.


152919 29-Nov-2005 scottl

Separate the hardware definitions into ipsreg.h so they can be used by
future userland tools.


150611 27-Sep-2005 glebius

Fix build.


150602 27-Sep-2005 scottl

Report status in hex, not decimal.


150535 25-Sep-2005 scottl

Overhaul error handling in the IPS driver. Don't use a magic value for
driver-induced errors, instead be better about propagating error status
upwards. Add more error definitions, courtesy of the linux driver. Fix
a command leak in the ioctl handler. Re-arrange some of the command handlers
to localize error handling.

MFC After: 3 days


146734 29-May-2005 nyan

Remove bus_{mem,p}io.h and related code for a micro-optimization on i386
and amd64. The optimization is a trivial on recent machines.

Reviewed by: -arch (imp, marcel, dfr)


145545 26-Apr-2005 scottl

Remove an extra mutex unlock in the morpheus interrupt handler.

PR: 80246
Submitted by: Dean Strik
MFC After: 3 days


143160 05-Mar-2005 imp

Use BUS_PROBE_DEFAULT for pci probe return value


141062 30-Jan-2005 scottl

Add crashdump support to the ips driver. It only works for the more modern
ServeRAID 4 - 7 models right now. Support for older cards is possible, but
I don't have any hardware to experiment with.

Thanks to Jack Hammer at Adaptec for providing debugging hints.

Sponsored by: ImproWare AG, Switzerland


140924 28-Jan-2005 scottl

Remove all of the spl() markers.


140923 28-Jan-2005 scottl

Lock the IPS driver and bring it out from under Giant. Also do some
significant clean up and optimizations:
- don't call bioq_disksort() on every command, the hardware will do that for
us.
- remove all of the complicated bio deferral code. bio's that can't be
serviced immediately can just wait on the bioq.
- Only reserve one command object for doing control commands to the card.
This simplifies a lot of code and significantly reduces the size of the
command struct.
- Allocate commands out of a slab instead of embedding them into the softc.
- Call the command action method directly instead of having ips_get_free_cmd()
call it indirectly.

MFC After: 1 week


130585 16-Jun-2004 phk

Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.


130481 14-Jun-2004 jdp

Change the return value of sema_timedwait() so it returns 0 on
success and a proper errno value on failure. This makes it
consistent with cv_timedwait(), and paves the way for the
introduction of functions such as sema_timedwait_sig() which can
fail in multiple ways.

Bump __FreeBSD_version and add a note to UPDATING.

Approved by: scottl (ips driver), arch


129879 30-May-2004 phk

Add missing <sys/module.h> includes


129859 30-May-2004 scottl

Use a unique malloc type rather than M_DEVBUF.


127487 27-Mar-2004 scottl

Fix typo in the device id for the new cards.


127205 19-Mar-2004 scottl

Add generic support for the recent Adaptec flavors of ServeRAID.


127135 17-Mar-2004 njl

Convert callers to the new bus_alloc_resource_any(9) API.

Submitted by: Mark Santcroos <marks@ripe.net>
Reviewed by: imp, dfr, bde


126364 28-Feb-2004 scottl

Switch from using mutexes to using semaphores to protect against early
completion of synchronous commands. Also switch to a per-array bioq as it
appears to improve performance.

Submitted by: mbr, imp.ch (bioq change)


126080 21-Feb-2004 phk

Device megapatch 4/6:

Introduce d_version field in struct cdevsw, this must always be
initialized to D_VERSION.

Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing
four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.


125975 18-Feb-2004 phk

Change the disk(9) API in order to make device removal more robust.

Previously the "struct disk" were owned by the device driver and this
gave us problems when the device disappared and the users of that device
were not immediately disappearing.

Now the struct disk is allocate with a new call, disk_alloc() and owned
by geom_disk and just abandonned by the device driver when disk_create()
is called.

Unfortunately, this results in a ton of "s/\./->/" changes to device
drivers.

Since I'm doing the sweep anyway, a couple of other API improvements
have been carried out at the same time:

The Giant awareness flag has been flipped from DISKFLAG_NOGIANT to
DISKFLAG_NEEDSGIANT

A version number have been added to disk_create() so that we can detect,
report and ignore binary drivers with old ABI in the future.

Manual page update to follow shortly.


125833 14-Feb-2004 scottl

Remove the static major assignment for ips(4).

Submitted by: phk, inspired by others.


125808 14-Feb-2004 phk

Use same style for cdevsw as the rest of our drivers.


124680 18-Jan-2004 ru

Fixed a memory leak.

Reported by: Stanford Metacompilation research group
Reviewed by: scottl


124040 01-Jan-2004 mbr

The reset_type should not be 0x80, it should be set to zero.
0x80 can cause the command to be rejected as invalid. This bug
exists also in the Linux IPS ffdc code.

Submitted by: David Jeffery
MFC after: 1 week


122999 27-Nov-2003 mbr

ServeRaid (at least 5i) didn't initialize correctly. To get
them working (cache, automatic rebuild and hotswap) the FFDC
info (First Failure Data Capture) on the adapter must be
initialised.

Logical drives in critical/degraded states weren't added to
the drive list. FreeBSD was not able to see a degraded array
after a reboot. Degraded drives are now also added to the drivelist
and the state of the logical drive is given at boottime.

The adapter type is detected from informations in nvram page 5
and displayed at boottime.

Change IPS_OS_FREEBSD definition from 10 to 8 according to IBM
specs.

Submitted by: <Patrick Guelat> pgfb@imp.ch
Reviewed by: mbr, scottl
Approved by: re


121211 18-Oct-2003 phk

Eliminate reporting of bio_blkno.


120329 22-Sep-2003 njl

Add an off_t cast to prevent overflow on media size. This should
fix issues with geometry not matching drive size.

Submitted by: Clive Lin <clive@tongi.org>


119997 11-Sep-2003 ps

Delay most of the adapter initilization until after interrupts are
enabled.

Tested by: Richard Puga <puga@mauibuilt.com>


119690 02-Sep-2003 jhb

Use PCIR_BAR(x) instead of PCIR_MAPS.

Glanced over by: imp, gibbs
Tested by: i386 LINT


119418 24-Aug-2003 obrien

Use __FBSDID().
Also some minor style cleanups.


119280 22-Aug-2003 imp

Prefer new location of pci include files (which have only been in the
tree for two or more years now), except in a few places where there's
code to be compatible with older versions of FreeBSD.


117167 02-Jul-2003 jhb

- Use the new resource_disabled() helper function to see if devices are
disabled.
- Change the apm driver to match the acpi driver's behavior by checking to
see if the device is disabled in the identify routine instead of in the
probe routine. This way if the device is disabled it is never created.

Note that a few places (ips(4), Alpha SMP) used "disable" instead of
"disabled" for their hint names, and these hints must be changed to
"disabled". If this is a big problem, resource_disabled() can always be
changed to honor both names.


117126 01-Jul-2003 scottl

Mega busdma API commit.

Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg.
Lockfunc allows a driver to provide a function for managing its locking
semantics while using busdma. At the moment, this is used for the
asynchronous busdma_swi and callback mechanism. Two lockfunc implementations
are provided: busdma_lock_mutex() performs standard mutex operations on the
mutex that is specified from lockfuncarg. dftl_lock() is a panic
implementation and is defaulted to when NULL, NULL are passed to
bus_dma_tag_create(). The only time that NULL, NULL should ever be used is
when the driver ensures that bus_dmamap_load() will not be deferred.
Drivers that do not provide their own locking can pass
busdma_lock_mutex,&Giant args in order to preserve the former behaviour.

sparc64 and powerpc do not provide real busdma_swi functions, so this is
largely a noop on those platforms. The busdma_swi on is64 is not properly
locked yet, so warnings will be emitted on this platform when busdma
callback deferrals happen.

If anyone gets panics or warnings from dflt_lock() being called, please
let me know right away.

Reviewed by: tmm, gibbs


116931 27-Jun-2003 peter

Fix pointer/int warnings so this compiles on amd64. The driver wants
to store an int in the bio->bio_driver1 (a void *). It is big enough,
but you have to match the int sizes first before doing the cast.

Glanced at by: scottl


116852 26-Jun-2003 scottl

- Zero the buffers used to hold configuration data from the card. Not doing
so can leave stale data in the buffer and confuse the driver.
- enable the ability to set the 'disable' hint for the driver to keep it
from attaching. i.e. 'hw.ips.0.disable=1' will prevent the driver from
attaching.
- Only detach if attach suceeded.

Submitted by: mjacob


115554 31-May-2003 phk

Fix indentation

Found by: FlexeLint


114902 11-May-2003 scottl

Add the 'ips' driver for the IBM (now Adaptec) ServeRAID controller
series. This driver was generously developed and released by David
Jeffreys and Adaptec. I've updated it to work with 5.x and fixed a
few bugs.

MFC After: 1 week