Deleted Added
full compact
aic79xx.c (219577) aic79xx.c (237601)
1/*-
2 * Core routines and tables shareable across OS platforms.
3 *
4 * Copyright (c) 1994-2002, 2004 Justin T. Gibbs.
5 * Copyright (c) 2000-2003 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 "aic79xx_osm.h"
45#include "aic79xx_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, 2004 Justin T. Gibbs.
5 * Copyright (c) 2000-2003 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 "aic79xx_osm.h"
45#include "aic79xx_inline.h"
46#include "aicasm/aicasm_insformat.h"
47#else
48#include <sys/cdefs.h>
49__FBSDID("$FreeBSD: head/sys/dev/aic7xxx/aic79xx.c 219577 2011-03-12 20:36:52Z marius $");
49__FBSDID("$FreeBSD: head/sys/dev/aic7xxx/aic79xx.c 237601 2012-06-26 14:51:35Z ken $");
50#include <dev/aic7xxx/aic79xx_osm.h>
51#include <dev/aic7xxx/aic79xx_inline.h>
52#include <dev/aic7xxx/aicasm/aicasm_insformat.h>
53#endif
54
55/******************************** Globals *************************************/
56struct ahd_softc_tailq ahd_tailq = TAILQ_HEAD_INITIALIZER(ahd_tailq);
57uint32_t ahd_attach_to_HostRAID_controllers = 1;

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

8556/*
8557 * Send any target mode events queued up waiting
8558 * for immediate notify resources.
8559 */
8560void
8561ahd_send_lstate_events(struct ahd_softc *ahd, struct ahd_tmode_lstate *lstate)
8562{
8563 struct ccb_hdr *ccbh;
50#include <dev/aic7xxx/aic79xx_osm.h>
51#include <dev/aic7xxx/aic79xx_inline.h>
52#include <dev/aic7xxx/aicasm/aicasm_insformat.h>
53#endif
54
55/******************************** Globals *************************************/
56struct ahd_softc_tailq ahd_tailq = TAILQ_HEAD_INITIALIZER(ahd_tailq);
57uint32_t ahd_attach_to_HostRAID_controllers = 1;

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

8556/*
8557 * Send any target mode events queued up waiting
8558 * for immediate notify resources.
8559 */
8560void
8561ahd_send_lstate_events(struct ahd_softc *ahd, struct ahd_tmode_lstate *lstate)
8562{
8563 struct ccb_hdr *ccbh;
8564 struct ccb_immed_notify *inot;
8564 struct ccb_immediate_notify *inot;
8565
8566 while (lstate->event_r_idx != lstate->event_w_idx
8567 && (ccbh = SLIST_FIRST(&lstate->immed_notifies)) != NULL) {
8568 struct ahd_tmode_event *event;
8569
8570 event = &lstate->event_buffer[lstate->event_r_idx];
8571 SLIST_REMOVE_HEAD(&lstate->immed_notifies, sim_links.sle);
8565
8566 while (lstate->event_r_idx != lstate->event_w_idx
8567 && (ccbh = SLIST_FIRST(&lstate->immed_notifies)) != NULL) {
8568 struct ahd_tmode_event *event;
8569
8570 event = &lstate->event_buffer[lstate->event_r_idx];
8571 SLIST_REMOVE_HEAD(&lstate->immed_notifies, sim_links.sle);
8572 inot = (struct ccb_immed_notify *)ccbh;
8572 inot = (struct ccb_immediate_notify *)ccbh;
8573 switch (event->event_type) {
8574 case EVENT_TYPE_BUS_RESET:
8575 ccbh->status = CAM_SCSI_BUS_RESET|CAM_DEV_QFRZN;
8576 break;
8577 default:
8578 ccbh->status = CAM_MESSAGE_RECV|CAM_DEV_QFRZN;
8573 switch (event->event_type) {
8574 case EVENT_TYPE_BUS_RESET:
8575 ccbh->status = CAM_SCSI_BUS_RESET|CAM_DEV_QFRZN;
8576 break;
8577 default:
8578 ccbh->status = CAM_MESSAGE_RECV|CAM_DEV_QFRZN;
8579 inot->message_args[0] = event->event_type;
8580 inot->message_args[1] = event->event_arg;
8579 inot->arg = event->event_type;
8580 inot->seq_id = event->event_arg;
8581 break;
8582 }
8583 inot->initiator_id = event->initiator_id;
8581 break;
8582 }
8583 inot->initiator_id = event->initiator_id;
8584 inot->sense_len = 0;
8585 xpt_done((union ccb *)inot);
8586 lstate->event_r_idx++;
8587 if (lstate->event_r_idx == AHD_TMODE_EVENT_BUFFER_SIZE)
8588 lstate->event_r_idx = 0;
8589 }
8590}
8591#endif
8592

--- 1808 unchanged lines hidden ---
8584 xpt_done((union ccb *)inot);
8585 lstate->event_r_idx++;
8586 if (lstate->event_r_idx == AHD_TMODE_EVENT_BUFFER_SIZE)
8587 lstate->event_r_idx = 0;
8588 }
8589}
8590#endif
8591

--- 1808 unchanged lines hidden ---