Deleted Added
full compact
scsi_cd.c (289138) scsi_cd.c (298431)
1/*-
2 * Copyright (c) 1997 Justin T. Gibbs.
3 * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Kenneth D. Merry.
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:

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

41 * functioning of this software in any circumstances.
42 *
43 * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
44 *
45 * from: cd.c,v 1.83 1997/05/04 15:24:22 joerg Exp $
46 */
47
48#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1997 Justin T. Gibbs.
3 * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Kenneth D. Merry.
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:

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

41 * functioning of this software in any circumstances.
42 *
43 * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
44 *
45 * from: cd.c,v 1.83 1997/05/04 15:24:22 joerg Exp $
46 */
47
48#include <sys/cdefs.h>
49__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_cd.c 289138 2015-10-11 13:48:20Z mav $");
49__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_cd.c 298431 2016-04-21 19:40:10Z pfg $");
50
51#include "opt_cd.h"
52
53#include <sys/param.h>
54#include <sys/systm.h>
55#include <sys/kernel.h>
56#include <sys/bio.h>
57#include <sys/conf.h>

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

573 periph->softc = softc;
574 softc->periph = periph;
575
576 /*
577 * See if this device has any quirks.
578 */
579 match = cam_quirkmatch((caddr_t)&cgd->inq_data,
580 (caddr_t)cd_quirk_table,
50
51#include "opt_cd.h"
52
53#include <sys/param.h>
54#include <sys/systm.h>
55#include <sys/kernel.h>
56#include <sys/bio.h>
57#include <sys/conf.h>

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

573 periph->softc = softc;
574 softc->periph = periph;
575
576 /*
577 * See if this device has any quirks.
578 */
579 match = cam_quirkmatch((caddr_t)&cgd->inq_data,
580 (caddr_t)cd_quirk_table,
581 sizeof(cd_quirk_table)/sizeof(*cd_quirk_table),
581 nitems(cd_quirk_table),
582 sizeof(*cd_quirk_table), scsi_inquiry_match);
583
584 if (match != NULL)
585 softc->quirks = ((struct cd_quirk_entry *)match)->quirks;
586 else
587 softc->quirks = CD_Q_NONE;
588
589 /* Check if the SIM does not want 6 byte commands */

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

1261 return (page);
1262}
1263
1264static int
1265cdgetpagesize(int page_num)
1266{
1267 int i;
1268
582 sizeof(*cd_quirk_table), scsi_inquiry_match);
583
584 if (match != NULL)
585 softc->quirks = ((struct cd_quirk_entry *)match)->quirks;
586 else
587 softc->quirks = CD_Q_NONE;
588
589 /* Check if the SIM does not want 6 byte commands */

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

1261 return (page);
1262}
1263
1264static int
1265cdgetpagesize(int page_num)
1266{
1267 int i;
1268
1269 for (i = 0; i < (sizeof(cd_page_size_table)/
1270 sizeof(cd_page_size_table[0])); i++) {
1269 for (i = 0; i < nitems(cd_page_size_table); i++) {
1271 if (cd_page_size_table[i].page == page_num)
1272 return (cd_page_size_table[i].page_size);
1273 }
1274
1275 return (-1);
1276}
1277
1278static int

--- 2441 unchanged lines hidden ---
1270 if (cd_page_size_table[i].page == page_num)
1271 return (cd_page_size_table[i].page_size);
1272 }
1273
1274 return (-1);
1275}
1276
1277static int

--- 2441 unchanged lines hidden ---