scsi_sa.c (229288) | scsi_sa.c (236712) |
---|---|
1/*- 2 * Implementation of SCSI Sequential Access Peripheral driver for CAM. 3 * 4 * Copyright (c) 1999, 2000 Matthew Jacob 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 13 unchanged lines hidden (view full) --- 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> | 1/*- 2 * Implementation of SCSI Sequential Access Peripheral driver for CAM. 3 * 4 * Copyright (c) 1999, 2000 Matthew Jacob 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 13 unchanged lines hidden (view full) --- 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_sa.c 229288 2012-01-02 17:02:45Z mav $"); | 30__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_sa.c 236712 2012-06-07 10:05:51Z mav $"); |
31 32#include <sys/param.h> 33#include <sys/queue.h> 34#ifdef _KERNEL 35#include <sys/systm.h> 36#include <sys/kernel.h> 37#endif 38#include <sys/types.h> --- 1438 unchanged lines hidden (view full) --- 1477 (caddr_t)sa_quirk_table, 1478 sizeof(sa_quirk_table)/sizeof(*sa_quirk_table), 1479 sizeof(*sa_quirk_table), scsi_inquiry_match); 1480 1481 if (match != NULL) { 1482 softc->quirks = ((struct sa_quirk_entry *)match)->quirks; 1483 softc->last_media_blksize = 1484 ((struct sa_quirk_entry *)match)->prefblk; | 31 32#include <sys/param.h> 33#include <sys/queue.h> 34#ifdef _KERNEL 35#include <sys/systm.h> 36#include <sys/kernel.h> 37#endif 38#include <sys/types.h> --- 1438 unchanged lines hidden (view full) --- 1477 (caddr_t)sa_quirk_table, 1478 sizeof(sa_quirk_table)/sizeof(*sa_quirk_table), 1479 sizeof(*sa_quirk_table), scsi_inquiry_match); 1480 1481 if (match != NULL) { 1482 softc->quirks = ((struct sa_quirk_entry *)match)->quirks; 1483 softc->last_media_blksize = 1484 ((struct sa_quirk_entry *)match)->prefblk; |
1485#ifdef CAMDEBUG 1486 xpt_print(periph->path, "found quirk entry %d\n", 1487 (int) (((struct sa_quirk_entry *) match) - sa_quirk_table)); 1488#endif | |
1489 } else 1490 softc->quirks = SA_QUIRK_NONE; 1491 1492 bzero(&cpi, sizeof(cpi)); 1493 xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL); 1494 cpi.ccb_h.func_code = XPT_PATH_INQ; 1495 xpt_action((union ccb *)&cpi); 1496 --- 296 unchanged lines hidden (view full) --- 1793 } 1794 } 1795 /* 1796 * If we had an error (immediate or pending), 1797 * release the device queue now. 1798 */ 1799 if (error || (softc->flags & SA_FLAG_ERR_PENDING)) 1800 cam_release_devq(done_ccb->ccb_h.path, 0, 0, 0, 0); | 1485 } else 1486 softc->quirks = SA_QUIRK_NONE; 1487 1488 bzero(&cpi, sizeof(cpi)); 1489 xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL); 1490 cpi.ccb_h.func_code = XPT_PATH_INQ; 1491 xpt_action((union ccb *)&cpi); 1492 --- 296 unchanged lines hidden (view full) --- 1789 } 1790 } 1791 /* 1792 * If we had an error (immediate or pending), 1793 * release the device queue now. 1794 */ 1795 if (error || (softc->flags & SA_FLAG_ERR_PENDING)) 1796 cam_release_devq(done_ccb->ccb_h.path, 0, 0, 0, 0); |
1801#ifdef CAMDEBUG | |
1802 if (error || bp->bio_resid) { 1803 CAM_DEBUG(periph->path, CAM_DEBUG_INFO, 1804 ("error %d resid %ld count %ld\n", error, 1805 bp->bio_resid, bp->bio_bcount)); 1806 } | 1797 if (error || bp->bio_resid) { 1798 CAM_DEBUG(periph->path, CAM_DEBUG_INFO, 1799 ("error %d resid %ld count %ld\n", error, 1800 bp->bio_resid, bp->bio_bcount)); 1801 } |
1807#endif | |
1808 biofinish(bp, softc->device_stats, 0); 1809 break; 1810 } 1811 case SA_CCB_WAITING: 1812 { 1813 /* Caller will release the CCB */ 1814 wakeup(&done_ccb->ccb_h.cbfcnp); 1815 return; --- 1810 unchanged lines hidden --- | 1802 biofinish(bp, softc->device_stats, 0); 1803 break; 1804 } 1805 case SA_CCB_WAITING: 1806 { 1807 /* Caller will release the CCB */ 1808 wakeup(&done_ccb->ccb_h.cbfcnp); 1809 return; --- 1810 unchanged lines hidden --- |