Deleted Added
full compact
sbp.c (122529) sbp.c (124145)
1/*
2 * Copyright (c) 2003 Hidetoshi Shimokawa
3 * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

26 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
27 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
30 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 * POSSIBILITY OF SUCH DAMAGE.
33 *
1/*
2 * Copyright (c) 2003 Hidetoshi Shimokawa
3 * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

26 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
27 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
30 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 * POSSIBILITY OF SUCH DAMAGE.
33 *
34 * $FreeBSD: head/sys/dev/firewire/sbp.c 122529 2003-11-12 04:06:21Z simokawa $
34 * $FreeBSD: head/sys/dev/firewire/sbp.c 124145 2004-01-05 14:21:18Z simokawa $
35 *
36 */
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/module.h>
41#include <sys/bus.h>
42#include <sys/sysctl.h>

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

211struct sbp_softc {
212 struct firewire_dev_comm fd;
213 struct cam_sim *sim;
214 struct cam_path *path;
215 struct sbp_target targets[SBP_NUM_TARGETS];
216 struct fw_bind fwb;
217 bus_dma_tag_t dmat;
218 struct timeval last_busreset;
35 *
36 */
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/module.h>
41#include <sys/bus.h>
42#include <sys/sysctl.h>

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

211struct sbp_softc {
212 struct firewire_dev_comm fd;
213 struct cam_sim *sim;
214 struct cam_path *path;
215 struct sbp_target targets[SBP_NUM_TARGETS];
216 struct fw_bind fwb;
217 bus_dma_tag_t dmat;
218 struct timeval last_busreset;
219#define SIMQ_FREEZED 1
220 int flags;
219};
220
221static void sbp_post_explore __P((void *));
222static void sbp_recv __P((struct fw_xfer *));
223static void sbp_mgm_callback __P((struct fw_xfer *));
224#if 0
225static void sbp_cmd_callback __P((struct fw_xfer *));
226#endif

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

759sbp_post_busreset(void *arg)
760{
761 struct sbp_softc *sbp;
762
763 sbp = (struct sbp_softc *)arg;
764SBP_DEBUG(0)
765 printf("sbp_post_busreset\n");
766END_DEBUG
221};
222
223static void sbp_post_explore __P((void *));
224static void sbp_recv __P((struct fw_xfer *));
225static void sbp_mgm_callback __P((struct fw_xfer *));
226#if 0
227static void sbp_cmd_callback __P((struct fw_xfer *));
228#endif

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

761sbp_post_busreset(void *arg)
762{
763 struct sbp_softc *sbp;
764
765 sbp = (struct sbp_softc *)arg;
766SBP_DEBUG(0)
767 printf("sbp_post_busreset\n");
768END_DEBUG
769 if ((sbp->sim->flags & SIMQ_FREEZED) == 0) {
770 xpt_freeze_simq(sbp->sim, /*count*/1);
771 sbp->sim->flags |= SIMQ_FREEZED;
772 }
767 microtime(&sbp->last_busreset);
768}
769
770static void
771sbp_post_explore(void *arg)
772{
773 struct sbp_softc *sbp = (struct sbp_softc *)arg;
774 struct sbp_target *target;

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

828 } else {
829 continue;
830 }
831 }
832 sbp_probe_target((void *)target);
833 if (target->num_lun == 0)
834 sbp_free_target(target);
835 }
773 microtime(&sbp->last_busreset);
774}
775
776static void
777sbp_post_explore(void *arg)
778{
779 struct sbp_softc *sbp = (struct sbp_softc *)arg;
780 struct sbp_target *target;

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

834 } else {
835 continue;
836 }
837 }
838 sbp_probe_target((void *)target);
839 if (target->num_lun == 0)
840 sbp_free_target(target);
841 }
842 xpt_release_simq(sbp->sim, /*run queue*/TRUE);
843 sbp->sim->flags &= ~SIMQ_FREEZED;
836}
837
838#if NEED_RESPONSE
839static void
840sbp_loginres_callback(struct fw_xfer *xfer){
841 int s;
842 struct sbp_dev *sdev;
843 sdev = (struct sbp_dev *)xfer->sc;

--- 1949 unchanged lines hidden ---
844}
845
846#if NEED_RESPONSE
847static void
848sbp_loginres_callback(struct fw_xfer *xfer){
849 int s;
850 struct sbp_dev *sdev;
851 sdev = (struct sbp_dev *)xfer->sc;

--- 1949 unchanged lines hidden ---