sbp.c (109424) | sbp.c (109623) |
---|---|
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 109424 2003-01-17 15:15:21Z simokawa $ | 33 * $FreeBSD: head/sys/dev/firewire/sbp.c 109623 2003-01-21 08:56:16Z alfred $ |
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> --- 716 unchanged lines hidden (view full) --- 758END_DEBUG 759 sdev->status = SBP_DEV_ATTACHED; 760 free(ccb, M_SBP); 761} 762 763static void 764sbp_cam_scan_lun(struct sbp_dev *sdev) 765{ | 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> --- 716 unchanged lines hidden (view full) --- 758END_DEBUG 759 sdev->status = SBP_DEV_ATTACHED; 760 free(ccb, M_SBP); 761} 762 763static void 764sbp_cam_scan_lun(struct sbp_dev *sdev) 765{ |
766 union ccb *ccb = malloc(sizeof(union ccb), M_SBP, M_WAITOK | M_ZERO); | 766 union ccb *ccb = malloc(sizeof(union ccb), M_SBP, M_ZERO); |
767 768SBP_DEBUG(0) 769 sbp_show_sdev_info(sdev, 2); 770 printf("sbp_cam_scan_lun\n"); 771END_DEBUG 772 xpt_setup_ccb(&ccb->ccb_h, sdev->path, 5/*priority (low)*/); 773 ccb->ccb_h.func_code = XPT_SCAN_LUN; 774 ccb->ccb_h.cbfcnp = sbp_cam_callback; --- 42 unchanged lines hidden (view full) --- 817 * e.g. Maxtor 3000XT, Yano A-dish. 818 */ 819static void 820sbp_ping_unit(struct sbp_dev *sdev) 821{ 822 union ccb *ccb; 823 struct scsi_inquiry_data *inq_buf; 824 | 767 768SBP_DEBUG(0) 769 sbp_show_sdev_info(sdev, 2); 770 printf("sbp_cam_scan_lun\n"); 771END_DEBUG 772 xpt_setup_ccb(&ccb->ccb_h, sdev->path, 5/*priority (low)*/); 773 ccb->ccb_h.func_code = XPT_SCAN_LUN; 774 ccb->ccb_h.cbfcnp = sbp_cam_callback; --- 42 unchanged lines hidden (view full) --- 817 * e.g. Maxtor 3000XT, Yano A-dish. 818 */ 819static void 820sbp_ping_unit(struct sbp_dev *sdev) 821{ 822 union ccb *ccb; 823 struct scsi_inquiry_data *inq_buf; 824 |
825 ccb = malloc(sizeof(union ccb), M_SBP, M_WAITOK | M_ZERO); | 825 ccb = malloc(sizeof(union ccb), M_SBP, M_ZERO); |
826 inq_buf = (struct scsi_inquiry_data *) | 826 inq_buf = (struct scsi_inquiry_data *) |
827 malloc(sizeof(*inq_buf), M_SBP, M_WAITOK); | 827 malloc(sizeof(*inq_buf), M_SBP, 0); |
828 829SBP_DEBUG(1) 830 sbp_show_sdev_info(sdev, 2); 831 printf("sbp_ping_unit\n"); 832END_DEBUG 833 834 /* 835 * We need to execute this command before any other queued command. --- 1433 unchanged lines hidden --- | 828 829SBP_DEBUG(1) 830 sbp_show_sdev_info(sdev, 2); 831 printf("sbp_ping_unit\n"); 832END_DEBUG 833 834 /* 835 * We need to execute this command before any other queued command. --- 1433 unchanged lines hidden --- |