Deleted Added
full compact
scsi_da.c (44502) scsi_da.c (46581)
1/*
2 * Implementation of SCSI Direct Access Peripheral driver for CAM.
3 *
4 * Copyright (c) 1997 Justin T. Gibbs.
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

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

20 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
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 *
1/*
2 * Implementation of SCSI Direct Access Peripheral driver for CAM.
3 *
4 * Copyright (c) 1997 Justin T. Gibbs.
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

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

20 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
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 * $Id: scsi_da.c,v 1.20 1999/02/10 00:03:15 ken Exp $
28 * $Id: scsi_da.c,v 1.21 1999/03/05 23:20:20 gibbs Exp $
29 */
30
31#include "opt_hw_wdog.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/kernel.h>
36#include <sys/buf.h>

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

1376
1377 if (have_sense) {
1378 sense = &csio->sense_data;
1379 scsi_extract_sense(sense, &error_code,
1380 &sense_key,
1381 &asc, &ascq);
1382 }
1383 /*
29 */
30
31#include "opt_hw_wdog.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/kernel.h>
36#include <sys/buf.h>

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

1376
1377 if (have_sense) {
1378 sense = &csio->sense_data;
1379 scsi_extract_sense(sense, &error_code,
1380 &sense_key,
1381 &asc, &ascq);
1382 }
1383 /*
1384 * With removable media devices, we expect
1385 * 0x3a (Medium not present) errors, since not
1386 * everyone leaves a disk in the drive. If
1387 * the error is anything else, though, we
1388 * shouldn't attach.
1384 * Attach to anything that claims to be a
1385 * direct access or optical disk device,
1386 * as long as it doesn't return a "Logical
1387 * unit not supported" (0x25) error.
1389 */
1388 */
1390 if ((have_sense) && (asc == 0x3a)
1389 if ((have_sense) && (asc != 0x25)
1391 && (error_code == SSD_CURRENT_ERROR))
1392 snprintf(announce_buf,
1393 sizeof(announce_buf),
1394 "Attempt to query device "
1395 "size failed: %s, %s",
1396 scsi_sense_key_text[sense_key],
1397 scsi_sense_desc(asc,ascq,
1398 &cgd.inq_data));

--- 235 unchanged lines hidden ---
1390 && (error_code == SSD_CURRENT_ERROR))
1391 snprintf(announce_buf,
1392 sizeof(announce_buf),
1393 "Attempt to query device "
1394 "size failed: %s, %s",
1395 scsi_sense_key_text[sense_key],
1396 scsi_sense_desc(asc,ascq,
1397 &cgd.inq_data));

--- 235 unchanged lines hidden ---