ctl_error.c (287774) | ctl_error.c (287912) |
---|---|
1/*- 2 * Copyright (c) 2003-2009 Silicon Graphics International Corp. 3 * Copyright (c) 2011 Spectra Logic Corporation 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: --- 23 unchanged lines hidden (view full) --- 32 */ 33/* 34 * CAM Target Layer error reporting routines. 35 * 36 * Author: Ken Merry <ken@FreeBSD.org> 37 */ 38 39#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2003-2009 Silicon Graphics International Corp. 3 * Copyright (c) 2011 Spectra Logic Corporation 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: --- 23 unchanged lines hidden (view full) --- 32 */ 33/* 34 * CAM Target Layer error reporting routines. 35 * 36 * Author: Ken Merry <ken@FreeBSD.org> 37 */ 38 39#include <sys/cdefs.h> |
40__FBSDID("$FreeBSD: head/sys/cam/ctl/ctl_error.c 287774 2015-09-14 08:01:05Z mav $"); | 40__FBSDID("$FreeBSD: head/sys/cam/ctl/ctl_error.c 287912 2015-09-17 12:52:18Z mav $"); |
41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/kernel.h> 45#include <sys/types.h> 46#include <sys/malloc.h> 47#include <sys/lock.h> 48#include <sys/mutex.h> --- 632 unchanged lines hidden (view full) --- 681 /*ascq*/ 0x00, 682 /*type*/ (sks_valid != 0) ? SSD_ELEM_SKS : SSD_ELEM_SKIP, 683 /*size*/ sizeof(sks), 684 /*data*/ sks, 685 SSD_ELEM_NONE); 686} 687 688void | 41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/kernel.h> 45#include <sys/types.h> 46#include <sys/malloc.h> 47#include <sys/lock.h> 48#include <sys/mutex.h> --- 632 unchanged lines hidden (view full) --- 681 /*ascq*/ 0x00, 682 /*type*/ (sks_valid != 0) ? SSD_ELEM_SKS : SSD_ELEM_SKIP, 683 /*size*/ sizeof(sks), 684 /*data*/ sks, 685 SSD_ELEM_NONE); 686} 687 688void |
689ctl_set_medium_error(struct ctl_scsiio *ctsio) | 689ctl_set_medium_error(struct ctl_scsiio *ctsio, int read) |
690{ | 690{ |
691 if ((ctsio->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_IN) { | 691 if (read) { |
692 /* "Unrecovered read error" */ 693 ctl_set_sense(ctsio, 694 /*current_error*/ 1, 695 /*sense_key*/ SSD_KEY_MEDIUM_ERROR, 696 /*asc*/ 0x11, 697 /*ascq*/ 0x00, 698 SSD_ELEM_NONE); 699 } else { --- 224 unchanged lines hidden --- | 692 /* "Unrecovered read error" */ 693 ctl_set_sense(ctsio, 694 /*current_error*/ 1, 695 /*sense_key*/ SSD_KEY_MEDIUM_ERROR, 696 /*asc*/ 0x11, 697 /*ascq*/ 0x00, 698 SSD_ELEM_NONE); 699 } else { --- 224 unchanged lines hidden --- |