Commit Graph

66 Commits

Author SHA1 Message Date
peter
1854dd9526 ciss's interrupt handler was missing the INTR_ENTROPY flag. 2004-08-16 23:13:16 +00:00
ps
22e87a5706 Clean up structure packing. 2004-07-29 08:06:22 +00:00
kan
a3645bf759 Make __packed attribute apply to structs themselves, not their typedefs.
GCC 3.4.2 issues warning about that.
2004-07-28 06:19:25 +00:00
ps
74882d8d67 Name non-physical devices. 2004-07-28 06:18:05 +00:00
ps
cb2dee06e6 Reset the update flag when scanning for new devices. 2004-06-22 23:05:06 +00:00
ps
11d435f5d0 Use the maximum physical bus when rescanning those targets. This
fixes a panic on cards which do not have any drives attached.
2004-06-22 17:39:57 +00:00
ps
8bb40a1552 on media exchange, update/rescan the drives. This allows a volume
in a failed stated to come back on-line without a reboot.
2004-06-21 22:57:10 +00:00
ps
dece2e61b6 There is no need to call ciss_media_accept async anymore since all
notify events are handled in a kthread.
2004-06-21 21:56:57 +00:00
scottl
b1dffe81e2 Add SCSI passthrough support to CISS. This allows devices like tape drives
that are on a CISS bus to be exported up to CAM and made available as normal
devices.  This will typically add one or two buses to CAM, which will be
numbered starting at 32 to allow room for CISS proxy buses.  Also, the CISS
firmware usually hides disk devices, but these can also be exposed as 'pass'
devices if you set the hw.ciss.expose_hidden_physical tunable.

Sponsored by:	Tape Laboratories, Inc.
MFC After: 3 days
2004-06-21 20:18:40 +00:00
phk
70c86a601e Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.
2004-06-16 09:47:26 +00:00
ps
95c29570f1 If a device is not ONLINE, do not attempt to submit any commands
or I/O to the volume.  This solves a panic when removing a disk in
a RAID 0 volume.

Reported by:	le
2004-06-15 19:40:47 +00:00
ps
ef69e65ea4 Document the 64bit version of blocks_to_recover for logical drive status.
Pad the struct to 1024 bytes as defined in the firmware spec.
2004-06-05 18:31:04 +00:00
ps
5cac6c3dda Add pci id's for the SmartArray 6422 and V100 controllers. Also
add a whole bunch of pci id's for future controllers.

Submitted by:	John Cagle <first.last@hp.com>
2004-06-05 18:12:56 +00:00
ps
b8f7375540 Update logical drive structure 2004-06-04 17:22:13 +00:00
ps
aa6a87258f Define another HOTPLUG event. 2004-05-28 00:49:57 +00:00
ps
c297381aa7 Turn SCSI pre-fetch ON. This is mainly for 64XX and 64X based
controllers and allows the controller to prefetch 1-2k on certain
PCI memory reads to the host.  The spec says this should only be
used for IA32 based systems.

Informed of feature by:	John Cagle <first.last@hp.com>
2004-05-17 17:27:38 +00:00
ps
854f72ebf3 make this compile/work with CISS_DEBUG defined. 2004-04-26 19:28:08 +00:00
ps
0b30756ed0 define some new fields in the physical drive structure and pad the
structure to 512 bytes.
2004-04-22 06:23:47 +00:00
ps
887631f03c There's no need to call ciss_report_request in the passthru ioctl
routine since the error will be reported back to the user buffer.
This will quiet down the bootverbose case when using an ACU which
does brute force discovery of the physical and logical devices.
2004-04-19 17:16:06 +00:00
ps
07c9e4e22c Report only new new events when initially attaching to the controller. 2004-04-19 00:57:29 +00:00
ps
130a8d40b2 move the cleanup of the control device into ciss_free and add some
ifdefs for the diffrent kthread_create API between -current and
-stable
2004-04-18 02:39:01 +00:00
ps
b9fc9dda56 Add support for the HP Modular Smart Array 20 & 500 storage arrays.
Logical volumes on these devices show up as LUNs behind another
controller (also known as proxy controller).  In order to issue
firmware commands for a volume on a proxy controller, they must be
targeted at the address of the proxy controller it is attached to,
not the Host/PCI controller.

A proxy controller is defined as a device listed in the INQUIRY
PHYSICAL LUNS command who's L2 and L3 SCSI addresses are zero.  The
corresponding address returned defines which "bus" the controller
lives on and we use this to create a virtual CAM bus.

A logical volume's addresses first byte defines the logical drive
number.  The second byte defines the bus that it is attached to
which corresponds to the BUS of the proxy controller's found or the
Host/PCI controller.

Change event notification to be handled in its own kernel thread.
This is needed since some events may require the driver to sleep
on some operations and this cannot be done during interrupt context.
With this change, it is now possible to create and destroy logical
volumes from FreeBSD, but it requires a native application to
construct the proper firmware commands which is not publicly
available.

