diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c index 4612312c0c2d9832d4ab0967df3481f8d404afdd..10c470e7d316a3a3216ff2a2023930e0eda19583 100644 --- a/drivers/scsi/ahci.c +++ b/drivers/scsi/ahci.c @@ -42,8 +42,8 @@ #include #include #include -#include "scsi.h" #include +#include #include #include @@ -196,7 +196,7 @@ static u8 ahci_check_status(struct ata_port *ap); static inline int ahci_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc); static void ahci_remove_one (struct pci_dev *pdev); -static Scsi_Host_Template ahci_sht = { +static struct scsi_host_template ahci_sht = { .module = THIS_MODULE, .name = DRV_NAME, .ioctl = ata_scsi_ioctl, diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c index 7f8aa1b552ce1f6d89d23c38c74356bf54363a96..a1bd8d95623ca6483e9a7bc700d66398091cce47 100644 --- a/drivers/scsi/ata_piix.c +++ b/drivers/scsi/ata_piix.c @@ -46,7 +46,6 @@ #include #include #include -#include "scsi.h" #include #include @@ -128,7 +127,7 @@ static struct pci_driver piix_pci_driver = { .remove = ata_pci_remove_one, }; -static Scsi_Host_Template piix_sht = { +static struct scsi_host_template piix_sht = { .module = THIS_MODULE, .name = DRV_NAME, .ioctl = ata_scsi_ioctl, diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 1c1a7caf785e9e1fbf6659daa72c18d2004842e5..a74b4071a662f6169debc3123cf86b7a6808e3be 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -51,8 +51,8 @@ #include #include #include -#include "scsi.h" #include "scsi_priv.h" +#include #include #include #include @@ -1144,7 +1144,7 @@ static void ata_dev_identify(struct ata_port *ap, unsigned int device) * ATA software reset (SRST, the default) does not appear * to have this problem. */ - if ((using_edd) && (qc->tf.command == ATA_CMD_ID_ATA)) { + if ((using_edd) && (dev->class == ATA_DEV_ATA)) { u8 err = qc->tf.feature; if (err & ATA_ABORTED) { dev->class = ATA_DEV_ATAPI; @@ -2713,7 +2713,7 @@ static int ata_sg_setup(struct ata_queued_cmd *qc) /** * ata_poll_qc_complete - turn irq back on and finish qc * @qc: Command to complete - * @drv_stat: ATA status register content + * @err_mask: ATA status register content * * LOCKING: * None. (grabs host lock) @@ -2747,7 +2747,6 @@ static unsigned long ata_pio_poll(struct ata_port *ap) u8 status; unsigned int poll_state = HSM_ST_UNKNOWN; unsigned int reg_state = HSM_ST_UNKNOWN; - const unsigned int tmout_state = HSM_ST_TMOUT; switch (ap->hsm_task_state) { case HSM_ST: @@ -2768,7 +2767,7 @@ static unsigned long ata_pio_poll(struct ata_port *ap) status = ata_chk_status(ap); if (status & ATA_BUSY) { if (time_after(jiffies, ap->pio_task_timeout)) { - ap->hsm_task_state = tmout_state; + ap->hsm_task_state = HSM_ST_TMOUT; return 0; } ap->hsm_task_state = poll_state; @@ -3478,7 +3477,7 @@ void ata_qc_free(struct ata_queued_cmd *qc) /** * ata_qc_complete - Complete an active ATA command * @qc: Command to complete - * @drv_stat: ATA Status register contents + * @err_mask: ATA Status register contents * * Indicate to the mid and upper layers that an ATA * command has completed, with either an ok or not-ok status. diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index eb604b0a8990043de0c43123b42c6dbf6bd1b58a..bb30fcdc929763d767ad369267207dff7a624a53 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c @@ -37,9 +37,9 @@ #include #include #include -#include "scsi.h" #include #include +#include #include #include #include @@ -131,7 +131,7 @@ int ata_std_bios_param(struct scsi_device *sdev, struct block_device *bdev, /** * ata_cmd_ioctl - Handler for HDIO_DRIVE_CMD ioctl - * @dev: Device to whom we are issuing command + * @scsidev: Device to which we are issuing command * @arg: User provided data for issuing command * * LOCKING: @@ -217,7 +217,7 @@ int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg) /** * ata_task_ioctl - Handler for HDIO_DRIVE_TASK ioctl - * @dev: Device to whom we are issuing command + * @scsidev: Device to which we are issuing command * @arg: User provided data for issuing command * * LOCKING: @@ -416,6 +416,7 @@ void ata_dump_status(unsigned id, struct ata_taskfile *tf) /** * ata_to_sense_error - convert ATA error to SCSI error + * @id: ATA device number * @drv_stat: value contained in ATA status register * @drv_err: value contained in ATA error register * @sk: the sense key we'll fill out @@ -2231,7 +2232,7 @@ ata_scsi_map_proto(u8 byte1) /** * ata_scsi_pass_thru - convert ATA pass-thru CDB to taskfile * @qc: command structure to be initialized - * @cmd: SCSI command to convert + * @scsicmd: SCSI command to convert * * Handles either 12 or 16-byte versions of the CDB. * diff --git a/drivers/scsi/pdc_adma.c b/drivers/scsi/pdc_adma.c index a50588c60fabc62e256aaf7880d2ba453aab9f22..78b4ff117af65b1229875d94257a9566ba79ad5c 100644 --- a/drivers/scsi/pdc_adma.c +++ b/drivers/scsi/pdc_adma.c @@ -41,7 +41,6 @@ #include #include #include -#include "scsi.h" #include #include #include @@ -139,7 +138,7 @@ static u8 adma_bmdma_status(struct ata_port *ap); static void adma_irq_clear(struct ata_port *ap); static void adma_eng_timeout(struct ata_port *ap); -static Scsi_Host_Template adma_ata_sht = { +static struct scsi_host_template adma_ata_sht = { .module = THIS_MODULE, .name = DRV_NAME, .ioctl = ata_scsi_ioctl, diff --git a/drivers/scsi/sata_mv.c b/drivers/scsi/sata_mv.c index 0f469e3dabe2e5e8fd0d21ced1f9b7e743c396b4..93d55233af7be493363f366d204e367a727d10a5 100644 --- a/drivers/scsi/sata_mv.c +++ b/drivers/scsi/sata_mv.c @@ -30,8 +30,8 @@ #include #include #include -#include "scsi.h" #include +#include #include #include @@ -270,7 +270,7 @@ static irqreturn_t mv_interrupt(int irq, void *dev_instance, static void mv_eng_timeout(struct ata_port *ap); static int mv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); -static Scsi_Host_Template mv_sht = { +static struct scsi_host_template mv_sht = { .module = THIS_MODULE, .name = DRV_NAME, .ioctl = ata_scsi_ioctl, diff --git a/drivers/scsi/sata_nv.c b/drivers/scsi/sata_nv.c index d573888eda761f05041ab771bc6e64891e97c5b2..37a4fae95ed4ffe738dd5412ca240f6506d6eafa 100644 --- a/drivers/scsi/sata_nv.c +++ b/drivers/scsi/sata_nv.c @@ -62,7 +62,6 @@ #include #include #include -#include "scsi.h" #include #include @@ -219,7 +218,7 @@ static struct pci_driver nv_pci_driver = { .remove = ata_pci_remove_one, }; -static Scsi_Host_Template nv_sht = { +static struct scsi_host_template nv_sht = { .module = THIS_MODULE, .name = DRV_NAME, .ioctl = ata_scsi_ioctl, diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c index b41c977d6fab1df637b7c5c1c2a72d67c05f708f..9edc9d91efc3b73c970e710f228caa09d13df3ca 100644 --- a/drivers/scsi/sata_promise.c +++ b/drivers/scsi/sata_promise.c @@ -39,8 +39,8 @@ #include #include #include -#include "scsi.h" #include +#include #include #include #include "sata_promise.h" @@ -94,7 +94,7 @@ static void pdc_irq_clear(struct ata_port *ap); static int pdc_qc_issue_prot(struct ata_queued_cmd *qc); -static Scsi_Host_Template pdc_ata_sht = { +static struct scsi_host_template pdc_ata_sht = { .module = THIS_MODULE, .name = DRV_NAME, .ioctl = ata_scsi_ioctl, diff --git a/drivers/scsi/sata_qstor.c b/drivers/scsi/sata_qstor.c index 65502c157a5497c1112c0de5a523a037de1333ec..d274ab2357812924a1beb7aad481112cd17dcd4b 100644 --- a/drivers/scsi/sata_qstor.c +++ b/drivers/scsi/sata_qstor.c @@ -36,7 +36,6 @@ #include #include #include -#include "scsi.h" #include #include #include @@ -128,7 +127,7 @@ static u8 qs_bmdma_status(struct ata_port *ap); static void qs_irq_clear(struct ata_port *ap); static void qs_eng_timeout(struct ata_port *ap); -static Scsi_Host_Template qs_ata_sht = { +static struct scsi_host_template qs_ata_sht = { .module = THIS_MODULE, .name = DRV_NAME, .ioctl = ata_scsi_ioctl, diff --git a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c index 435f7e0085ec74c460a7a17df0be7276155506a9..d0e3c3c6c25f4e6b107cda45055bf978b88ea233 100644 --- a/drivers/scsi/sata_sil.c +++ b/drivers/scsi/sata_sil.c @@ -42,7 +42,6 @@ #include #include #include -#include "scsi.h" #include #include @@ -131,7 +130,7 @@ static struct pci_driver sil_pci_driver = { .remove = ata_pci_remove_one, }; -static Scsi_Host_Template sil_sht = { +static struct scsi_host_template sil_sht = { .module = THIS_MODULE, .name = DRV_NAME, .ioctl = ata_scsi_ioctl, diff --git a/drivers/scsi/sata_sil24.c b/drivers/scsi/sata_sil24.c index e6c8e89c226f5a4d24ef3d85873af02d38e35d42..4682a50650b4914e0b219d46ba90cbb4e998c229 100644 --- a/drivers/scsi/sata_sil24.c +++ b/drivers/scsi/sata_sil24.c @@ -37,7 +37,7 @@ #include #include #include -#include "scsi.h" +#include #include #include @@ -255,7 +255,7 @@ static struct pci_driver sil24_pci_driver = { .remove = ata_pci_remove_one, /* safe? */ }; -static Scsi_Host_Template sil24_sht = { +static struct scsi_host_template sil24_sht = { .module = THIS_MODULE, .name = DRV_NAME, .ioctl = ata_scsi_ioctl, diff --git a/drivers/scsi/sata_sis.c b/drivers/scsi/sata_sis.c index 42288be0e5618b254b75f6a4ae560133fbf96a53..42d7c4e925014d2a382f4ee81117a9d62917e318 100644 --- a/drivers/scsi/sata_sis.c +++ b/drivers/scsi/sata_sis.c @@ -39,7 +39,6 @@ #include #include #include -#include "scsi.h" #include #include @@ -83,7 +82,7 @@ static struct pci_driver sis_pci_driver = { .remove = ata_pci_remove_one, }; -static Scsi_Host_Template sis_sht = { +static struct scsi_host_template sis_sht = { .module = THIS_MODULE, .name = DRV_NAME, .ioctl = ata_scsi_ioctl, diff --git a/drivers/scsi/sata_svw.c b/drivers/scsi/sata_svw.c index db615ff794d8d354d46d3048df95a5c4be58902f..9895d1caefcf34c1b53ec93fc6875ff3a3dbe3f2 100644 --- a/drivers/scsi/sata_svw.c +++ b/drivers/scsi/sata_svw.c @@ -45,7 +45,6 @@ #include #include #include -#include "scsi.h" #include #include @@ -284,7 +283,7 @@ static int k2_sata_proc_info(struct Scsi_Host *shost, char *page, char **start, #endif /* CONFIG_PPC_OF */ -static Scsi_Host_Template k2_sata_sht = { +static struct scsi_host_template k2_sata_sht = { .module = THIS_MODULE, .name = DRV_NAME, .ioctl = ata_scsi_ioctl, diff --git a/drivers/scsi/sata_sx4.c b/drivers/scsi/sata_sx4.c index f859bbd681ed30721da8b3043c9805de12977637..d5a38784352b9bf7adfa396d279f2f27e71d6b6a 100644 --- a/drivers/scsi/sata_sx4.c +++ b/drivers/scsi/sata_sx4.c @@ -39,8 +39,8 @@ #include #include #include -#include "scsi.h" #include +#include #include #include #include "sata_promise.h" @@ -177,7 +177,7 @@ static void pdc20621_irq_clear(struct ata_port *ap); static int pdc20621_qc_issue_prot(struct ata_queued_cmd *qc); -static Scsi_Host_Template pdc_sata_sht = { +static struct scsi_host_template pdc_sata_sht = { .module = THIS_MODULE, .name = DRV_NAME, .ioctl = ata_scsi_ioctl, diff --git a/drivers/scsi/sata_uli.c b/drivers/scsi/sata_uli.c index a5e245c098e1a142b521975eb5d2a09364334dd7..cf0baaa4e045ab3e36545e05882978e8431bef13 100644 --- a/drivers/scsi/sata_uli.c +++ b/drivers/scsi/sata_uli.c @@ -33,7 +33,6 @@ #include #include #include -#include "scsi.h" #include #include @@ -71,7 +70,7 @@ static struct pci_driver uli_pci_driver = { .remove = ata_pci_remove_one, }; -static Scsi_Host_Template uli_sht = { +static struct scsi_host_template uli_sht = { .module = THIS_MODULE, .name = DRV_NAME, .ioctl = ata_scsi_ioctl, diff --git a/drivers/scsi/sata_via.c b/drivers/scsi/sata_via.c index b3ecdbe400e9cb897b32343f315b61da44c69063..ab19d2ba2a4bf163b0e70332475d1f493707f9e4 100644 --- a/drivers/scsi/sata_via.c +++ b/drivers/scsi/sata_via.c @@ -42,7 +42,6 @@ #include #include #include -#include "scsi.h" #include #include #include @@ -90,7 +89,7 @@ static struct pci_driver svia_pci_driver = { .remove = ata_pci_remove_one, }; -static Scsi_Host_Template svia_sht = { +static struct scsi_host_template svia_sht = { .module = THIS_MODULE, .name = DRV_NAME, .ioctl = ata_scsi_ioctl, diff --git a/drivers/scsi/sata_vsc.c b/drivers/scsi/sata_vsc.c index bb84ba0c7e83055d1d680eac381e0eaad31fa9ca..ce8a2fd7da84d577b4c0154fe9e215323f1c828e 100644 --- a/drivers/scsi/sata_vsc.c +++ b/drivers/scsi/sata_vsc.c @@ -43,7 +43,6 @@ #include #include #include -#include "scsi.h" #include #include @@ -219,7 +218,7 @@ static irqreturn_t vsc_sata_interrupt (int irq, void *dev_instance, } -static Scsi_Host_Template vsc_sata_sht = { +static struct scsi_host_template vsc_sata_sht = { .module = THIS_MODULE, .name = DRV_NAME, .ioctl = ata_scsi_ioctl, diff --git a/include/linux/libata.h b/include/linux/libata.h index dcd17e7458ab602684db8cc965006267969e028f..6f0752219f64052018f9663b62930329c722b888 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -214,7 +214,7 @@ struct ata_probe_ent { struct list_head node; struct device *dev; const struct ata_port_operations *port_ops; - Scsi_Host_Template *sht; + struct scsi_host_template *sht; struct ata_ioports port[ATA_MAX_PORTS]; unsigned int n_ports; unsigned int hard_port_no; @@ -398,7 +398,7 @@ struct ata_port_operations { }; struct ata_port_info { - Scsi_Host_Template *sht; + struct scsi_host_template *sht; unsigned long host_flags; unsigned long pio_mask; unsigned long mwdma_mask; @@ -433,7 +433,7 @@ extern void ata_pci_remove_one (struct pci_dev *pdev); #endif /* CONFIG_PCI */ extern int ata_device_add(const struct ata_probe_ent *ent); extern void ata_host_set_remove(struct ata_host_set *host_set); -extern int ata_scsi_detect(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_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); extern int ata_scsi_error(struct Scsi_Host *host);