Deleted Added
full compact
dpt_scsi.c (109395) dpt_scsi.c (109623)
1/*
2 * Copyright (c) 1997 by Simon Shapiro
3 * All Rights Reserved
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 29 unchanged lines hidden (view full) ---

38 * team for creating and maintaining such a wonderful O/S.
39 *
40 * TODO: * Add ISA probe code.
41 * * Add driver-level RAID-0. This will allow interoperability with
42 * NiceTry, M$-Doze, Win-Dog, Slowlaris, etc., in recognizing RAID
43 * arrays that span controllers (Wow!).
44 */
45
1/*
2 * Copyright (c) 1997 by Simon Shapiro
3 * All Rights Reserved
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 29 unchanged lines hidden (view full) ---

38 * team for creating and maintaining such a wonderful O/S.
39 *
40 * TODO: * Add ISA probe code.
41 * * Add driver-level RAID-0. This will allow interoperability with
42 * NiceTry, M$-Doze, Win-Dog, Slowlaris, etc., in recognizing RAID
43 * arrays that span controllers (Wow!).
44 */
45
46#ident "$FreeBSD: head/sys/dev/dpt/dpt_scsi.c 109395 2003-01-16 23:37:26Z grog $"
46#ident "$FreeBSD: head/sys/dev/dpt/dpt_scsi.c 109623 2003-01-21 08:56:16Z alfred $"
47
48#define _DPT_C_
49
50#include "opt_dpt.h"
51#include <sys/param.h>
52#include <sys/systm.h>
53#include <sys/eventhandler.h>
54#include <sys/malloc.h>

--- 2261 unchanged lines hidden (view full) ---

2316 ccb->eata_ccb.cp_statDMA = htonl(vtophys(&ccb->eata_ccb.cp_statDMA));
2317 ccb->eata_ccb.cp_reqDMA = htonl(vtophys(&ccb->eata_ccb.cp_reqDMA));
2318 ccb->eata_ccb.cp_viraddr = (u_int32_t) & ccb;
2319
2320 if (ccb->eata_ccb.DataIn || ccb->eata_ccb.DataOut) {
2321 /* Data I/O is involved in this command. Alocate buffer */
2322 if (ccb->eata_ccb.cp_datalen > PAGE_SIZE) {
2323 data = contigmalloc(ccb->eata_ccb.cp_datalen,
47
48#define _DPT_C_
49
50#include "opt_dpt.h"
51#include <sys/param.h>
52#include <sys/systm.h>
53#include <sys/eventhandler.h>
54#include <sys/malloc.h>

--- 2261 unchanged lines hidden (view full) ---

2316 ccb->eata_ccb.cp_statDMA = htonl(vtophys(&ccb->eata_ccb.cp_statDMA));
2317 ccb->eata_ccb.cp_reqDMA = htonl(vtophys(&ccb->eata_ccb.cp_reqDMA));
2318 ccb->eata_ccb.cp_viraddr = (u_int32_t) & ccb;
2319
2320 if (ccb->eata_ccb.DataIn || ccb->eata_ccb.DataOut) {
2321 /* Data I/O is involved in this command. Alocate buffer */
2322 if (ccb->eata_ccb.cp_datalen > PAGE_SIZE) {
2323 data = contigmalloc(ccb->eata_ccb.cp_datalen,
2324 M_TEMP, M_WAITOK, 0, ~0,
2324 M_TEMP, 0, 0, ~0,
2325 ccb->eata_ccb.cp_datalen,
2326 0x10000);
2327 } else {
2328 data = malloc(ccb->eata_ccb.cp_datalen, M_TEMP,
2325 ccb->eata_ccb.cp_datalen,
2326 0x10000);
2327 } else {
2328 data = malloc(ccb->eata_ccb.cp_datalen, M_TEMP,
2329 M_WAITOK);
2329 0);
2330 }
2331
2332 if (data == NULL) {
2333 printf("dpt%d: Cannot allocate %d bytes "
2334 "for EATA command\n", dpt->unit,
2335 ccb->eata_ccb.cp_datalen);
2336 return (EFAULT);
2337 }

--- 300 unchanged lines hidden ---
2330 }
2331
2332 if (data == NULL) {
2333 printf("dpt%d: Cannot allocate %d bytes "
2334 "for EATA command\n", dpt->unit,
2335 ccb->eata_ccb.cp_datalen);
2336 return (EFAULT);
2337 }

--- 300 unchanged lines hidden ---