Special thanks to John Cagle @ HP for providing remote access to
all the hardware and beating on the storage engineers at HP to
answer my questions.
2004-04-16 23:00:01 +00:00
ps
d923a3cfa0 Whitespace cleanup. 2004-04-16 21:03:38 +00:00
ps
238a55cc92 Don't allow the driver to be unloaded if the device node is open. 2004-04-14 19:45:07 +00:00
ps
b23b948a4e Do not catch signals when waiting for a request. This fixes a nasty
race when issuing commands from userland.
2004-04-14 18:55:28 +00:00
njl
6bcc4e8616 Convert callers to the new bus_alloc_resource_any(9) API.
Submitted by:	Mark Santcroos <marks@ripe.net>
Reviewed by:	imp, dfr, bde
2004-03-17 17:50:55 +00:00
phk
52bc09bd7f 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.
2004-02-21 21:10:55 +00:00
phk
aaade689d0 Device megapatch 1/6:
Free approx 86 major numbers with a mostly automatically generated patch.

A number of strategic drivers have been left behind by caution, and a few
because they still (ab)use their major number.
2004-02-21 19:42:58 +00:00
ru
2df9a9f9a1 Fixed a memory leak.
Reported by:	Stanford Metacompilation research group
2004-01-18 16:55:01 +00:00
ps
8561c66630 White space cleanup 2003-12-13 07:54:07 +00:00
ps
9948312989 Correct the READ/WRITE CDB direction definition.
Submitted by:	John Cagle <john.cagle@hp.com>
2003-12-08 23:12:57 +00:00
ps
daa3efb40a Define RAID 5+1 and RAID ADG fault tolerances 2003-12-08 16:07:35 +00:00
ps
07154e05ba Add PCID for 6i controller
Submitted by:	John Cagle <john.cagle@hp.com>
2003-11-07 03:01:48 +00:00
ps
7eeeec5e60 Print the correct logical drive lun number returned by the controller. 2003-10-15 18:52:44 +00:00
ps
0e3eb54113 Quiet down boot verbose and allow commands to be submitted to a target
which does not have a volume attached.  This will stop cam from retrying
a bunch of time at boot for devices which do not exsist.
2003-09-08 16:45:33 +00:00
imp
0886a6ee43 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.
2003-08-22 05:54:52 +00:00
ps
fee62fc899 Support EINPROGRESS and properly deal with 64bit physical addressing. 2003-08-12 17:55:53 +00:00
ps
d469867bc9 Check the status of the user command and return the proper error
to the user.
2003-07-12 22:37:03 +00:00
ps
b1d4b8e527 Quiet down ciss unless bootverbose is set. 2003-07-12 22:32:27 +00:00
scottl
2fdb52b864 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
2003-07-01 15:52:06 +00:00
ps
082d6beb99 Give the correct size for the command map to busdma. 2003-06-26 04:01:34 +00:00
phk
0518c17029 Fix off-by-one error in drive number check.
Don't return(foo(...)) in function returning void.

Found by:       FlexeLint
2003-05-31 18:41:09 +00:00
ps
9b18535c58 Make ciss usable under PAE
Approved by:	re (scottl)
2003-05-21 07:17:06 +00:00
ps
bd8f7c408f Add support for the HP Smart Array 6400 EM
Change the interrupt mask for the Smart Array 6xxx controllers after
discussions w/ HP.
2003-04-03 20:09:27 +00:00
phk
f2ac891f06 Including <sys/stdint.h> is (almost?) universally only to be able to use
%j in printfs, so put a newsted include in <sys/systm.h> where the printf
prototype lives and save everybody else the trouble.
2003-03-18 08:45:25 +00:00
phk
d7d1ad0eb0 Centralize the devstat handling for all GEOM disk device drivers
in geom_disk.c.

As a side effect this makes a lot of #include <sys/devicestat.h>
lines not needed and some biofinish() calls can be reduced to
biodone() again.
2003-03-08 08:01:31 +00:00
phk
c0f52402d6 Gigacommit to improve device-driver source compatibility between
branches:

Initialize struct cdevsw using C99 sparse initializtion and remove
all initializations to default values.

This patch is automatically generated and has been tested by compiling
LINT with all the fields in struct cdevsw in reverse order on alpha,
sparc64 and i386.

Approved by:    re(scottl)
2003-03-03 12:15:54 +00:00
phk
d07e8bc09c Put cdevsw initialization on canonical format. 2003-03-02 16:50:09 +00:00
imp
1493fd6e76 Back out M_* changes, per decision of the TRB.
Approved by: trb
2003-02-19 05:47:46 +00:00
ps
408837109b Add some PCI device ID's from HP 2003-02-18 21:53:44 +00:00