Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: ata: fix sparse warning in pata_acpi.c ata: fix sparse warning in pata_marvell.c ata: fix sparse warning in pata_jmicron.c ata: fix sparse warning in pata_cs5536.c ata: sparse fixes for pata_amd.c pata_scc.c: add thaw ops pata_cs5536.c bugfix pata_legacy: don't call ata_host_detach() after initialization failure ata: fix sparse warnings in sata_mv.c ata: fix sparse warning in sata_via.c ata: fix sparse warning in sata_promise.c ata: fix sparse warning in ata_piix.c ata: fix sparse warning in libata-core.c ata: make ata_scsiop_inq_89 static in libata-scsi.c
This commit is contained in:
commit
1309d4e684
|
@ -1652,7 +1652,7 @@ static int __devinit piix_init_one(struct pci_dev *pdev,
|
|||
u8 tmp;
|
||||
pci_read_config_byte(pdev, PIIX_SCC, &tmp);
|
||||
if (tmp == PIIX_AHCI_DEVICE) {
|
||||
int rc = piix_disable_ahci(pdev);
|
||||
rc = piix_disable_ahci(pdev);
|
||||
if (rc)
|
||||
return rc;
|
||||
}
|
||||
|
|
|
@ -7086,7 +7086,6 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
|
|||
DPRINTK("probe begin\n");
|
||||
for (i = 0; i < host->n_ports; i++) {
|
||||
struct ata_port *ap = host->ports[i];
|
||||
int rc;
|
||||
|
||||
/* probe */
|
||||
if (ap->ops->error_handler) {
|
||||
|
|
|
@ -1862,7 +1862,7 @@ unsigned int ata_scsiop_inq_83(struct ata_scsi_args *args, u8 *rbuf,
|
|||
* spin_lock_irqsave(host lock)
|
||||
*/
|
||||
|
||||
unsigned int ata_scsiop_inq_89(struct ata_scsi_args *args, u8 *rbuf,
|
||||
static unsigned int ata_scsiop_inq_89(struct ata_scsi_args *args, u8 *rbuf,
|
||||
unsigned int buflen)
|
||||
{
|
||||
u8 pbuf[60];
|
||||
|
|
|
@ -77,8 +77,8 @@ static int pacpi_cable_detect(struct ata_port *ap)
|
|||
|
||||
static void pacpi_error_handler(struct ata_port *ap)
|
||||
{
|
||||
return ata_bmdma_drive_eh(ap, pacpi_pre_reset, ata_std_softreset,
|
||||
NULL, ata_std_postreset);
|
||||
ata_bmdma_drive_eh(ap, pacpi_pre_reset, ata_std_softreset, NULL,
|
||||
ata_std_postreset);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -146,9 +146,8 @@ static int amd_pre_reset(struct ata_link *link, unsigned long deadline)
|
|||
|
||||
static void amd_error_handler(struct ata_port *ap)
|
||||
{
|
||||
return ata_bmdma_drive_eh(ap, amd_pre_reset,
|
||||
ata_std_softreset, NULL,
|
||||
ata_std_postreset);
|
||||
ata_bmdma_drive_eh(ap, amd_pre_reset, ata_std_softreset, NULL,
|
||||
ata_std_postreset);
|
||||
}
|
||||
|
||||
static int amd_cable_detect(struct ata_port *ap)
|
||||
|
@ -506,7 +505,6 @@ static struct ata_port_operations amd133_port_ops = {
|
|||
static struct ata_port_operations nv100_port_ops = {
|
||||
.set_piomode = nv100_set_piomode,
|
||||
.set_dmamode = nv100_set_dmamode,
|
||||
.mode_filter = ata_pci_default_filter,
|
||||
.tf_load = ata_tf_load,
|
||||
.tf_read = ata_tf_read,
|
||||
.check_status = ata_check_status,
|
||||
|
@ -541,7 +539,6 @@ static struct ata_port_operations nv100_port_ops = {
|
|||
static struct ata_port_operations nv133_port_ops = {
|
||||
.set_piomode = nv133_set_piomode,
|
||||
.set_dmamode = nv133_set_dmamode,
|
||||
.mode_filter = ata_pci_default_filter,
|
||||
.tf_load = ata_tf_load,
|
||||
.tf_read = ata_tf_read,
|
||||
.check_status = ata_check_status,
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#include <asm/msr.h>
|
||||
|
||||
#define DRV_NAME "pata_cs5536"
|
||||
#define DRV_VERSION "0.0.6"
|
||||
#define DRV_VERSION "0.0.7"
|
||||
|
||||
enum {
|
||||
CFG = 0,
|
||||
|
@ -85,7 +85,7 @@ static const u8 pci_reg[4] = {
|
|||
PCI_IDE_CFG, PCI_IDE_DTC, PCI_IDE_CAST, PCI_IDE_ETC,
|
||||
};
|
||||
|
||||
static inline int cs5536_read(struct pci_dev *pdev, int reg, int *val)
|
||||
static inline int cs5536_read(struct pci_dev *pdev, int reg, u32 *val)
|
||||
{
|
||||
if (unlikely(use_msr)) {
|
||||
u32 dummy;
|
||||
|
@ -153,8 +153,8 @@ static void cs5536_set_piomode(struct ata_port *ap, struct ata_device *adev)
|
|||
struct ata_device *pair = ata_dev_pair(adev);
|
||||
int mode = adev->pio_mode - XFER_PIO_0;
|
||||
int cmdmode = mode;
|
||||
int dshift = ap->port_no ? IDE_D1_SHIFT : IDE_D0_SHIFT;
|
||||
int cshift = ap->port_no ? IDE_CAST_D1_SHIFT : IDE_CAST_D0_SHIFT;
|
||||
int dshift = adev->devno ? IDE_D1_SHIFT : IDE_D0_SHIFT;
|
||||
int cshift = adev->devno ? IDE_CAST_D1_SHIFT : IDE_CAST_D0_SHIFT;
|
||||
u32 dtc, cast, etc;
|
||||
|
||||
if (pair)
|
||||
|
@ -201,7 +201,7 @@ static void cs5536_set_dmamode(struct ata_port *ap, struct ata_device *adev)
|
|||
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
|
||||
u32 dtc, etc;
|
||||
int mode = adev->dma_mode;
|
||||
int dshift = ap->port_no ? IDE_D1_SHIFT : IDE_D0_SHIFT;
|
||||
int dshift = adev->devno ? IDE_D1_SHIFT : IDE_D0_SHIFT;
|
||||
|
||||
if (mode >= XFER_UDMA_0) {
|
||||
cs5536_read(pdev, ETC, &etc);
|
||||
|
|
|
@ -115,7 +115,8 @@ static int jmicron_pre_reset(struct ata_link *link, unsigned long deadline)
|
|||
|
||||
static void jmicron_error_handler(struct ata_port *ap)
|
||||
{
|
||||
return ata_bmdma_drive_eh(ap, jmicron_pre_reset, ata_std_softreset, NULL, ata_std_postreset);
|
||||
ata_bmdma_drive_eh(ap, jmicron_pre_reset, ata_std_softreset, NULL,
|
||||
ata_std_postreset);
|
||||
}
|
||||
|
||||
/* No PIO or DMA methods needed for this device */
|
||||
|
|
|
@ -1278,8 +1278,6 @@ static __init int legacy_init_one(struct legacy_probe *probe)
|
|||
}
|
||||
}
|
||||
fail:
|
||||
if (host)
|
||||
ata_host_detach(host);
|
||||
platform_device_unregister(pdev);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -85,8 +85,8 @@ static int marvell_cable_detect(struct ata_port *ap)
|
|||
|
||||
static void marvell_error_handler(struct ata_port *ap)
|
||||
{
|
||||
return ata_bmdma_drive_eh(ap, marvell_pre_reset, ata_std_softreset,
|
||||
NULL, ata_std_postreset);
|
||||
ata_bmdma_drive_eh(ap, marvell_pre_reset, ata_std_softreset, NULL,
|
||||
ata_std_postreset);
|
||||
}
|
||||
|
||||
/* No PIO or DMA methods needed for this device */
|
||||
|
|
|
@ -1007,6 +1007,8 @@ static const struct ata_port_operations scc_pata_ops = {
|
|||
.qc_issue = ata_qc_issue_prot,
|
||||
|
||||
.freeze = scc_bmdma_freeze,
|
||||
.thaw = ata_bmdma_thaw,
|
||||
|
||||
.error_handler = scc_error_handler,
|
||||
.post_internal_cmd = scc_bmdma_stop,
|
||||
|
||||
|
|
|
@ -1542,7 +1542,7 @@ static void mv_err_intr(struct ata_port *ap, struct ata_queued_cmd *qc)
|
|||
eh_freeze_mask = EDMA_EH_FREEZE_5;
|
||||
|
||||
if (edma_err_cause & EDMA_ERR_SELF_DIS_5) {
|
||||
struct mv_port_priv *pp = ap->private_data;
|
||||
pp = ap->private_data;
|
||||
pp->pp_flags &= ~MV_PP_FLAG_EDMA_EN;
|
||||
ata_ehi_push_desc(ehi, "EDMA self-disable");
|
||||
}
|
||||
|
@ -1550,7 +1550,7 @@ static void mv_err_intr(struct ata_port *ap, struct ata_queued_cmd *qc)
|
|||
eh_freeze_mask = EDMA_EH_FREEZE;
|
||||
|
||||
if (edma_err_cause & EDMA_ERR_SELF_DIS) {
|
||||
struct mv_port_priv *pp = ap->private_data;
|
||||
pp = ap->private_data;
|
||||
pp->pp_flags &= ~MV_PP_FLAG_EDMA_EN;
|
||||
ata_ehi_push_desc(ehi, "EDMA self-disable");
|
||||
}
|
||||
|
|
|
@ -543,7 +543,7 @@ static void pdc_fill_sg(struct ata_queued_cmd *qc)
|
|||
idx = 0;
|
||||
for_each_sg(qc->sg, sg, qc->n_elem, si) {
|
||||
u32 addr, offset;
|
||||
u32 sg_len, len;
|
||||
u32 sg_len;
|
||||
|
||||
/* determine if physical DMA addr spans 64K boundary.
|
||||
* Note h/w doesn't support 64-bit, so we unconditionally
|
||||
|
|
|
@ -333,8 +333,8 @@ static int vt6420_prereset(struct ata_link *link, unsigned long deadline)
|
|||
|
||||
static void vt6420_error_handler(struct ata_port *ap)
|
||||
{
|
||||
return ata_bmdma_drive_eh(ap, vt6420_prereset, ata_std_softreset,
|
||||
NULL, ata_std_postreset);
|
||||
ata_bmdma_drive_eh(ap, vt6420_prereset, ata_std_softreset, NULL,
|
||||
ata_std_postreset);
|
||||
}
|
||||
|
||||
static int vt6421_pata_cable_detect(struct ata_port *ap)
|
||||
|
|
Loading…
Reference in New Issue