Deleted Added
full compact
trm.c (107928) trm.c (109623)
1/*
2 * O.S : FreeBSD CAM
3 * FILE NAME : trm.c
4 * BY : C.L. Huang (ching@tekram.com.tw)
5 * Erich Chen (erich@tekram.com.tw)
6 * Description: Device Driver for Tekram DC395U/UW/F ,DC315/U
7 * PCI SCSI Bus Master Host Adapter
8 * (SCSI chip set used Tekram ASIC TRM-S1040)

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

52 */
53
54/*
55 * Updated to compile under FreeBSD 5.0-CURRENT by Olivier Houchard
56 * <doginou@ci0.org>, 2002-03-04
57 */
58
59#include <sys/cdefs.h>
1/*
2 * O.S : FreeBSD CAM
3 * FILE NAME : trm.c
4 * BY : C.L. Huang (ching@tekram.com.tw)
5 * Erich Chen (erich@tekram.com.tw)
6 * Description: Device Driver for Tekram DC395U/UW/F ,DC315/U
7 * PCI SCSI Bus Master Host Adapter
8 * (SCSI chip set used Tekram ASIC TRM-S1040)

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

52 */
53
54/*
55 * Updated to compile under FreeBSD 5.0-CURRENT by Olivier Houchard
56 * <doginou@ci0.org>, 2002-03-04
57 */
58
59#include <sys/cdefs.h>
60__FBSDID("$FreeBSD: head/sys/dev/trm/trm.c 107928 2002-12-16 13:38:22Z cognet $");
60__FBSDID("$FreeBSD: head/sys/dev/trm/trm.c 109623 2003-01-21 08:56:16Z alfred $");
61
62#include <sys/param.h>
63
64#include <sys/systm.h>
65#include <sys/malloc.h>
66#include <sys/queue.h>
67#if __FreeBSD_version >= 500000
68#include <sys/bio.h>

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

2882 */
2883 trm_initSRB(pACB->pTmpSRB);
2884 /* allocate DCB array for scan device */
2885 for (i = 0; i < (pACB->max_id +1); i++) {
2886 if (pACB->AdaptSCSIID != i) {
2887 for (j = 0; j < (pACB->max_lun +1); j++) {
2888 pACB->scan_devices[i][j] = 1;
2889 pACB->pDCB[i][j]= (PDCB) malloc (
61
62#include <sys/param.h>
63
64#include <sys/systm.h>
65#include <sys/malloc.h>
66#include <sys/queue.h>
67#if __FreeBSD_version >= 500000
68#include <sys/bio.h>

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

2882 */
2883 trm_initSRB(pACB->pTmpSRB);
2884 /* allocate DCB array for scan device */
2885 for (i = 0; i < (pACB->max_id +1); i++) {
2886 if (pACB->AdaptSCSIID != i) {
2887 for (j = 0; j < (pACB->max_lun +1); j++) {
2888 pACB->scan_devices[i][j] = 1;
2889 pACB->pDCB[i][j]= (PDCB) malloc (
2890 sizeof (struct _DCB), M_DEVBUF, M_WAITOK);
2890 sizeof (struct _DCB), M_DEVBUF, 0);
2891 trm_initDCB(pACB,
2892 pACB->pDCB[i][j], unit, i, j);
2893 TRM_DPRINTF("pDCB= %8x \n",
2894 (u_int)pACB->pDCB[i][j]);
2895 }
2896 }
2897 }
2898 TRM_DPRINTF("sizeof(struct _DCB)= %8x \n",sizeof(struct _DCB));

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

3287 * The sim driver creates a sim for each controller. The sim device
3288 * queue is separately created in order to allow resource sharing betwee
3289 * sims. For instance, a driver may create one sim for each channel of
3290 * a multi-channel controller and use the same queue for each channel.
3291 * In this way, the queue resources are shared across all the channels
3292 * of the multi-channel controller.
3293 * trm_action : sim_action_func
3294 * trm_poll : sim_poll_func
2891 trm_initDCB(pACB,
2892 pACB->pDCB[i][j], unit, i, j);
2893 TRM_DPRINTF("pDCB= %8x \n",
2894 (u_int)pACB->pDCB[i][j]);
2895 }
2896 }
2897 }
2898 TRM_DPRINTF("sizeof(struct _DCB)= %8x \n",sizeof(struct _DCB));

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

3287 * The sim driver creates a sim for each controller. The sim device
3288 * queue is separately created in order to allow resource sharing betwee
3289 * sims. For instance, a driver may create one sim for each channel of
3290 * a multi-channel controller and use the same queue for each channel.
3291 * In this way, the queue resources are shared across all the channels
3292 * of the multi-channel controller.
3293 * trm_action : sim_action_func
3294 * trm_poll : sim_poll_func
3295 * "trm" : sim_name ,if sim_name = "xpt" ..M_DEVBUF,M_WAITOK
3295 * "trm" : sim_name ,if sim_name = "xpt" ..M_DEVBUF,0
3296 * pACB : *softc if sim_name <> "xpt" ..M_DEVBUF,M_NOWAIT
3297 * pACB->unit : unit
3298 * 1 : max_dev_transactions
3299 * MAX_TAGS : max_tagged_dev_transactions
3300 *
3301 * *******Construct our first channel SIM entry
3302 */
3303 pACB->psim = cam_sim_alloc(trm_action,

--- 94 unchanged lines hidden ---
3296 * pACB : *softc if sim_name <> "xpt" ..M_DEVBUF,M_NOWAIT
3297 * pACB->unit : unit
3298 * 1 : max_dev_transactions
3299 * MAX_TAGS : max_tagged_dev_transactions
3300 *
3301 * *******Construct our first channel SIM entry
3302 */
3303 pACB->psim = cam_sim_alloc(trm_action,

--- 94 unchanged lines hidden ---