Commit Graph

27 Commits

Author SHA1 Message Date
pgoyette 2c629d0bbf Initialize current value for ENVSYS_DRIVE sensors 2011-06-20 22:02:55 +00:00
pgoyette 57e6b23a48 Initializes sensors states before registering. 2011-06-20 17:48:45 +00:00
mhitch 08cc54d62a I was allowing adapt_max_periph to use all available command slots, which
easily exceeds the maximum of 256 tags used by the scsipi layer because
the tag information from the scsipi layer was ignored and all the tagging
is handled implicitly internal to ciss(4).  But with the DIAGNOSTIC option,
the scsipi layer does a check for > 256 tags and will panic.  So, lets just
limit the adapt_max_periph to 256 so the scsipi layer won't try to user more.
2011-05-16 17:21:37 +00:00
uebayasi 8184d5dc03 Don't pull in the whole uvm(9) API to access only PAGE_SIZE and
some other constants.  These are provided by sys/param.h now.
2010-11-13 13:51:57 +00:00
mhitch 9c443068a6 Fix a performance problem with the ciss(4) driver. NetBSD does common
queueing at the scsipi midlayer, and if the midlayer is not requested to
enable tagged queueing, the midlayer will only queue one command to the
adapter driver for each device.  The SmartArray adapter is capable of
handling multiple commands, and in the rather common case where there is
no battery backup and no write cache, doing single write commands is very
slow.  The SmartArray adapter runs much better when several commands can
be issued to a device.

This has been observed and discussed in several list threads, notably:
http://mail-index.NetBSD.org/netbsd-users/2008/10/01/msg002083.html
http://mail-index.NetBSD.org/tech-kern/2008/11/30/msg003704.html

This also addresses PR kern/39686.

To enable tagged queueing, the adapter driver responds to the midlayer
request to set the transfer mode.  However, the SmartArray does not respond
to the SCSI INQUIRY command with an ANSII field of 2 or more, so the
scsipi midlayer will ignore the CmdQue bit in the flags3 field of the
inquiry data.  This fix will patch the inquiry data so set the ANSII field
to 2, and responds to the midlayer request to set the transfer mode by
requesting tagged queueing.

In addition, the original port of the driver did not set up the adapter
parameters correctly as mentioned in the second list thread mentioned
above.  The adapt_openings is the total number of commands that the
adapter will accept rather than the number of commands divided by the
number of logical drives.  Also, the adapt_max_periph is the maximum number
of commands which can be queued per peripheral device, not the number of
logical drives [which in the case of a single logical drive limited the
number of commands queued to 1].

I'm also suppressing an error message for invalid commands if the error
was due to the SCSI_SYNCHRONIZE_CACHE_10 command, since that command is
not supported by the SmartArray adapter, but used with wapbl(4) meta-data
journaling.  Setting the ANSII version to 2 to allow enabling tagged queueing
also enables the use of the SCSI_SYNCHRONIZE_CACHE_10 command.
2010-09-07 18:19:16 +00:00
jakllsch 1a808dfbe7 Print size_t with 'z' in debug code. 2010-07-27 18:50:32 +00:00
jym da702eb93d Add PAE to ALL kernel, so that most paddr_t format string errors get caught
during compilation.

While here, fix the compilation for ALL.
2010-07-26 22:33:23 +00:00
pgoyette 89bf6ebb9f Remove setting of edata->monitor since that member no longer exists. 2010-03-14 18:05:07 +00:00
cegger 529e91fca1 struct device * -> device_t, no functional changes intended. 2009-05-12 14:16:35 +00:00
tsutsui d779b85d3e Remove extra whitespace added by a stupid tool.
XXX: more in src/sys/arch
2009-04-18 14:58:02 +00:00
cegger e2cb85904d bcopy -> memcpy 2009-03-18 17:06:41 +00:00
cegger c363a9cb62 bzero -> memset 2009-03-18 16:00:08 +00:00
bouyer 73920b4161 More printf format fixes. 2009-02-13 23:31:23 +00:00
he 7f923d38fb Adopt a fix from OpenBSD, revision 1.30 in their CVS repository.
To paraphrase:
  Some ciss(4) firmwares use different physical drive addressing, resulting
  in bioctl(8) functions not being available.
Tested on both types of controller.
2008-09-04 19:03:14 +00:00
mhitch baf8265fa5 Limit the number of luns to 1, since the SCSI device ciss(4) presents
doesn't appear to luns and later controllers would respond to probe
requests for luns > 0.
2008-09-04 16:47:04 +00:00
mhitch 72715a9ae8 Add bio(4) support, heavily from OpenBSD. The driver doesn't know which
physical drives belong to which logical drive, so all the physical drives
will show up for logical drive 0, and also appear for logical drives that
are rebuilding so that the rebuild state will show the physical drive
being rebuilt.  Locking for the scratch buffer is currently missing - system
quickly quits responding when I try to lock the buffer with mutex_{enter,exit}().
2008-05-25 20:08:34 +00:00
cegger 7088512994 use aprint_*_dev and device_xname 2008-04-08 12:07:25 +00:00
perry 9b2b412c19 __FUNCTION__ -> __func__ 2007-12-15 00:39:14 +00:00
ad a2a3828545 machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h 2007-10-19 11:59:34 +00:00
ad 88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +00:00
christos 53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
christos 168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
christos 4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
christos 53dabe0e36 fix empty if body. 2006-10-04 15:39:24 +00:00
he 732bd1213b Remove setting of xs_status to XS_STS_DONE before calling scspi_done().
After revision 1.135 of scsipi_base.c, it's a big no-no to set
XS_STS_DONE before calling scsipi_done().  Besides, scsipi_done()
sets XS_STS_DONE itself after checking that it's not already set.

This puts this driver back in working order; before this change
the probe of the logical drives would cause a hang.
2006-05-27 17:56:39 +00:00
martti 09780f733e Merged changes between OpenBSD rev 1.13 and 1.14. 2006-04-15 12:36:23 +00:00
he 77c27ad055 Add a driver, ciss(4), for the HP/Compaq drivers using the newer
"Command Interface to SCSI-3 Support" command interface.  Driver
ported from OpenBSD by Tonnerre Lombard -- thanks!
2006-03-21 20:42:14 +00:00