Deleted Added
full compact
scsi_xpt.c (295417) scsi_xpt.c (298431)
1/*-
2 * Implementation of the SCSI Transport
3 *
4 * Copyright (c) 1997, 1998, 1999 Justin T. Gibbs.
5 * Copyright (c) 1997, 1998, 1999 Kenneth D. Merry.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
1/*-
2 * Implementation of the SCSI Transport
3 *
4 * Copyright (c) 1997, 1998, 1999 Justin T. Gibbs.
5 * Copyright (c) 1997, 1998, 1999 Kenneth D. Merry.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_xpt.c 295417 2016-02-08 22:13:08Z ken $");
31__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_xpt.c 298431 2016-04-21 19:40:10Z pfg $");
32
33#include <sys/param.h>
34#include <sys/bus.h>
35#include <sys/systm.h>
36#include <sys/types.h>
37#include <sys/malloc.h>
38#include <sys/kernel.h>
39#include <sys/time.h>

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

551 {
552 T_ANY, SIP_MEDIA_REMOVABLE|SIP_MEDIA_FIXED,
553 /*vendor*/"*", /*product*/"*", /*revision*/"*"
554 },
555 /*quirks*/0, /*mintags*/2, /*maxtags*/255
556 },
557};
558
32
33#include <sys/param.h>
34#include <sys/bus.h>
35#include <sys/systm.h>
36#include <sys/types.h>
37#include <sys/malloc.h>
38#include <sys/kernel.h>
39#include <sys/time.h>

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

551 {
552 T_ANY, SIP_MEDIA_REMOVABLE|SIP_MEDIA_FIXED,
553 /*vendor*/"*", /*product*/"*", /*revision*/"*"
554 },
555 /*quirks*/0, /*mintags*/2, /*maxtags*/255
556 },
557};
558
559static const int scsi_quirk_table_size =
560 sizeof(scsi_quirk_table) / sizeof(*scsi_quirk_table);
559static const int scsi_quirk_table_size = nitems(scsi_quirk_table);
561
562static cam_status proberegister(struct cam_periph *periph,
563 void *arg);
564static void probeschedule(struct cam_periph *probe_periph);
565static void probestart(struct cam_periph *periph, union ccb *start_ccb);
566static void proberequestdefaultnegotiation(struct cam_periph *periph);
567static int proberequestbackoff(struct cam_periph *periph,
568 struct cam_ed *device);

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

1843static void
1844scsi_find_quirk(struct cam_ed *device)
1845{
1846 struct scsi_quirk_entry *quirk;
1847 caddr_t match;
1848
1849 match = cam_quirkmatch((caddr_t)&device->inq_data,
1850 (caddr_t)scsi_quirk_table,
560
561static cam_status proberegister(struct cam_periph *periph,
562 void *arg);
563static void probeschedule(struct cam_periph *probe_periph);
564static void probestart(struct cam_periph *periph, union ccb *start_ccb);
565static void proberequestdefaultnegotiation(struct cam_periph *periph);
566static int proberequestbackoff(struct cam_periph *periph,
567 struct cam_ed *device);

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

1842static void
1843scsi_find_quirk(struct cam_ed *device)
1844{
1845 struct scsi_quirk_entry *quirk;
1846 caddr_t match;
1847
1848 match = cam_quirkmatch((caddr_t)&device->inq_data,
1849 (caddr_t)scsi_quirk_table,
1851 sizeof(scsi_quirk_table) /
1852 sizeof(*scsi_quirk_table),
1850 nitems(scsi_quirk_table),
1853 sizeof(*scsi_quirk_table), scsi_inquiry_match);
1854
1855 if (match == NULL)
1856 panic("xpt_find_quirk: device didn't match wildcard entry!!");
1857
1858 quirk = (struct scsi_quirk_entry *)match;
1859 device->quirk = quirk;
1860 device->mintags = quirk->mintags;

--- 1226 unchanged lines hidden ---
1851 sizeof(*scsi_quirk_table), scsi_inquiry_match);
1852
1853 if (match == NULL)
1854 panic("xpt_find_quirk: device didn't match wildcard entry!!");
1855
1856 quirk = (struct scsi_quirk_entry *)match;
1857 device->quirk = quirk;
1858 device->mintags = quirk->mintags;

--- 1226 unchanged lines hidden ---