aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2007-10-05 15:55:06 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-10-23 15:11:10 -0400
commite58bc06ed071e43bef4e2f94340853761a4bf034 (patch)
treed0d677dad5d2d8a0452db9893b3749c44f485f8f
parentbd678450bfbd4bb6543a7138d9ee3418c2a11e7c (diff)
[SCSI] sym53c8xx: Remove ->device_id
Following the same path as ->revision_id, remove ->device_id Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_fw.c4
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_glue.c4
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_glue.h1
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_hipd.c16
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_hipd.h1
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_nvram.c2
6 files changed, 12 insertions, 16 deletions
diff --git a/drivers/scsi/sym53c8xx_2/sym_fw.c b/drivers/scsi/sym53c8xx_2/sym_fw.c
index 2be0ae17e06c..3d4db802c06f 100644
--- a/drivers/scsi/sym53c8xx_2/sym_fw.c
+++ b/drivers/scsi/sym53c8xx_2/sym_fw.c
@@ -205,13 +205,13 @@ sym_fw2_patch(struct sym_hcb *np)
205 * Remove a couple of work-arounds specific to C1010 if 205 * Remove a couple of work-arounds specific to C1010 if
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->s.device->device == PCI_DEVICE_ID_LSI_53C1010_66 &&
209 np->s.device->revision < 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->s.device->device == PCI_DEVICE_ID_LSI_53C1010_33 /* &&
215 np->s.device->revision < 0xff */)) { 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);
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c
index 3ed3ed86d350..cbe31f2923bc 100644
--- a/drivers/scsi/sym53c8xx_2/sym_glue.c
+++ b/drivers/scsi/sym53c8xx_2/sym_glue.c
@@ -1255,7 +1255,7 @@ static int sym_host_info(struct sym_hcb *np, char *ptr, off_t offset, int len)
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", np->s.chip_name, 1257 "revision id 0x%x\n", np->s.chip_name,
1258 np->device_id, np->s.device->revision); 1258 np->s.device->device, 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",
@@ -1410,7 +1410,6 @@ static struct Scsi_Host * __devinit sym_attach(struct scsi_host_template *tpnt,
1410 np->verbose = sym_driver_setup.verbose; 1410 np->verbose = sym_driver_setup.verbose;
1411 np->s.device = pdev; 1411 np->s.device = pdev;
1412 np->s.unit = unit; 1412 np->s.unit = unit;
1413 np->device_id = dev->chip.device_id;
1414 np->features = dev->chip.features; 1413 np->features = dev->chip.features;
1415 np->clock_divn = dev->chip.nr_divisor; 1414 np->clock_divn = dev->chip.nr_divisor;
1416 np->maxoffs = dev->chip.offset_max; 1415 np->maxoffs = dev->chip.offset_max;
@@ -1528,7 +1527,6 @@ static struct Scsi_Host * __devinit sym_attach(struct scsi_host_template *tpnt,
1528static void __devinit sym_get_nvram(struct sym_device *devp, struct sym_nvram *nvp) 1527static void __devinit sym_get_nvram(struct sym_device *devp, struct sym_nvram *nvp)
1529{ 1528{
1530 devp->nvram = nvp; 1529 devp->nvram = nvp;
1531 devp->device_id = devp->chip.device_id;
1532 nvp->type = 0; 1530 nvp->type = 0;
1533 1531
1534 sym_read_nvram(devp, nvp); 1532 sym_read_nvram(devp, nvp);
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.h b/drivers/scsi/sym53c8xx_2/sym_glue.h
index d5ba5aae6c5a..b961f704ccb1 100644
--- a/drivers/scsi/sym53c8xx_2/sym_glue.h
+++ b/drivers/scsi/sym53c8xx_2/sym_glue.h
@@ -212,7 +212,6 @@ struct sym_device {
212 } s; 212 } s;
213 struct sym_chip chip; 213 struct sym_chip chip;
214 struct sym_nvram *nvram; 214 struct sym_nvram *nvram;
215 u_short device_id;
216 u_char host_id; 215 u_char host_id;
217}; 216};
218 217
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c
index 9f4198ce845e..5443394a60e5 100644
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.c
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c
@@ -804,7 +804,7 @@ static int sym_prepare_setting(struct Scsi_Host *shost, struct sym_hcb *np, stru
804 * In dual channel mode, contention occurs if internal cycles 804 * In dual channel mode, contention occurs if internal cycles
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->s.device->device == PCI_DEVICE_ID_LSI_53C1010_33 &&
808 np->s.device->revision < 0x1) 808 np->s.device->revision < 0x1)
809 np->rv_ccntl0 |= DILS; 809 np->rv_ccntl0 |= DILS;
810 810
@@ -828,9 +828,9 @@ static int sym_prepare_setting(struct Scsi_Host *shost, struct sym_hcb *np, stru
828 * this driver. The generic ncr driver that does not use 828 * this driver. The generic ncr driver that does not use
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->s.device->device == PCI_DEVICE_ID_NCR_53C810 &&
832 np->s.device->revision >= 0x10 && np->s.device->revision <= 0x11) || 832 np->s.device->revision >= 0x10 && np->s.device->revision <= 0x11) ||
833 (np->device_id == PCI_DEVICE_ID_NCR_53C860 && 833 (np->s.device->device == PCI_DEVICE_ID_NCR_53C860 &&
834 np->s.device->revision <= 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
@@ -897,7 +897,7 @@ static int sym_prepare_setting(struct Scsi_Host *shost, struct sym_hcb *np, stru
897 if ((SYM_SETUP_SCSI_LED || 897 if ((SYM_SETUP_SCSI_LED ||
898 (nvram->type == SYM_SYMBIOS_NVRAM || 898 (nvram->type == SYM_SYMBIOS_NVRAM ||
899 (nvram->type == SYM_TEKRAM_NVRAM && 899 (nvram->type == SYM_TEKRAM_NVRAM &&
900 np->device_id == PCI_DEVICE_ID_NCR_53C895))) && 900 np->s.device->device == PCI_DEVICE_ID_NCR_53C895))) &&
901 !(np->features & FE_LEDC) && !(np->sv_gpcntl & 0x01)) 901 !(np->features & FE_LEDC) && !(np->sv_gpcntl & 0x01))
902 np->features |= FE_LED0; 902 np->features |= FE_LED0;
903 903
@@ -1798,7 +1798,7 @@ void sym_start_up (struct sym_hcb *np, int reason)
1798 /* 1798 /*
1799 * For now, disable AIP generation on C1010-66. 1799 * For now, disable AIP generation on C1010-66.
1800 */ 1800 */
1801 if (np->device_id == PCI_DEVICE_ID_LSI_53C1010_66) 1801 if (np->s.device->device == PCI_DEVICE_ID_LSI_53C1010_66)
1802 OUTB(np, nc_aipcntl1, DISAIP); 1802 OUTB(np, nc_aipcntl1, DISAIP);
1803 1803
1804 /* 1804 /*
@@ -1808,7 +1808,7 @@ void sym_start_up (struct sym_hcb *np, int reason)
1808 * that from SCRIPTS for each selection/reselection, but 1808 * that from SCRIPTS for each selection/reselection, but
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->s.device->device == PCI_DEVICE_ID_LSI_53C1010_33 &&
1812 np->s.device->revision < 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
@@ -1817,9 +1817,9 @@ void sym_start_up (struct sym_hcb *np, int reason)
1817 * Disable overlapped arbitration for some dual function devices, 1817 * Disable overlapped arbitration for some dual function devices,
1818 * regardless revision id (kind of post-chip-design feature. ;-)) 1818 * regardless revision id (kind of post-chip-design feature. ;-))
1819 */ 1819 */
1820 if (np->device_id == PCI_DEVICE_ID_NCR_53C875) 1820 if (np->s.device->device == PCI_DEVICE_ID_NCR_53C875)
1821 OUTB(np, nc_ctest0, (1<<5)); 1821 OUTB(np, nc_ctest0, (1<<5));
1822 else if (np->device_id == PCI_DEVICE_ID_NCR_53C896) 1822 else if (np->s.device->device == PCI_DEVICE_ID_NCR_53C896)
1823 np->rv_ccntl0 |= DPR; 1823 np->rv_ccntl0 |= DPR;
1824 1824
1825 /* 1825 /*
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.h b/drivers/scsi/sym53c8xx_2/sym_hipd.h
index 3aa8060a4d2a..b8908e10162a 100644
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.h
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.h
@@ -918,7 +918,6 @@ struct sym_hcb {
918 /* 918 /*
919 * General controller parameters and configuration. 919 * General controller parameters and configuration.
920 */ 920 */
921 u_short device_id; /* PCI device id */
922 u_int features; /* Chip features map */ 921 u_int features; /* Chip features map */
923 u_char myaddr; /* SCSI id of the adapter */ 922 u_char myaddr; /* SCSI id of the adapter */
924 u_char maxburst; /* log base 2 of dwords burst */ 923 u_char maxburst; /* log base 2 of dwords burst */
diff --git a/drivers/scsi/sym53c8xx_2/sym_nvram.c b/drivers/scsi/sym53c8xx_2/sym_nvram.c
index 15d69298ab6e..5662fbb3ff60 100644
--- a/drivers/scsi/sym53c8xx_2/sym_nvram.c
+++ b/drivers/scsi/sym53c8xx_2/sym_nvram.c
@@ -696,7 +696,7 @@ static int sym_read_Tekram_nvram (struct sym_device *np, Tekram_nvram *nvram)
696 u_short csum; 696 u_short csum;
697 int x; 697 int x;
698 698
699 switch (np->device_id) { 699 switch (np->pdev->device) {
700 case PCI_DEVICE_ID_NCR_53C885: 700 case PCI_DEVICE_ID_NCR_53C885:
701 case PCI_DEVICE_ID_NCR_53C895: 701 case PCI_DEVICE_ID_NCR_53C895:
702 case PCI_DEVICE_ID_NCR_53C896: 702 case PCI_DEVICE_ID_NCR_53C896: