Deleted Added
full compact
sbp.c (108280) sbp.c (108281)
1/*
2 * Copyright (c) 1998,1999,2000,2001 Katsushi Kobayashi and Hidetosh Shimokawa
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

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

25 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE.
32 *
1/*
2 * Copyright (c) 1998,1999,2000,2001 Katsushi Kobayashi and Hidetosh Shimokawa
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

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

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

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

295static struct fw_xfer * sbp_write_cmd __P((struct sbp_dev *, int, int));
296static struct sbp_ocb * sbp_get_ocb __P((struct sbp_softc *));
297static struct sbp_ocb * sbp_enqueue_ocb __P((struct sbp_dev *, struct sbp_ocb *));
298static struct sbp_ocb * sbp_dequeue_ocb __P((struct sbp_dev *, u_int32_t));
299static void sbp_detach_target __P((struct sbp_target *));
300static void sbp_timeout __P((void *arg));
301static void sbp_mgm_orb __P((struct sbp_dev *, int));
302
34 *
35 */
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/module.h>
40#include <sys/bus.h>
41#include <sys/mbuf.h>

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

295static struct fw_xfer * sbp_write_cmd __P((struct sbp_dev *, int, int));
296static struct sbp_ocb * sbp_get_ocb __P((struct sbp_softc *));
297static struct sbp_ocb * sbp_enqueue_ocb __P((struct sbp_dev *, struct sbp_ocb *));
298static struct sbp_ocb * sbp_dequeue_ocb __P((struct sbp_dev *, u_int32_t));
299static void sbp_detach_target __P((struct sbp_target *));
300static void sbp_timeout __P((void *arg));
301static void sbp_mgm_orb __P((struct sbp_dev *, int));
302
303MALLOC_DEFINE(M_SBP, "sbp", "SBP-II/Firewire");
303MALLOC_DEFINE(M_SBP, "sbp", "SBP-II/FireWire");
304
305/* cam related functions */
306static void sbp_action(struct cam_sim *sim, union ccb *ccb);
307static void sbp_poll(struct cam_sim *sim);
308static void sbp_cam_callback(struct cam_periph *periph,
309 union ccb *ccb);
310static void sbp_cam_scan_lun(struct sbp_dev *sdev);
311

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

1246 sbp_show_sdev_info(sdev, 2);
1247 printf("sbp_fix_inq_data\n");
1248END_DEBUG
1249 inq = (struct scsi_inquiry_data *) ccb->csio.data_ptr;
1250 switch (SID_TYPE(inq)) {
1251 case T_DIRECT:
1252 /*
1253 * XXX Convert Direct Access device to RBC.
304
305/* cam related functions */
306static void sbp_action(struct cam_sim *sim, union ccb *ccb);
307static void sbp_poll(struct cam_sim *sim);
308static void sbp_cam_callback(struct cam_periph *periph,
309 union ccb *ccb);
310static void sbp_cam_scan_lun(struct sbp_dev *sdev);
311

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

1246 sbp_show_sdev_info(sdev, 2);
1247 printf("sbp_fix_inq_data\n");
1248END_DEBUG
1249 inq = (struct scsi_inquiry_data *) ccb->csio.data_ptr;
1250 switch (SID_TYPE(inq)) {
1251 case T_DIRECT:
1252 /*
1253 * XXX Convert Direct Access device to RBC.
1254 * I've never seen Firewire DA devices which support READ_6.
1254 * I've never seen FireWire DA devices which support READ_6.
1255 */
1256#if 1
1257 if (SID_TYPE(inq) == T_DIRECT)
1258 inq->device |= T_RBC; /* T_DIRECT == 0 */
1259#endif
1260 /* fall through */
1261 case T_RBC:
1262 /* disable tag queuing */

--- 955 unchanged lines hidden ---
1255 */
1256#if 1
1257 if (SID_TYPE(inq) == T_DIRECT)
1258 inq->device |= T_RBC; /* T_DIRECT == 0 */
1259#endif
1260 /* fall through */
1261 case T_RBC:
1262 /* disable tag queuing */

--- 955 unchanged lines hidden ---