for possible buffer overflow problems. Replaced most sprintf()'s
with snprintf(); for others cases, added terminating NUL bytes where
appropriate, replaced constants like "16" with sizeof(), etc.
These changes include several bug fixes, but most changes are for
maintainability's sake. Any instance where it wasn't "immediately
obvious" that a buffer overflow could not occur was made safer.
Reviewed by: Bruce Evans <bde@zeta.org.au>
Reviewed by: Matthew Dillon <dillon@apollo.backplane.com>
Reviewed by: Mike Spengler <mks@networkcs.com>
Disable DPARCKEN in the DSCOMMAND0 register on the aic7890/91/96/97.
Parity checking is broken for some chip/MB combinations and this
is the work around recommended by Adaptec.
dpt_pci.c:
Remove a superflous '{' that prevented DPT_ALLOW_MEMIO from working.
pcireg.h:
Add a definition for Parity Error Reponse bit in the PCI Space
command register.
Bump the lun field in the eata ccb to 5 bits. We still only
use 3 of them, but we may use the rest at a later date.
dpt_scsi.c:
Default to only 32 S/G segments.
Bzero our CCB array after allocation.
those extra ones yet, anyway.
In dpttimeout, expect that the controller will complete aborted CCBs through
the interrupt handler. This corrects a panic that was caused by completing
the same transaction twice during timeout recovery.
Honor the tag times types expressed by the user and pass them down to
the controller.
description of DPT_SHUTDOWN_SLEEP in LINT. Didn't add timestamps
so that the (combined?) sleep interval can be printed as intended
in the original printf.
different size (on i386's with 64 bit longs). Cosmetic. Non-cosmetic
unportabilities were already hidden by using ntohl() to convert a
32-bit user DMA address to a long.
FreeBSD/alpha. The most significant item is to change the command
argument to ioctl functions from int to u_long. This change brings us
inline with various other BSD versions. Driver writers may like to
use (__FreeBSD_version == 300003) to detect this change.
The prototype FreeBSD/alpha machdep will follow in a couple of days
time.