]> err.no Git - linux-2.6/blobdiff - drivers/ata/sata_sil.c
[libata] sata_vsc: build fix after PCI MSI feature addition
[linux-2.6] / drivers / ata / sata_sil.c
index f844a1faba181a164a9289be4758218bbe66037d..1f3fdcf29876bb6936924e67ec21d240a7bdcd55 100644 (file)
@@ -356,6 +356,7 @@ static void sil_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val)
 
 static void sil_host_intr(struct ata_port *ap, u32 bmdma2)
 {
+       struct ata_eh_info *ehi = &ap->eh_info;
        struct ata_queued_cmd *qc = ata_qc_from_tag(ap, ap->active_tag);
        u8 status;
 
@@ -428,6 +429,10 @@ static void sil_host_intr(struct ata_port *ap, u32 bmdma2)
        /* kick HSM in the ass */
        ata_hsm_move(ap, qc, status, 0);
 
+       if (unlikely(qc->err_mask) && (qc->tf.protocol == ATA_PROT_DMA ||
+                                      qc->tf.protocol == ATA_PROT_ATAPI_DMA))
+               ata_ehi_push_desc(ehi, "BMDMA2 stat 0x%x", bmdma2);
+
        return;
 
  err_hsm:
@@ -536,9 +541,9 @@ static void sil_dev_config(struct ata_port *ap, struct ata_device *dev)
 {
        int print_info = ap->eh_context.i.flags & ATA_EHI_PRINTINFO;
        unsigned int n, quirks = 0;
-       unsigned char model_num[41];
+       unsigned char model_num[ATA_ID_PROD_LEN + 1];
 
-       ata_id_c_string(dev->id, model_num, ATA_ID_PROD_OFS, sizeof(model_num));
+       ata_id_c_string(dev->id, model_num, ATA_ID_PROD, sizeof(model_num));
 
        for (n = 0; sil_blacklist[n].product; n++)
                if (!strcmp(sil_blacklist[n].product, model_num)) {
@@ -705,8 +710,12 @@ err_out:
 static int sil_pci_device_resume(struct pci_dev *pdev)
 {
        struct ata_host *host = dev_get_drvdata(&pdev->dev);
+       int rc;
+
+       rc = ata_pci_device_do_resume(pdev);
+       if (rc)
+               return rc;
 
-       ata_pci_device_do_resume(pdev);
        sil_init_controller(pdev, host->n_ports, host->ports[0]->flags,
                            host->mmio_base);
        ata_host_resume(host);