aha.c (67164) | aha.c (67897) |
---|---|
1/* 2 * Generic register and struct definitions for the Adaptech 154x/164x 3 * SCSI host adapters. Product specific probe and attach routines can 4 * be found in: 5 * aha 1540/1542B/1542C/1542CF/1542CP aha_isa.c 6 * 7 * Copyright (c) 1998 M. Warner Losh. 8 * All Rights Reserved. --- 41 unchanged lines hidden (view full) --- 50 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 51 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 52 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 53 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 54 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 55 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 56 * SUCH DAMAGE. 57 * | 1/* 2 * Generic register and struct definitions for the Adaptech 154x/164x 3 * SCSI host adapters. Product specific probe and attach routines can 4 * be found in: 5 * aha 1540/1542B/1542C/1542CF/1542CP aha_isa.c 6 * 7 * Copyright (c) 1998 M. Warner Losh. 8 * All Rights Reserved. --- 41 unchanged lines hidden (view full) --- 50 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 51 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 52 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 53 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 54 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 55 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 56 * SUCH DAMAGE. 57 * |
58 * $FreeBSD: head/sys/dev/aha/aha.c 67164 2000-10-15 14:19:01Z phk $ | 58 * $FreeBSD: head/sys/dev/aha/aha.c 67897 2000-10-29 16:29:05Z dwmalone $ |
59 */ 60 61#include <sys/param.h> 62#include <sys/systm.h> 63#include <sys/malloc.h> 64#include <sys/kernel.h> 65 66#include <machine/bus_pio.h> --- 151 unchanged lines hidden (view full) --- 218 * Allocate a storage area for us 219 */ 220 if (aha_softcs[unit]) { 221 printf("aha%d: memory already allocated\n", unit); 222 return NULL; 223 } 224 } 225 | 59 */ 60 61#include <sys/param.h> 62#include <sys/systm.h> 63#include <sys/malloc.h> 64#include <sys/kernel.h> 65 66#include <machine/bus_pio.h> --- 151 unchanged lines hidden (view full) --- 218 * Allocate a storage area for us 219 */ 220 if (aha_softcs[unit]) { 221 printf("aha%d: memory already allocated\n", unit); 222 return NULL; 223 } 224 } 225 |
226 aha = malloc(sizeof(struct aha_softc), M_DEVBUF, M_NOWAIT); | 226 aha = malloc(sizeof(struct aha_softc), M_DEVBUF, M_NOWAIT | M_ZERO); |
227 if (!aha) { 228 printf("aha%d: cannot malloc!\n", unit); 229 return NULL; 230 } | 227 if (!aha) { 228 printf("aha%d: cannot malloc!\n", unit); 229 return NULL; 230 } |
231 bzero(aha, sizeof(struct aha_softc)); | |
232 SLIST_INIT(&aha->free_aha_ccbs); 233 LIST_INIT(&aha->pending_ccbs); 234 SLIST_INIT(&aha->sg_maps); 235 aha->unit = unit; 236 aha->tag = tag; 237 aha->bsh = bsh; 238 aha->ccb_sg_opcode = INITIATOR_SG_CCB_WRESID; 239 aha->ccb_ccb_opcode = INITIATOR_CCB_WRESID; --- 1732 unchanged lines hidden --- | 231 SLIST_INIT(&aha->free_aha_ccbs); 232 LIST_INIT(&aha->pending_ccbs); 233 SLIST_INIT(&aha->sg_maps); 234 aha->unit = unit; 235 aha->tag = tag; 236 aha->bsh = bsh; 237 aha->ccb_sg_opcode = INITIATOR_SG_CCB_WRESID; 238 aha->ccb_ccb_opcode = INITIATOR_CCB_WRESID; --- 1732 unchanged lines hidden --- |