aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r--drivers/scsi/scsi_lib.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 3ff538809786..19ac888001e6 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -951,16 +951,16 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes,
951 return; 951 return;
952 } 952 }
953 if (!(req->flags & REQ_QUIET)) 953 if (!(req->flags & REQ_QUIET))
954 dev_printk(KERN_INFO, 954 sdev_printk(KERN_INFO,
955 &cmd->device->sdev_gendev, 955 cmd->device,
956 "Device not ready.\n"); 956 "Device not ready.\n");
957 scsi_end_request(cmd, 0, this_count, 1); 957 scsi_end_request(cmd, 0, this_count, 1);
958 return; 958 return;
959 case VOLUME_OVERFLOW: 959 case VOLUME_OVERFLOW:
960 if (!(req->flags & REQ_QUIET)) { 960 if (!(req->flags & REQ_QUIET)) {
961 dev_printk(KERN_INFO, 961 sdev_printk(KERN_INFO,
962 &cmd->device->sdev_gendev, 962 cmd->device,
963 "Volume overflow, CDB: "); 963 "Volume overflow, CDB: ");
964 __scsi_print_command(cmd->data_cmnd); 964 __scsi_print_command(cmd->data_cmnd);
965 scsi_print_sense("", cmd); 965 scsi_print_sense("", cmd);
966 } 966 }
@@ -981,8 +981,9 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes,
981 } 981 }
982 if (result) { 982 if (result) {
983 if (!(req->flags & REQ_QUIET)) { 983 if (!(req->flags & REQ_QUIET)) {
984 dev_printk(KERN_INFO, &cmd->device->sdev_gendev, 984 sdev_printk(KERN_INFO, cmd->device,
985 "SCSI error: return code = 0x%x\n", result); 985 "SCSI error: return code = 0x%x\n",
986 result);
986 987
987 if (driver_byte(result) & DRIVER_SENSE) 988 if (driver_byte(result) & DRIVER_SENSE)
988 scsi_print_sense("", cmd); 989 scsi_print_sense("", cmd);
@@ -1141,8 +1142,8 @@ static int scsi_prep_fn(struct request_queue *q, struct request *req)
1141 * online before trying any recovery commands 1142 * online before trying any recovery commands
1142 */ 1143 */
1143 if (unlikely(!scsi_device_online(sdev))) { 1144 if (unlikely(!scsi_device_online(sdev))) {
1144 printk(KERN_ERR "scsi%d (%d:%d): rejecting I/O to offline device\n", 1145 sdev_printk(KERN_ERR, sdev,
1145 sdev->host->host_no, sdev->id, sdev->lun); 1146 "rejecting I/O to offline device\n");
1146 goto kill; 1147 goto kill;
1147 } 1148 }
1148 if (unlikely(sdev->sdev_state != SDEV_RUNNING)) { 1149 if (unlikely(sdev->sdev_state != SDEV_RUNNING)) {
@@ -1151,8 +1152,8 @@ static int scsi_prep_fn(struct request_queue *q, struct request *req)
1151 if (sdev->sdev_state == SDEV_DEL) { 1152 if (sdev->sdev_state == SDEV_DEL) {
1152 /* Device is fully deleted, no commands 1153 /* Device is fully deleted, no commands
1153 * at all allowed down */ 1154 * at all allowed down */
1154 printk(KERN_ERR "scsi%d (%d:%d): rejecting I/O to dead device\n", 1155 sdev_printk(KERN_ERR, sdev,
1155 sdev->host->host_no, sdev->id, sdev->lun); 1156 "rejecting I/O to dead device\n");
1156 goto kill; 1157 goto kill;
1157 } 1158 }
1158 /* OK, we only allow special commands (i.e. not 1159 /* OK, we only allow special commands (i.e. not
@@ -1187,8 +1188,8 @@ static int scsi_prep_fn(struct request_queue *q, struct request *req)
1187 specials_only == SDEV_BLOCK) 1188 specials_only == SDEV_BLOCK)
1188 goto defer; 1189 goto defer;
1189 1190
1190 printk(KERN_ERR "scsi%d (%d:%d): rejecting I/O to device being removed\n", 1191 sdev_printk(KERN_ERR, sdev,
1191 sdev->host->host_no, sdev->id, sdev->lun); 1192 "rejecting I/O to device being removed\n");
1192 goto kill; 1193 goto kill;
1193 } 1194 }
1194 1195
@@ -1315,9 +1316,8 @@ static inline int scsi_dev_queue_ready(struct request_queue *q,
1315 */ 1316 */
1316 if (--sdev->device_blocked == 0) { 1317 if (--sdev->device_blocked == 0) {
1317 SCSI_LOG_MLQUEUE(3, 1318 SCSI_LOG_MLQUEUE(3,
1318 printk("scsi%d (%d:%d) unblocking device at" 1319 sdev_printk(KERN_INFO, sdev,
1319 " zero depth\n", sdev->host->host_no, 1320 "unblocking device at zero depth\n"));
1320 sdev->id, sdev->lun));
1321 } else { 1321 } else {
1322 blk_plug_device(q); 1322 blk_plug_device(q);
1323 return 0; 1323 return 0;
@@ -1436,8 +1436,8 @@ static void scsi_request_fn(struct request_queue *q)
1436 break; 1436 break;
1437 1437
1438 if (unlikely(!scsi_device_online(sdev))) { 1438 if (unlikely(!scsi_device_online(sdev))) {
1439 printk(KERN_ERR "scsi%d (%d:%d): rejecting I/O to offline device\n", 1439 sdev_printk(KERN_ERR, sdev,
1440 sdev->host->host_no, sdev->id, sdev->lun); 1440 "rejecting I/O to offline device\n");
1441 scsi_kill_request(req, q); 1441 scsi_kill_request(req, q);
1442 continue; 1442 continue;
1443 } 1443 }
@@ -1893,10 +1893,10 @@ scsi_device_set_state(struct scsi_device *sdev, enum scsi_device_state state)
1893 1893
1894 illegal: 1894 illegal:
1895 SCSI_LOG_ERROR_RECOVERY(1, 1895 SCSI_LOG_ERROR_RECOVERY(1,
1896 dev_printk(KERN_ERR, &sdev->sdev_gendev, 1896 sdev_printk(KERN_ERR, sdev,
1897 "Illegal state transition %s->%s\n", 1897 "Illegal state transition %s->%s\n",
1898 scsi_device_state_name(oldstate), 1898 scsi_device_state_name(oldstate),
1899 scsi_device_state_name(state)) 1899 scsi_device_state_name(state))
1900 ); 1900 );
1901 return -EINVAL; 1901 return -EINVAL;
1902} 1902}