Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5f73ce3 authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Christoph Hellwig
Browse files

scsi: use dev_printk() variants for ioctl

parent b30d8bca
Loading
Loading
Loading
Loading
+11 −6
Original line number Original line Diff line number Diff line
@@ -91,12 +91,14 @@ static int ioctl_internal_command(struct scsi_device *sdev, char *cmd,
	int result;
	int result;
	struct scsi_sense_hdr sshdr;
	struct scsi_sense_hdr sshdr;


	SCSI_LOG_IOCTL(1, printk("Trying ioctl with scsi command %d\n", *cmd));
	SCSI_LOG_IOCTL(1, sdev_printk(KERN_INFO, sdev,
				      "Trying ioctl with scsi command %d\n", *cmd));


	result = scsi_execute_req(sdev, cmd, DMA_NONE, NULL, 0,
	result = scsi_execute_req(sdev, cmd, DMA_NONE, NULL, 0,
				  &sshdr, timeout, retries, NULL);
				  &sshdr, timeout, retries, NULL);


	SCSI_LOG_IOCTL(2, printk("Ioctl returned  0x%x\n", result));
	SCSI_LOG_IOCTL(2, sdev_printk(KERN_INFO, sdev,
				      "Ioctl returned  0x%x\n", result));


	if ((driver_byte(result) & DRIVER_SENSE) &&
	if ((driver_byte(result) & DRIVER_SENSE) &&
	    (scsi_sense_valid(&sshdr))) {
	    (scsi_sense_valid(&sshdr))) {
@@ -105,8 +107,10 @@ static int ioctl_internal_command(struct scsi_device *sdev, char *cmd,
			if (cmd[0] == ALLOW_MEDIUM_REMOVAL)
			if (cmd[0] == ALLOW_MEDIUM_REMOVAL)
				sdev->lockable = 0;
				sdev->lockable = 0;
			else
			else
				printk(KERN_INFO "ioctl_internal_command: "
				sdev_printk(KERN_INFO, sdev,
				       "ILLEGAL REQUEST asc=0x%x ascq=0x%x\n",
					    "ioctl_internal_command: "
					    "ILLEGAL REQUEST "
					    "asc=0x%x ascq=0x%x\n",
					    sshdr.asc, sshdr.ascq);
					    sshdr.asc, sshdr.ascq);
			break;
			break;
		case NOT_READY:	/* This happens if there is no disc in drive */
		case NOT_READY:	/* This happens if there is no disc in drive */
@@ -127,7 +131,8 @@ static int ioctl_internal_command(struct scsi_device *sdev, char *cmd,
		}
		}
	}
	}


	SCSI_LOG_IOCTL(2, printk("IOCTL Releasing command\n"));
	SCSI_LOG_IOCTL(2, sdev_printk(KERN_INFO, sdev,
				      "IOCTL Releasing command\n"));
	return result;
	return result;
}
}