scsi: ata: Use unsigned int for cmd's type in ioctls in scsi_host_template
Clang warns several times in the scsi subsystem (trimmed for brevity): drivers/scsi/hpsa.c:6209:7: warning: overflow converting case value to switch condition type (2147762695 to 18446744071562347015) [-Wswitch] case CCISS_GETBUSTYPES: ^ drivers/scsi/hpsa.c:6208:7: warning: overflow converting case value to switch condition type (2147762694 to 18446744071562347014) [-Wswitch] case CCISS_GETHEARTBEAT: ^ The root cause is that the _IOC macro can generate really large numbers, which don't fit into type 'int', which is used for the cmd parameter in the ioctls in scsi_host_template. My research into how GCC and Clang are handling this at a low level didn't prove fruitful. However, looking at the rest of the kernel tree, all ioctls use an 'unsigned int' for the cmd parameter, which will fit all of the _IOC values in the scsi/ata subsystems. Make that change because none of the ioctls expect a negative value for any command, it brings the ioctls inline with the reset of the kernel, and it removes ambiguity, which is never good when dealing with compilers. Link: https://github.com/ClangBuiltLinux/linux/issues/85 Link: https://github.com/ClangBuiltLinux/linux/issues/154 Link: https://github.com/ClangBuiltLinux/linux/issues/157 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Acked-by: Bradley Grove <bgrove@attotech.com> Acked-by: Don Brace <don.brace@microsemi.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Tested-by: Nick Desaulniers <ndesaulniers@google.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
42fb055a57
commit
6f4e626fb0
|
@ -778,7 +778,7 @@ static int ata_ioc32(struct ata_port *ap)
|
||||||
}
|
}
|
||||||
|
|
||||||
int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *scsidev,
|
int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *scsidev,
|
||||||
int cmd, void __user *arg)
|
unsigned int cmd, void __user *arg)
|
||||||
{
|
{
|
||||||
unsigned long val;
|
unsigned long val;
|
||||||
int rc = -EINVAL;
|
int rc = -EINVAL;
|
||||||
|
@ -829,7 +829,8 @@ int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *scsidev,
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(ata_sas_scsi_ioctl);
|
EXPORT_SYMBOL_GPL(ata_sas_scsi_ioctl);
|
||||||
|
|
||||||
int ata_scsi_ioctl(struct scsi_device *scsidev, int cmd, void __user *arg)
|
int ata_scsi_ioctl(struct scsi_device *scsidev, unsigned int cmd,
|
||||||
|
void __user *arg)
|
||||||
{
|
{
|
||||||
return ata_sas_scsi_ioctl(ata_shost_to_port(scsidev->host),
|
return ata_sas_scsi_ioctl(ata_shost_to_port(scsidev->host),
|
||||||
scsidev, cmd, arg);
|
scsidev, cmd, arg);
|
||||||
|
|
|
@ -3455,7 +3455,7 @@ static int delete_disk(struct aac_dev *dev, void __user *arg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int aac_dev_ioctl(struct aac_dev *dev, int cmd, void __user *arg)
|
int aac_dev_ioctl(struct aac_dev *dev, unsigned int cmd, void __user *arg)
|
||||||
{
|
{
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case FSACTL_QUERY_DISK:
|
case FSACTL_QUERY_DISK:
|
||||||
|
|
|
@ -2706,12 +2706,12 @@ void aac_set_intx_mode(struct aac_dev *dev);
|
||||||
int aac_get_config_status(struct aac_dev *dev, int commit_flag);
|
int aac_get_config_status(struct aac_dev *dev, int commit_flag);
|
||||||
int aac_get_containers(struct aac_dev *dev);
|
int aac_get_containers(struct aac_dev *dev);
|
||||||
int aac_scsi_cmd(struct scsi_cmnd *cmd);
|
int aac_scsi_cmd(struct scsi_cmnd *cmd);
|
||||||
int aac_dev_ioctl(struct aac_dev *dev, int cmd, void __user *arg);
|
int aac_dev_ioctl(struct aac_dev *dev, unsigned int cmd, void __user *arg);
|
||||||
#ifndef shost_to_class
|
#ifndef shost_to_class
|
||||||
#define shost_to_class(shost) &shost->shost_dev
|
#define shost_to_class(shost) &shost->shost_dev
|
||||||
#endif
|
#endif
|
||||||
ssize_t aac_get_serial_number(struct device *dev, char *buf);
|
ssize_t aac_get_serial_number(struct device *dev, char *buf);
|
||||||
int aac_do_ioctl(struct aac_dev * dev, int cmd, void __user *arg);
|
int aac_do_ioctl(struct aac_dev *dev, unsigned int cmd, void __user *arg);
|
||||||
int aac_rx_init(struct aac_dev *dev);
|
int aac_rx_init(struct aac_dev *dev);
|
||||||
int aac_rkt_init(struct aac_dev *dev);
|
int aac_rkt_init(struct aac_dev *dev);
|
||||||
int aac_nark_init(struct aac_dev *dev);
|
int aac_nark_init(struct aac_dev *dev);
|
||||||
|
|
|
@ -1060,7 +1060,7 @@ static int aac_send_reset_adapter(struct aac_dev *dev, void __user *arg)
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
int aac_do_ioctl(struct aac_dev * dev, int cmd, void __user *arg)
|
int aac_do_ioctl(struct aac_dev *dev, unsigned int cmd, void __user *arg)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
|
|
|
@ -616,7 +616,8 @@ static struct device_attribute *aac_dev_attrs[] = {
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int aac_ioctl(struct scsi_device *sdev, int cmd, void __user * arg)
|
static int aac_ioctl(struct scsi_device *sdev, unsigned int cmd,
|
||||||
|
void __user *arg)
|
||||||
{
|
{
|
||||||
struct aac_dev *dev = (struct aac_dev *)sdev->host->hostdata;
|
struct aac_dev *dev = (struct aac_dev *)sdev->host->hostdata;
|
||||||
if (!capable(CAP_SYS_RAWIO))
|
if (!capable(CAP_SYS_RAWIO))
|
||||||
|
@ -1205,7 +1206,8 @@ static long aac_compat_do_ioctl(struct aac_dev *dev, unsigned cmd, unsigned long
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int aac_compat_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)
|
static int aac_compat_ioctl(struct scsi_device *sdev, unsigned int cmd,
|
||||||
|
void __user *arg)
|
||||||
{
|
{
|
||||||
struct aac_dev *dev = (struct aac_dev *)sdev->host->hostdata;
|
struct aac_dev *dev = (struct aac_dev *)sdev->host->hostdata;
|
||||||
if (!capable(CAP_SYS_RAWIO))
|
if (!capable(CAP_SYS_RAWIO))
|
||||||
|
|
|
@ -334,7 +334,8 @@ int cxlflash_afu_sync(struct afu *afu, ctx_hndl_t c, res_hndl_t r, u8 mode);
|
||||||
void cxlflash_list_init(void);
|
void cxlflash_list_init(void);
|
||||||
void cxlflash_term_global_luns(void);
|
void cxlflash_term_global_luns(void);
|
||||||
void cxlflash_free_errpage(void);
|
void cxlflash_free_errpage(void);
|
||||||
int cxlflash_ioctl(struct scsi_device *sdev, int cmd, void __user *arg);
|
int cxlflash_ioctl(struct scsi_device *sdev, unsigned int cmd,
|
||||||
|
void __user *arg);
|
||||||
void cxlflash_stop_term_user_contexts(struct cxlflash_cfg *cfg);
|
void cxlflash_stop_term_user_contexts(struct cxlflash_cfg *cfg);
|
||||||
int cxlflash_mark_contexts_error(struct cxlflash_cfg *cfg);
|
int cxlflash_mark_contexts_error(struct cxlflash_cfg *cfg);
|
||||||
void cxlflash_term_local_luns(struct cxlflash_cfg *cfg);
|
void cxlflash_term_local_luns(struct cxlflash_cfg *cfg);
|
||||||
|
|
|
@ -3282,7 +3282,7 @@ static int cxlflash_chr_open(struct inode *inode, struct file *file)
|
||||||
*
|
*
|
||||||
* Return: A string identifying the decoded host ioctl.
|
* Return: A string identifying the decoded host ioctl.
|
||||||
*/
|
*/
|
||||||
static char *decode_hioctl(int cmd)
|
static char *decode_hioctl(unsigned int cmd)
|
||||||
{
|
{
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case HT_CXLFLASH_LUN_PROVISION:
|
case HT_CXLFLASH_LUN_PROVISION:
|
||||||
|
|
|
@ -1924,7 +1924,7 @@ out:
|
||||||
*
|
*
|
||||||
* Return: A string identifying the decoded ioctl.
|
* Return: A string identifying the decoded ioctl.
|
||||||
*/
|
*/
|
||||||
static char *decode_ioctl(int cmd)
|
static char *decode_ioctl(unsigned int cmd)
|
||||||
{
|
{
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case DK_CXLFLASH_ATTACH:
|
case DK_CXLFLASH_ATTACH:
|
||||||
|
@ -2051,7 +2051,7 @@ err1:
|
||||||
*
|
*
|
||||||
* Return: 0 on success, -errno on failure
|
* Return: 0 on success, -errno on failure
|
||||||
*/
|
*/
|
||||||
static int ioctl_common(struct scsi_device *sdev, int cmd)
|
static int ioctl_common(struct scsi_device *sdev, unsigned int cmd)
|
||||||
{
|
{
|
||||||
struct cxlflash_cfg *cfg = shost_priv(sdev->host);
|
struct cxlflash_cfg *cfg = shost_priv(sdev->host);
|
||||||
struct device *dev = &cfg->dev->dev;
|
struct device *dev = &cfg->dev->dev;
|
||||||
|
@ -2096,7 +2096,7 @@ out:
|
||||||
*
|
*
|
||||||
* Return: 0 on success, -errno on failure
|
* Return: 0 on success, -errno on failure
|
||||||
*/
|
*/
|
||||||
int cxlflash_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)
|
int cxlflash_ioctl(struct scsi_device *sdev, unsigned int cmd, void __user *arg)
|
||||||
{
|
{
|
||||||
typedef int (*sioctl) (struct scsi_device *, void *);
|
typedef int (*sioctl) (struct scsi_device *, void *);
|
||||||
|
|
||||||
|
@ -2179,8 +2179,7 @@ int cxlflash_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unlikely(copy_from_user(&buf, arg, size))) {
|
if (unlikely(copy_from_user(&buf, arg, size))) {
|
||||||
dev_err(dev, "%s: copy_from_user() fail "
|
dev_err(dev, "%s: copy_from_user() fail size=%lu cmd=%u (%s) arg=%p\n",
|
||||||
"size=%lu cmd=%d (%s) arg=%p\n",
|
|
||||||
__func__, size, cmd, decode_ioctl(cmd), arg);
|
__func__, size, cmd, decode_ioctl(cmd), arg);
|
||||||
rc = -EFAULT;
|
rc = -EFAULT;
|
||||||
goto cxlflash_ioctl_exit;
|
goto cxlflash_ioctl_exit;
|
||||||
|
@ -2203,8 +2202,7 @@ int cxlflash_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)
|
||||||
rc = do_ioctl(sdev, (void *)&buf);
|
rc = do_ioctl(sdev, (void *)&buf);
|
||||||
if (likely(!rc))
|
if (likely(!rc))
|
||||||
if (unlikely(copy_to_user(arg, &buf, size))) {
|
if (unlikely(copy_to_user(arg, &buf, size))) {
|
||||||
dev_err(dev, "%s: copy_to_user() fail "
|
dev_err(dev, "%s: copy_to_user() fail size=%lu cmd=%u (%s) arg=%p\n",
|
||||||
"size=%lu cmd=%d (%s) arg=%p\n",
|
|
||||||
__func__, size, cmd, decode_ioctl(cmd), arg);
|
__func__, size, cmd, decode_ioctl(cmd), arg);
|
||||||
rc = -EFAULT;
|
rc = -EFAULT;
|
||||||
}
|
}
|
||||||
|
|
|
@ -965,8 +965,8 @@ struct esas2r_adapter {
|
||||||
const char *esas2r_info(struct Scsi_Host *);
|
const char *esas2r_info(struct Scsi_Host *);
|
||||||
int esas2r_write_params(struct esas2r_adapter *a, struct esas2r_request *rq,
|
int esas2r_write_params(struct esas2r_adapter *a, struct esas2r_request *rq,
|
||||||
struct esas2r_sas_nvram *data);
|
struct esas2r_sas_nvram *data);
|
||||||
int esas2r_ioctl_handler(void *hostdata, int cmd, void __user *arg);
|
int esas2r_ioctl_handler(void *hostdata, unsigned int cmd, void __user *arg);
|
||||||
int esas2r_ioctl(struct scsi_device *dev, int cmd, void __user *arg);
|
int esas2r_ioctl(struct scsi_device *dev, unsigned int cmd, void __user *arg);
|
||||||
u8 handle_hba_ioctl(struct esas2r_adapter *a,
|
u8 handle_hba_ioctl(struct esas2r_adapter *a,
|
||||||
struct atto_ioctl *ioctl_hba);
|
struct atto_ioctl *ioctl_hba);
|
||||||
int esas2r_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd);
|
int esas2r_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd);
|
||||||
|
|
|
@ -1274,7 +1274,7 @@ int esas2r_write_params(struct esas2r_adapter *a, struct esas2r_request *rq,
|
||||||
|
|
||||||
|
|
||||||
/* This function only cares about ATTO-specific ioctls (atto_express_ioctl) */
|
/* This function only cares about ATTO-specific ioctls (atto_express_ioctl) */
|
||||||
int esas2r_ioctl_handler(void *hostdata, int cmd, void __user *arg)
|
int esas2r_ioctl_handler(void *hostdata, unsigned int cmd, void __user *arg)
|
||||||
{
|
{
|
||||||
struct atto_express_ioctl *ioctl = NULL;
|
struct atto_express_ioctl *ioctl = NULL;
|
||||||
struct esas2r_adapter *a;
|
struct esas2r_adapter *a;
|
||||||
|
@ -1292,9 +1292,8 @@ int esas2r_ioctl_handler(void *hostdata, int cmd, void __user *arg)
|
||||||
ioctl = memdup_user(arg, sizeof(struct atto_express_ioctl));
|
ioctl = memdup_user(arg, sizeof(struct atto_express_ioctl));
|
||||||
if (IS_ERR(ioctl)) {
|
if (IS_ERR(ioctl)) {
|
||||||
esas2r_log(ESAS2R_LOG_WARN,
|
esas2r_log(ESAS2R_LOG_WARN,
|
||||||
"ioctl_handler access_ok failed for cmd %d, "
|
"ioctl_handler access_ok failed for cmd %u, address %p",
|
||||||
"address %p", cmd,
|
cmd, arg);
|
||||||
arg);
|
|
||||||
return PTR_ERR(ioctl);
|
return PTR_ERR(ioctl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1493,7 +1492,7 @@ int esas2r_ioctl_handler(void *hostdata, int cmd, void __user *arg)
|
||||||
ioctl_done:
|
ioctl_done:
|
||||||
|
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
esas2r_log(ESAS2R_LOG_WARN, "err %d on ioctl cmd %d", err,
|
esas2r_log(ESAS2R_LOG_WARN, "err %d on ioctl cmd %u", err,
|
||||||
cmd);
|
cmd);
|
||||||
|
|
||||||
switch (err) {
|
switch (err) {
|
||||||
|
@ -1518,9 +1517,8 @@ ioctl_done:
|
||||||
err = __copy_to_user(arg, ioctl, sizeof(struct atto_express_ioctl));
|
err = __copy_to_user(arg, ioctl, sizeof(struct atto_express_ioctl));
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
esas2r_log(ESAS2R_LOG_WARN,
|
esas2r_log(ESAS2R_LOG_WARN,
|
||||||
"ioctl_handler copy_to_user didn't copy "
|
"ioctl_handler copy_to_user didn't copy everything (err %d, cmd %u)",
|
||||||
"everything (err %d, cmd %d)", err,
|
err, cmd);
|
||||||
cmd);
|
|
||||||
kfree(ioctl);
|
kfree(ioctl);
|
||||||
|
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
@ -1531,7 +1529,7 @@ ioctl_done:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int esas2r_ioctl(struct scsi_device *sd, int cmd, void __user *arg)
|
int esas2r_ioctl(struct scsi_device *sd, unsigned int cmd, void __user *arg)
|
||||||
{
|
{
|
||||||
return esas2r_ioctl_handler(sd->host->hostdata, cmd, arg);
|
return esas2r_ioctl_handler(sd->host->hostdata, cmd, arg);
|
||||||
}
|
}
|
||||||
|
|
|
@ -623,7 +623,7 @@ static int esas2r_proc_major;
|
||||||
long esas2r_proc_ioctl(struct file *fp, unsigned int cmd, unsigned long arg)
|
long esas2r_proc_ioctl(struct file *fp, unsigned int cmd, unsigned long arg)
|
||||||
{
|
{
|
||||||
return esas2r_ioctl_handler(esas2r_proc_host->hostdata,
|
return esas2r_ioctl_handler(esas2r_proc_host->hostdata,
|
||||||
(int)cmd, (void __user *)arg);
|
cmd, (void __user *)arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __exit esas2r_exit(void)
|
static void __exit esas2r_exit(void)
|
||||||
|
|
|
@ -251,10 +251,11 @@ static int number_of_controllers;
|
||||||
|
|
||||||
static irqreturn_t do_hpsa_intr_intx(int irq, void *dev_id);
|
static irqreturn_t do_hpsa_intr_intx(int irq, void *dev_id);
|
||||||
static irqreturn_t do_hpsa_intr_msi(int irq, void *dev_id);
|
static irqreturn_t do_hpsa_intr_msi(int irq, void *dev_id);
|
||||||
static int hpsa_ioctl(struct scsi_device *dev, int cmd, void __user *arg);
|
static int hpsa_ioctl(struct scsi_device *dev, unsigned int cmd,
|
||||||
|
void __user *arg);
|
||||||
|
|
||||||
#ifdef CONFIG_COMPAT
|
#ifdef CONFIG_COMPAT
|
||||||
static int hpsa_compat_ioctl(struct scsi_device *dev, int cmd,
|
static int hpsa_compat_ioctl(struct scsi_device *dev, unsigned int cmd,
|
||||||
void __user *arg);
|
void __user *arg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -6127,7 +6128,7 @@ static void cmd_free(struct ctlr_info *h, struct CommandList *c)
|
||||||
|
|
||||||
#ifdef CONFIG_COMPAT
|
#ifdef CONFIG_COMPAT
|
||||||
|
|
||||||
static int hpsa_ioctl32_passthru(struct scsi_device *dev, int cmd,
|
static int hpsa_ioctl32_passthru(struct scsi_device *dev, unsigned int cmd,
|
||||||
void __user *arg)
|
void __user *arg)
|
||||||
{
|
{
|
||||||
IOCTL32_Command_struct __user *arg32 =
|
IOCTL32_Command_struct __user *arg32 =
|
||||||
|
@ -6164,7 +6165,7 @@ static int hpsa_ioctl32_passthru(struct scsi_device *dev, int cmd,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int hpsa_ioctl32_big_passthru(struct scsi_device *dev,
|
static int hpsa_ioctl32_big_passthru(struct scsi_device *dev,
|
||||||
int cmd, void __user *arg)
|
unsigned int cmd, void __user *arg)
|
||||||
{
|
{
|
||||||
BIG_IOCTL32_Command_struct __user *arg32 =
|
BIG_IOCTL32_Command_struct __user *arg32 =
|
||||||
(BIG_IOCTL32_Command_struct __user *) arg;
|
(BIG_IOCTL32_Command_struct __user *) arg;
|
||||||
|
@ -6201,7 +6202,8 @@ static int hpsa_ioctl32_big_passthru(struct scsi_device *dev,
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int hpsa_compat_ioctl(struct scsi_device *dev, int cmd, void __user *arg)
|
static int hpsa_compat_ioctl(struct scsi_device *dev, unsigned int cmd,
|
||||||
|
void __user *arg)
|
||||||
{
|
{
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case CCISS_GETPCIINFO:
|
case CCISS_GETPCIINFO:
|
||||||
|
@ -6521,7 +6523,8 @@ static void check_ioctl_unit_attention(struct ctlr_info *h,
|
||||||
/*
|
/*
|
||||||
* ioctl
|
* ioctl
|
||||||
*/
|
*/
|
||||||
static int hpsa_ioctl(struct scsi_device *dev, int cmd, void __user *arg)
|
static int hpsa_ioctl(struct scsi_device *dev, unsigned int cmd,
|
||||||
|
void __user *arg)
|
||||||
{
|
{
|
||||||
struct ctlr_info *h;
|
struct ctlr_info *h;
|
||||||
void __user *argp = (void __user *)arg;
|
void __user *argp = (void __user *)arg;
|
||||||
|
|
|
@ -6696,7 +6696,8 @@ err_nodev:
|
||||||
* Return value:
|
* Return value:
|
||||||
* 0 on success / other on failure
|
* 0 on success / other on failure
|
||||||
**/
|
**/
|
||||||
static int ipr_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)
|
static int ipr_ioctl(struct scsi_device *sdev, unsigned int cmd,
|
||||||
|
void __user *arg)
|
||||||
{
|
{
|
||||||
struct ipr_resource_entry *res;
|
struct ipr_resource_entry *res;
|
||||||
|
|
||||||
|
|
|
@ -799,7 +799,7 @@ out:
|
||||||
shost->host_failed, tries);
|
shost->host_failed, tries);
|
||||||
}
|
}
|
||||||
|
|
||||||
int sas_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)
|
int sas_ioctl(struct scsi_device *sdev, unsigned int cmd, void __user *arg)
|
||||||
{
|
{
|
||||||
struct domain_device *dev = sdev_to_domain_dev(sdev);
|
struct domain_device *dev = sdev_to_domain_dev(sdev);
|
||||||
|
|
||||||
|
|
|
@ -832,7 +832,8 @@ static void mk_sense_invalid_opcode(struct scsi_cmnd *scp)
|
||||||
mk_sense_buffer(scp, ILLEGAL_REQUEST, INVALID_OPCODE, 0);
|
mk_sense_buffer(scp, ILLEGAL_REQUEST, INVALID_OPCODE, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int scsi_debug_ioctl(struct scsi_device *dev, int cmd, void __user *arg)
|
static int scsi_debug_ioctl(struct scsi_device *dev, unsigned int cmd,
|
||||||
|
void __user *arg)
|
||||||
{
|
{
|
||||||
if (sdebug_verbose) {
|
if (sdebug_verbose) {
|
||||||
if (0x1261 == cmd)
|
if (0x1261 == cmd)
|
||||||
|
|
|
@ -6043,7 +6043,8 @@ out:
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pqi_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)
|
static int pqi_ioctl(struct scsi_device *sdev, unsigned int cmd,
|
||||||
|
void __user *arg)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
struct pqi_ctrl_info *ctrl_info;
|
struct pqi_ctrl_info *ctrl_info;
|
||||||
|
|
|
@ -1122,10 +1122,11 @@ extern int ata_host_activate(struct ata_host *host, int irq,
|
||||||
extern void ata_host_detach(struct ata_host *host);
|
extern void ata_host_detach(struct ata_host *host);
|
||||||
extern void ata_host_init(struct ata_host *, struct device *, struct ata_port_operations *);
|
extern void ata_host_init(struct ata_host *, struct device *, struct ata_port_operations *);
|
||||||
extern int ata_scsi_detect(struct scsi_host_template *sht);
|
extern int ata_scsi_detect(struct scsi_host_template *sht);
|
||||||
extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg);
|
extern int ata_scsi_ioctl(struct scsi_device *dev, unsigned int cmd,
|
||||||
|
void __user *arg);
|
||||||
extern int ata_scsi_queuecmd(struct Scsi_Host *h, struct scsi_cmnd *cmd);
|
extern int ata_scsi_queuecmd(struct Scsi_Host *h, struct scsi_cmnd *cmd);
|
||||||
extern int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *dev,
|
extern int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *dev,
|
||||||
int cmd, void __user *arg);
|
unsigned int cmd, void __user *arg);
|
||||||
extern void ata_sas_port_destroy(struct ata_port *);
|
extern void ata_sas_port_destroy(struct ata_port *);
|
||||||
extern struct ata_port *ata_sas_port_alloc(struct ata_host *,
|
extern struct ata_port *ata_sas_port_alloc(struct ata_host *,
|
||||||
struct ata_port_info *, struct Scsi_Host *);
|
struct ata_port_info *, struct Scsi_Host *);
|
||||||
|
|
|
@ -707,7 +707,8 @@ int sas_eh_target_reset_handler(struct scsi_cmnd *cmd);
|
||||||
|
|
||||||
extern void sas_target_destroy(struct scsi_target *);
|
extern void sas_target_destroy(struct scsi_target *);
|
||||||
extern int sas_slave_alloc(struct scsi_device *);
|
extern int sas_slave_alloc(struct scsi_device *);
|
||||||
extern int sas_ioctl(struct scsi_device *sdev, int cmd, void __user *arg);
|
extern int sas_ioctl(struct scsi_device *sdev, unsigned int cmd,
|
||||||
|
void __user *arg);
|
||||||
extern int sas_drain_work(struct sas_ha_struct *ha);
|
extern int sas_drain_work(struct sas_ha_struct *ha);
|
||||||
|
|
||||||
extern void sas_ssp_task_response(struct device *dev, struct sas_task *task,
|
extern void sas_ssp_task_response(struct device *dev, struct sas_task *task,
|
||||||
|
|
|
@ -60,7 +60,8 @@ struct scsi_host_template {
|
||||||
*
|
*
|
||||||
* Status: OPTIONAL
|
* Status: OPTIONAL
|
||||||
*/
|
*/
|
||||||
int (* ioctl)(struct scsi_device *dev, int cmd, void __user *arg);
|
int (*ioctl)(struct scsi_device *dev, unsigned int cmd,
|
||||||
|
void __user *arg);
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_COMPAT
|
#ifdef CONFIG_COMPAT
|
||||||
|
@ -70,7 +71,8 @@ struct scsi_host_template {
|
||||||
*
|
*
|
||||||
* Status: OPTIONAL
|
* Status: OPTIONAL
|
||||||
*/
|
*/
|
||||||
int (* compat_ioctl)(struct scsi_device *dev, int cmd, void __user *arg);
|
int (*compat_ioctl)(struct scsi_device *dev, unsigned int cmd,
|
||||||
|
void __user *arg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue