esp_scsi: correctly detect am53c974
authorHannes Reinecke <hare@suse.de>
Mon, 24 Nov 2014 14:37:27 +0000 (15:37 +0100)
committerChristoph Hellwig <hch@lst.de>
Mon, 24 Nov 2014 15:13:16 +0000 (16:13 +0100)
The am53c974 returns the same ID as the FAS236, but implements
things slightly differently. So detect the am53c974 by checking
for ESP_CONFIG4 register.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/am53c974.c
drivers/scsi/esp_scsi.c
drivers/scsi/esp_scsi.h

index a42e8db..6e88e38 100644 (file)
@@ -368,6 +368,8 @@ static void dc390_check_eeprom(struct esp *esp)
        }
        esp->scsi_id = EEbuf[DC390_EE_ADAPT_SCSI_ID];
        esp->num_tags = 2 << EEbuf[DC390_EE_TAG_CMD_NUM];
+       if (EEbuf[DC390_EE_MODE2] & DC390_EE_MODE2_ACTIVE_NEGATION)
+               esp->config4 |= ESP_CONFIG4_RADE | ESP_CONFIG4_RAE;
 }
 
 static int pci_esp_probe_one(struct pci_dev *pdev,
Simple merge
Simple merge