aic7xxx.c (219577) | aic7xxx.c (237601) |
---|---|
1/*- 2 * Core routines and tables shareable across OS platforms. 3 * 4 * Copyright (c) 1994-2002 Justin T. Gibbs. 5 * Copyright (c) 2000-2002 Adaptec Inc. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 32 unchanged lines hidden (view full) --- 41 */ 42 43#ifdef __linux__ 44#include "aic7xxx_osm.h" 45#include "aic7xxx_inline.h" 46#include "aicasm/aicasm_insformat.h" 47#else 48#include <sys/cdefs.h> | 1/*- 2 * Core routines and tables shareable across OS platforms. 3 * 4 * Copyright (c) 1994-2002 Justin T. Gibbs. 5 * Copyright (c) 2000-2002 Adaptec Inc. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 32 unchanged lines hidden (view full) --- 41 */ 42 43#ifdef __linux__ 44#include "aic7xxx_osm.h" 45#include "aic7xxx_inline.h" 46#include "aicasm/aicasm_insformat.h" 47#else 48#include <sys/cdefs.h> |
49__FBSDID("$FreeBSD: head/sys/dev/aic7xxx/aic7xxx.c 219577 2011-03-12 20:36:52Z marius $"); | 49__FBSDID("$FreeBSD: head/sys/dev/aic7xxx/aic7xxx.c 237601 2012-06-26 14:51:35Z ken $"); |
50#include <dev/aic7xxx/aic7xxx_osm.h> 51#include <dev/aic7xxx/aic7xxx_inline.h> 52#include <dev/aic7xxx/aicasm/aicasm_insformat.h> 53#endif 54 55/****************************** Softc Data ************************************/ 56struct ahc_softc_tailq ahc_tailq = TAILQ_HEAD_INITIALIZER(ahc_tailq); 57 --- 6305 unchanged lines hidden (view full) --- 6363/* 6364 * Send any target mode events queued up waiting 6365 * for immediate notify resources. 6366 */ 6367void 6368ahc_send_lstate_events(struct ahc_softc *ahc, struct ahc_tmode_lstate *lstate) 6369{ 6370 struct ccb_hdr *ccbh; | 50#include <dev/aic7xxx/aic7xxx_osm.h> 51#include <dev/aic7xxx/aic7xxx_inline.h> 52#include <dev/aic7xxx/aicasm/aicasm_insformat.h> 53#endif 54 55/****************************** Softc Data ************************************/ 56struct ahc_softc_tailq ahc_tailq = TAILQ_HEAD_INITIALIZER(ahc_tailq); 57 --- 6305 unchanged lines hidden (view full) --- 6363/* 6364 * Send any target mode events queued up waiting 6365 * for immediate notify resources. 6366 */ 6367void 6368ahc_send_lstate_events(struct ahc_softc *ahc, struct ahc_tmode_lstate *lstate) 6369{ 6370 struct ccb_hdr *ccbh; |
6371 struct ccb_immed_notify *inot; | 6371 struct ccb_immediate_notify *inot; |
6372 6373 while (lstate->event_r_idx != lstate->event_w_idx 6374 && (ccbh = SLIST_FIRST(&lstate->immed_notifies)) != NULL) { 6375 struct ahc_tmode_event *event; 6376 6377 event = &lstate->event_buffer[lstate->event_r_idx]; 6378 SLIST_REMOVE_HEAD(&lstate->immed_notifies, sim_links.sle); | 6372 6373 while (lstate->event_r_idx != lstate->event_w_idx 6374 && (ccbh = SLIST_FIRST(&lstate->immed_notifies)) != NULL) { 6375 struct ahc_tmode_event *event; 6376 6377 event = &lstate->event_buffer[lstate->event_r_idx]; 6378 SLIST_REMOVE_HEAD(&lstate->immed_notifies, sim_links.sle); |
6379 inot = (struct ccb_immed_notify *)ccbh; | 6379 inot = (struct ccb_immediate_notify *)ccbh; |
6380 switch (event->event_type) { 6381 case EVENT_TYPE_BUS_RESET: 6382 ccbh->status = CAM_SCSI_BUS_RESET|CAM_DEV_QFRZN; 6383 break; 6384 default: 6385 ccbh->status = CAM_MESSAGE_RECV|CAM_DEV_QFRZN; | 6380 switch (event->event_type) { 6381 case EVENT_TYPE_BUS_RESET: 6382 ccbh->status = CAM_SCSI_BUS_RESET|CAM_DEV_QFRZN; 6383 break; 6384 default: 6385 ccbh->status = CAM_MESSAGE_RECV|CAM_DEV_QFRZN; |
6386 inot->message_args[0] = event->event_type; 6387 inot->message_args[1] = event->event_arg; | 6386 inot->arg = event->event_type; 6387 inot->seq_id = event->event_arg; |
6388 break; 6389 } 6390 inot->initiator_id = event->initiator_id; | 6388 break; 6389 } 6390 inot->initiator_id = event->initiator_id; |
6391 inot->sense_len = 0; | |
6392 xpt_done((union ccb *)inot); 6393 lstate->event_r_idx++; 6394 if (lstate->event_r_idx == AHC_TMODE_EVENT_BUFFER_SIZE) 6395 lstate->event_r_idx = 0; 6396 } 6397} 6398#endif 6399 --- 1502 unchanged lines hidden --- | 6391 xpt_done((union ccb *)inot); 6392 lstate->event_r_idx++; 6393 if (lstate->event_r_idx == AHC_TMODE_EVENT_BUFFER_SIZE) 6394 lstate->event_r_idx = 0; 6395 } 6396} 6397#endif 6398 --- 1502 unchanged lines hidden --- |