aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_fw.c6
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_glue.c25
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_hipd.c8
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_hipd.h1
4 files changed, 16 insertions, 24 deletions
diff --git a/drivers/scsi/sym53c8xx_2/sym_fw.c b/drivers/scsi/sym53c8xx_2/sym_fw.c
index 9916a2a22558..2be0ae17e06c 100644
--- a/drivers/scsi/sym53c8xx_2/sym_fw.c
+++ b/drivers/scsi/sym53c8xx_2/sym_fw.c
@@ -206,13 +206,13 @@ sym_fw2_patch(struct sym_hcb *np)
206 * they are not desirable. See `sym_fw2.h' for more details. 206 * they are not desirable. See `sym_fw2.h' for more details.
207 */ 207 */
208 if (!(np->device_id == PCI_DEVICE_ID_LSI_53C1010_66 && 208 if (!(np->device_id == PCI_DEVICE_ID_LSI_53C1010_66 &&
209 np->revision_id < 0x1 && 209 np->s.device->revision < 0x1 &&
210 np->pciclk_khz < 60000)) { 210 np->pciclk_khz < 60000)) {
211 scripta0->datao_phase[0] = cpu_to_scr(SCR_NO_OP); 211 scripta0->datao_phase[0] = cpu_to_scr(SCR_NO_OP);
212 scripta0->datao_phase[1] = cpu_to_scr(0); 212 scripta0->datao_phase[1] = cpu_to_scr(0);
213 } 213 }
214 if (!(np->device_id == PCI_DEVICE_ID_LSI_53C1010_33 && 214 if (!(np->device_id == PCI_DEVICE_ID_LSI_53C1010_33 /* &&
215 /* np->revision_id < 0xff */ 1)) { 215 np->s.device->revision < 0xff */)) {
216 scripta0->sel_done[0] = cpu_to_scr(SCR_NO_OP); 216 scripta0->sel_done[0] = cpu_to_scr(SCR_NO_OP);
217 scripta0->sel_done[1] = cpu_to_scr(0); 217 scripta0->sel_done[1] = cpu_to_scr(0);
218 } 218 }
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c
index 67a577db5d18..3ed3ed86d350 100644
--- a/drivers/scsi/sym53c8xx_2/sym_glue.c
+++ b/drivers/scsi/sym53c8xx_2/sym_glue.c
@@ -1254,8 +1254,8 @@ static int sym_host_info(struct sym_hcb *np, char *ptr, off_t offset, int len)
1254 info.pos = 0; 1254 info.pos = 0;
1255 1255
1256 copy_info(&info, "Chip " NAME53C "%s, device id 0x%x, " 1256 copy_info(&info, "Chip " NAME53C "%s, device id 0x%x, "
1257 "revision id 0x%x\n", 1257 "revision id 0x%x\n", np->s.chip_name,
1258 np->s.chip_name, np->device_id, np->revision_id); 1258 np->device_id, np->s.device->revision);
1259 copy_info(&info, "At PCI address %s, IRQ " IRQ_FMT "\n", 1259 copy_info(&info, "At PCI address %s, IRQ " IRQ_FMT "\n",
1260 pci_name(np->s.device), IRQ_PRM(np->s.device->irq)); 1260 pci_name(np->s.device), IRQ_PRM(np->s.device->irq));
1261 copy_info(&info, "Min. period factor %d, %s SCSI BUS%s\n", 1261 copy_info(&info, "Min. period factor %d, %s SCSI BUS%s\n",
@@ -1368,10 +1368,9 @@ static struct Scsi_Host * __devinit sym_attach(struct scsi_host_template *tpnt,
1368 unsigned long flags; 1368 unsigned long flags;
1369 struct sym_fw *fw; 1369 struct sym_fw *fw;
1370 1370
1371 printk(KERN_INFO 1371 printk(KERN_INFO "sym%d: <%s> rev 0x%x at pci %s irq " IRQ_FMT "\n",
1372 "sym%d: <%s> rev 0x%x at pci %s irq " IRQ_FMT "\n", 1372 unit, dev->chip.name, pdev->revision, pci_name(pdev),
1373 unit, dev->chip.name, dev->chip.revision_id, 1373 IRQ_PRM(pdev->irq));
1374 pci_name(pdev), IRQ_PRM(pdev->irq));
1375 1374
1376 /* 1375 /*
1377 * Get the firmware for this chip. 1376 * Get the firmware for this chip.
@@ -1412,7 +1411,6 @@ static struct Scsi_Host * __devinit sym_attach(struct scsi_host_template *tpnt,
1412 np->s.device = pdev; 1411 np->s.device = pdev;
1413 np->s.unit = unit; 1412 np->s.unit = unit;
1414 np->device_id = dev->chip.device_id; 1413 np->device_id = dev->chip.device_id;
1415 np->revision_id = dev->chip.revision_id;
1416 np->features = dev->chip.features; 1414 np->features = dev->chip.features;
1417 np->clock_divn = dev->chip.nr_divisor; 1415 np->clock_divn = dev->chip.nr_divisor;
1418 np->maxoffs = dev->chip.offset_max; 1416 np->maxoffs = dev->chip.offset_max;
@@ -1500,7 +1498,7 @@ static struct Scsi_Host * __devinit sym_attach(struct scsi_host_template *tpnt,
1500 instance->transportt = sym2_transport_template; 1498 instance->transportt = sym2_transport_template;
1501 1499
1502 /* 53c896 rev 1 errata: DMA may not cross 16MB boundary */ 1500 /* 53c896 rev 1 errata: DMA may not cross 16MB boundary */
1503 if (pdev->device == PCI_DEVICE_ID_NCR_53C896 && np->revision_id < 2) 1501 if (pdev->device == PCI_DEVICE_ID_NCR_53C896 && pdev->revision < 2)
1504 instance->dma_boundary = 0xFFFFFF; 1502 instance->dma_boundary = 0xFFFFFF;
1505 1503
1506 spin_unlock_irqrestore(instance->host_lock, flags); 1504 spin_unlock_irqrestore(instance->host_lock, flags);
@@ -1545,7 +1543,6 @@ static int __devinit sym_check_supported(struct sym_device *device)
1545{ 1543{
1546 struct sym_chip *chip; 1544 struct sym_chip *chip;
1547 struct pci_dev *pdev = device->pdev; 1545 struct pci_dev *pdev = device->pdev;
1548 u_char revision;
1549 unsigned long io_port = pci_resource_start(pdev, 0); 1546 unsigned long io_port = pci_resource_start(pdev, 0);
1550 int i; 1547 int i;
1551 1548
@@ -1565,14 +1562,12 @@ static int __devinit sym_check_supported(struct sym_device *device)
1565 * to our device structure so we can make it match the actual device 1562 * to our device structure so we can make it match the actual device
1566 * and options. 1563 * and options.
1567 */ 1564 */
1568 pci_read_config_byte(pdev, PCI_CLASS_REVISION, &revision); 1565 chip = sym_lookup_chip_table(pdev->device, pdev->revision);
1569 chip = sym_lookup_chip_table(pdev->device, revision);
1570 if (!chip) { 1566 if (!chip) {
1571 dev_info(&pdev->dev, "device not supported\n"); 1567 dev_info(&pdev->dev, "device not supported\n");
1572 return -ENODEV; 1568 return -ENODEV;
1573 } 1569 }
1574 memcpy(&device->chip, chip, sizeof(device->chip)); 1570 memcpy(&device->chip, chip, sizeof(device->chip));
1575 device->chip.revision_id = revision;
1576 1571
1577 return 0; 1572 return 0;
1578} 1573}
@@ -1613,7 +1608,7 @@ static int __devinit sym_set_workarounds(struct sym_device *device)
1613 * We must ensure the chip will use WRITE AND INVALIDATE. 1608 * We must ensure the chip will use WRITE AND INVALIDATE.
1614 * The revision number limit is for now arbitrary. 1609 * The revision number limit is for now arbitrary.
1615 */ 1610 */
1616 if (pdev->device == PCI_DEVICE_ID_NCR_53C896 && chip->revision_id < 0x4) { 1611 if (pdev->device == PCI_DEVICE_ID_NCR_53C896 && pdev->revision < 0x4) {
1617 chip->features |= (FE_WRIE | FE_CLSE); 1612 chip->features |= (FE_WRIE | FE_CLSE);
1618 } 1613 }
1619 1614
@@ -1905,12 +1900,10 @@ static pci_ers_result_t sym2_io_slot_dump(struct pci_dev *pdev)
1905 */ 1900 */
1906static void sym2_reset_workarounds(struct pci_dev *pdev) 1901static void sym2_reset_workarounds(struct pci_dev *pdev)
1907{ 1902{
1908 u_char revision;
1909 u_short status_reg; 1903 u_short status_reg;
1910 struct sym_chip *chip; 1904 struct sym_chip *chip;
1911 1905
1912 pci_read_config_byte(pdev, PCI_CLASS_REVISION, &revision); 1906 chip = sym_lookup_chip_table(pdev->device, pdev->revision);
1913 chip = sym_lookup_chip_table(pdev->device, revision);
1914 1907
1915 /* Work around for errant bit in 895A, in a fashion 1908 /* Work around for errant bit in 895A, in a fashion
1916 * similar to what is done in sym_set_workarounds(). 1909 * similar to what is done in sym_set_workarounds().
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c
index af24c447b195..9f4198ce845e 100644
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.c
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c
@@ -805,7 +805,7 @@ static int sym_prepare_setting(struct Scsi_Host *shost, struct sym_hcb *np, stru
805 * are used. Disable internal cycles. 805 * are used. Disable internal cycles.
806 */ 806 */
807 if (np->device_id == PCI_DEVICE_ID_LSI_53C1010_33 && 807 if (np->device_id == PCI_DEVICE_ID_LSI_53C1010_33 &&
808 np->revision_id < 0x1) 808 np->s.device->revision < 0x1)
809 np->rv_ccntl0 |= DILS; 809 np->rv_ccntl0 |= DILS;
810 810
811 /* 811 /*
@@ -829,9 +829,9 @@ static int sym_prepare_setting(struct Scsi_Host *shost, struct sym_hcb *np, stru
829 * LOAD/STORE instructions does not need this work-around. 829 * LOAD/STORE instructions does not need this work-around.
830 */ 830 */
831 if ((np->device_id == PCI_DEVICE_ID_NCR_53C810 && 831 if ((np->device_id == PCI_DEVICE_ID_NCR_53C810 &&
832 np->revision_id >= 0x10 && np->revision_id <= 0x11) || 832 np->s.device->revision >= 0x10 && np->s.device->revision <= 0x11) ||
833 (np->device_id == PCI_DEVICE_ID_NCR_53C860 && 833 (np->device_id == PCI_DEVICE_ID_NCR_53C860 &&
834 np->revision_id <= 0x1)) 834 np->s.device->revision <= 0x1))
835 np->features &= ~(FE_WRIE|FE_ERL|FE_ERMP); 835 np->features &= ~(FE_WRIE|FE_ERL|FE_ERMP);
836 836
837 /* 837 /*
@@ -1809,7 +1809,7 @@ void sym_start_up (struct sym_hcb *np, int reason)
1809 * I just don't want. :) 1809 * I just don't want. :)
1810 */ 1810 */
1811 if (np->device_id == PCI_DEVICE_ID_LSI_53C1010_33 && 1811 if (np->device_id == PCI_DEVICE_ID_LSI_53C1010_33 &&
1812 np->revision_id < 1) 1812 np->s.device->revision < 1)
1813 OUTB(np, nc_stest1, INB(np, nc_stest1) | 0x30); 1813 OUTB(np, nc_stest1, INB(np, nc_stest1) | 0x30);
1814 1814
1815 /* 1815 /*
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.h b/drivers/scsi/sym53c8xx_2/sym_hipd.h
index 79ab6a177039..3aa8060a4d2a 100644
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.h
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.h
@@ -919,7 +919,6 @@ struct sym_hcb {
919 * General controller parameters and configuration. 919 * General controller parameters and configuration.
920 */ 920 */
921 u_short device_id; /* PCI device id */ 921 u_short device_id; /* PCI device id */
922 u_char revision_id; /* PCI device revision id */
923 u_int features; /* Chip features map */ 922 u_int features; /* Chip features map */
924 u_char myaddr; /* SCSI id of the adapter */ 923 u_char myaddr; /* SCSI id of the adapter */
925 u_char maxburst; /* log base 2 of dwords burst */ 924 u_char maxburst; /* log base 2 of dwords burst */