aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOndrej Zary <linux@rainbow-software.org>2015-11-17 13:24:21 -0500
committerMartin K. Petersen <martin.petersen@oracle.com>2015-11-25 22:08:51 -0500
commitb922a44995a6e94560aa3eae0602bf92a4e7b084 (patch)
treed57221ea7db5dfa0beba7305801cbc8c50df587b
parent6c9b9c554b2a369d2b46558975ef2eaa3a84c1c3 (diff)
atp870u: Introduce is880(), is885() and remove dev_id
Introduce chip type inline functions to simplify code, allowing to delete dev_id from struct atp_unit. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Hannes Reinicke <hare@suse.de> Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/atp870u.c70
-rw-r--r--drivers/scsi/atp870u.h1
2 files changed, 38 insertions, 33 deletions
diff --git a/drivers/scsi/atp870u.c b/drivers/scsi/atp870u.c
index 8af51a97185a..4bb0f4fcd9df 100644
--- a/drivers/scsi/atp870u.c
+++ b/drivers/scsi/atp870u.c
@@ -103,6 +103,17 @@ static inline u8 atp_readb_pci(struct atp_unit *atp, u8 channel, u8 reg)
103 return inb(atp->pciport[channel] + reg); 103 return inb(atp->pciport[channel] + reg);
104} 104}
105 105
106static inline bool is880(struct atp_unit *atp)
107{
108 return atp->pdev->device == ATP880_DEVID1 ||
109 atp->pdev->device == ATP880_DEVID2;
110}
111
112static inline bool is885(struct atp_unit *atp)
113{
114 return atp->pdev->device == ATP885_DEVID;
115}
116
106static irqreturn_t atp870u_intr_handle(int irq, void *dev_id) 117static irqreturn_t atp870u_intr_handle(int irq, void *dev_id)
107{ 118{
108 unsigned long flags; 119 unsigned long flags;
@@ -131,7 +142,7 @@ static irqreturn_t atp870u_intr_handle(int irq, void *dev_id)
131 dev->in_int[c] = 1; 142 dev->in_int[c] = 1;
132 cmdp = atp_readb_io(dev, c, 0x10); 143 cmdp = atp_readb_io(dev, c, 0x10);
133 if (dev->working[c] != 0) { 144 if (dev->working[c] != 0) {
134 if (dev->dev_id == ATP885_DEVID) { 145 if (is885(dev)) {
135 if ((atp_readb_io(dev, c, 0x16) & 0x80) == 0) 146 if ((atp_readb_io(dev, c, 0x16) & 0x80) == 0)
136 atp_writeb_io(dev, c, 0x16, (atp_readb_io(dev, c, 0x16) | 0x80)); 147 atp_writeb_io(dev, c, 0x16, (atp_readb_io(dev, c, 0x16) | 0x80));
137 } 148 }
@@ -148,7 +159,7 @@ static irqreturn_t atp870u_intr_handle(int irq, void *dev_id)
148 159
149 i = atp_readb_io(dev, c, 0x17); 160 i = atp_readb_io(dev, c, 0x17);
150 161
151 if (dev->dev_id == ATP885_DEVID) 162 if (is885(dev))
152 atp_writeb_pci(dev, c, 2, 0x06); 163 atp_writeb_pci(dev, c, 2, 0x06);
153 164
154 target_id = atp_readb_io(dev, c, 0x15); 165 target_id = atp_readb_io(dev, c, 0x15);
@@ -169,7 +180,7 @@ static irqreturn_t atp870u_intr_handle(int irq, void *dev_id)
169 } 180 }
170 dev->last_cmd[c] |= 0x40; 181 dev->last_cmd[c] |= 0x40;
171 } 182 }
172 if (dev->dev_id == ATP885_DEVID) 183 if (is885(dev))
173 dev->r1f[c][target_id] |= j; 184 dev->r1f[c][target_id] |= j;
174#ifdef ED_DBGP 185#ifdef ED_DBGP
175 printk("atp870u_intr_handle status = %x\n",i); 186 printk("atp870u_intr_handle status = %x\n",i);
@@ -178,7 +189,7 @@ static irqreturn_t atp870u_intr_handle(int irq, void *dev_id)
178 if ((dev->last_cmd[c] & 0xf0) != 0x40) { 189 if ((dev->last_cmd[c] & 0xf0) != 0x40) {
179 dev->last_cmd[c] = 0xff; 190 dev->last_cmd[c] = 0xff;
180 } 191 }
181 if (dev->dev_id == ATP885_DEVID) { 192 if (is885(dev)) {
182 adrcnt = 0; 193 adrcnt = 0;
183 ((unsigned char *) &adrcnt)[2] = atp_readb_io(dev, c, 0x12); 194 ((unsigned char *) &adrcnt)[2] = atp_readb_io(dev, c, 0x12);
184 ((unsigned char *) &adrcnt)[1] = atp_readb_io(dev, c, 0x13); 195 ((unsigned char *) &adrcnt)[1] = atp_readb_io(dev, c, 0x13);
@@ -249,7 +260,7 @@ static irqreturn_t atp870u_intr_handle(int irq, void *dev_id)
249 return IRQ_HANDLED; 260 return IRQ_HANDLED;
250 } 261 }
251 262
252 if (dev->dev_id == ATP885_DEVID) { 263 if (is885(dev)) {
253 if ((i == 0x4c) || (i == 0x4d) || (i == 0x8c) || (i == 0x8d)) { 264 if ((i == 0x4c) || (i == 0x4d) || (i == 0x8c) || (i == 0x8d)) {
254 if ((i == 0x4c) || (i == 0x8c)) 265 if ((i == 0x4c) || (i == 0x8c))
255 i=0x48; 266 i=0x48;
@@ -301,7 +312,7 @@ static irqreturn_t atp870u_intr_handle(int irq, void *dev_id)
301 if (dev->last_cmd[c] != 0xff) { 312 if (dev->last_cmd[c] != 0xff) {
302 dev->last_cmd[c] |= 0x40; 313 dev->last_cmd[c] |= 0x40;
303 } 314 }
304 if (dev->dev_id == ATP885_DEVID) { 315 if (is885(dev)) {
305 j = atp_readb_base(dev, 0x29) & 0xfe; 316 j = atp_readb_base(dev, 0x29) & 0xfe;
306 atp_writeb_base(dev, 0x29, j); 317 atp_writeb_base(dev, 0x29, j);
307 } else 318 } else
@@ -316,7 +327,7 @@ static irqreturn_t atp870u_intr_handle(int irq, void *dev_id)
316 } else { 327 } else {
317 target_id &= 0x07; 328 target_id &= 0x07;
318 } 329 }
319 if (dev->dev_id == ATP885_DEVID) 330 if (is885(dev))
320 atp_writeb_io(dev, c, 0x10, 0x45); 331 atp_writeb_io(dev, c, 0x10, 0x45);
321 workreq = dev->id[c][target_id].curr_req; 332 workreq = dev->id[c][target_id].curr_req;
322#ifdef ED_DBGP 333#ifdef ED_DBGP
@@ -348,15 +359,14 @@ static irqreturn_t atp870u_intr_handle(int irq, void *dev_id)
348 atp_writeb_io(dev, c, 0x16, 0x80); 359 atp_writeb_io(dev, c, 0x16, 0x80);
349 360
350 /* enable 32 bit fifo transfer */ 361 /* enable 32 bit fifo transfer */
351 if (dev->dev_id == ATP885_DEVID) { 362 if (is885(dev)) {
352 i = atp_readb_pci(dev, c, 1) & 0xf3; 363 i = atp_readb_pci(dev, c, 1) & 0xf3;
353 //j=workreq->cmnd[0]; 364 //j=workreq->cmnd[0];
354 if ((workreq->cmnd[0] == 0x08) || (workreq->cmnd[0] == 0x28) || (workreq->cmnd[0] == 0x0a) || (workreq->cmnd[0] == 0x2a)) { 365 if ((workreq->cmnd[0] == 0x08) || (workreq->cmnd[0] == 0x28) || (workreq->cmnd[0] == 0x0a) || (workreq->cmnd[0] == 0x2a)) {
355 i |= 0x0c; 366 i |= 0x0c;
356 } 367 }
357 atp_writeb_pci(dev, c, 1, i); 368 atp_writeb_pci(dev, c, 1, i);
358 } else if ((dev->dev_id == ATP880_DEVID1) || 369 } else if (is880(dev)) {
359 (dev->dev_id == ATP880_DEVID2) ) {
360 if ((workreq->cmnd[0] == 0x08) || (workreq->cmnd[0] == 0x28) || (workreq->cmnd[0] == 0x0a) || (workreq->cmnd[0] == 0x2a)) 370 if ((workreq->cmnd[0] == 0x08) || (workreq->cmnd[0] == 0x28) || (workreq->cmnd[0] == 0x0a) || (workreq->cmnd[0] == 0x2a))
361 atp_writeb_base(dev, 0x3b, (atp_readb_base(dev, 0x3b) & 0x3f) | 0xc0); 371 atp_writeb_base(dev, 0x3b, (atp_readb_base(dev, 0x3b) & 0x3f) | 0xc0);
362 else 372 else
@@ -417,7 +427,7 @@ static irqreturn_t atp870u_intr_handle(int irq, void *dev_id)
417#ifdef ED_DBGP 427#ifdef ED_DBGP
418 printk("dev->id[%d][%d].prdaddr 0x%8x\n", c, target_id, dev->id[c][target_id].prdaddr); 428 printk("dev->id[%d][%d].prdaddr 0x%8x\n", c, target_id, dev->id[c][target_id].prdaddr);
419#endif 429#endif
420 if (dev->dev_id != ATP885_DEVID) { 430 if (!is885(dev)) {
421 atp_writeb_pci(dev, c, 2, 0x06); 431 atp_writeb_pci(dev, c, 2, 0x06);
422 atp_writeb_pci(dev, c, 2, 0x00); 432 atp_writeb_pci(dev, c, 2, 0x00);
423 } 433 }
@@ -454,14 +464,14 @@ static irqreturn_t atp870u_intr_handle(int irq, void *dev_id)
454 } 464 }
455 if (i == 0x16) { 465 if (i == 0x16) {
456 workreq->result = atp_readb_io(dev, c, 0x0f); 466 workreq->result = atp_readb_io(dev, c, 0x0f);
457 if (((dev->r1f[c][target_id] & 0x10) != 0)&&(dev->dev_id==ATP885_DEVID)) { 467 if (((dev->r1f[c][target_id] & 0x10) != 0) && is885(dev)) {
458 printk(KERN_WARNING "AEC67162 CRC ERROR !\n"); 468 printk(KERN_WARNING "AEC67162 CRC ERROR !\n");
459 workreq->result = 0x02; 469 workreq->result = 0x02;
460 } 470 }
461 } else 471 } else
462 workreq->result = 0x02; 472 workreq->result = 0x02;
463 473
464 if (dev->dev_id == ATP885_DEVID) { 474 if (is885(dev)) {
465 j = atp_readb_base(dev, 0x29) | 0x01; 475 j = atp_readb_base(dev, 0x29) | 0x01;
466 atp_writeb_base(dev, 0x29, j); 476 atp_writeb_base(dev, 0x29, j);
467 } 477 }
@@ -516,7 +526,7 @@ static irqreturn_t atp870u_intr_handle(int irq, void *dev_id)
516 atp_writeb_pci(dev, c, 2, 0x06); 526 atp_writeb_pci(dev, c, 2, 0x06);
517 atp_writeb_pci(dev, c, 2, 0x00); 527 atp_writeb_pci(dev, c, 2, 0x00);
518 atp_writeb_io(dev, c, 0x10, 0x41); 528 atp_writeb_io(dev, c, 0x10, 0x41);
519 if (dev->dev_id == ATP885_DEVID) { 529 if (is885(dev)) {
520 k = dev->id[c][target_id].last_len; 530 k = dev->id[c][target_id].last_len;
521 atp_writeb_io(dev, c, 0x12, ((unsigned char *) (&k))[2]); 531 atp_writeb_io(dev, c, 0x12, ((unsigned char *) (&k))[2]);
522 atp_writeb_io(dev, c, 0x13, ((unsigned char *) (&k))[1]); 532 atp_writeb_io(dev, c, 0x13, ((unsigned char *) (&k))[1]);
@@ -535,7 +545,7 @@ static irqreturn_t atp870u_intr_handle(int irq, void *dev_id)
535 atp_writeb_pci(dev, c, 2, 0x06); 545 atp_writeb_pci(dev, c, 2, 0x06);
536 atp_writeb_pci(dev, c, 2, 0x00); 546 atp_writeb_pci(dev, c, 2, 0x00);
537 atp_writeb_io(dev, c, 0x10, 0x41); 547 atp_writeb_io(dev, c, 0x10, 0x41);
538 if (dev->dev_id == ATP885_DEVID) { 548 if (is885(dev)) {
539 k = dev->id[c][target_id].last_len; 549 k = dev->id[c][target_id].last_len;
540 atp_writeb_io(dev, c, 0x12, ((unsigned char *) (&k))[2]); 550 atp_writeb_io(dev, c, 0x12, ((unsigned char *) (&k))[2]);
541 atp_writeb_io(dev, c, 0x13, ((unsigned char *) (&k))[1]); 551 atp_writeb_io(dev, c, 0x13, ((unsigned char *) (&k))[1]);
@@ -737,7 +747,7 @@ static void send_s870(struct atp_unit *dev,unsigned char c)
737#endif 747#endif
738 l = scsi_bufflen(workreq); 748 l = scsi_bufflen(workreq);
739 749
740 if (dev->dev_id == ATP885_DEVID) { 750 if (is885(dev)) {
741 j = atp_readb_base(dev, 0x29) & 0xfe; 751 j = atp_readb_base(dev, 0x29) & 0xfe;
742 atp_writeb_base(dev, 0x29, j); 752 atp_writeb_base(dev, 0x29, j);
743 dev->r1f[c][scmd_id(workreq)] = 0; 753 dev->r1f[c][scmd_id(workreq)] = 0;
@@ -775,7 +785,7 @@ static void send_s870(struct atp_unit *dev,unsigned char c)
775 785
776 atp_writeb_io(dev, c, 0x00, workreq->cmd_len); 786 atp_writeb_io(dev, c, 0x00, workreq->cmd_len);
777 atp_writeb_io(dev, c, 0x01, 0x2c); 787 atp_writeb_io(dev, c, 0x01, 0x2c);
778 if (dev->dev_id == ATP885_DEVID) 788 if (is885(dev))
779 atp_writeb_io(dev, c, 0x02, 0x7f); 789 atp_writeb_io(dev, c, 0x02, 0x7f);
780 else 790 else
781 atp_writeb_io(dev, c, 0x02, 0xcf); 791 atp_writeb_io(dev, c, 0x02, 0xcf);
@@ -873,15 +883,14 @@ static void send_s870(struct atp_unit *dev,unsigned char c)
873 atp_writel_pci(dev, c, 4, dev->id[c][target_id].prdaddr); 883 atp_writel_pci(dev, c, 4, dev->id[c][target_id].prdaddr);
874 atp_writeb_pci(dev, c, 2, 0x06); 884 atp_writeb_pci(dev, c, 2, 0x06);
875 atp_writeb_pci(dev, c, 2, 0x00); 885 atp_writeb_pci(dev, c, 2, 0x00);
876 if (dev->dev_id == ATP885_DEVID) { 886 if (is885(dev)) {
877 j = atp_readb_pci(dev, c, 1) & 0xf3; 887 j = atp_readb_pci(dev, c, 1) & 0xf3;
878 if ((workreq->cmnd[0] == 0x08) || (workreq->cmnd[0] == 0x28) || 888 if ((workreq->cmnd[0] == 0x08) || (workreq->cmnd[0] == 0x28) ||
879 (workreq->cmnd[0] == 0x0a) || (workreq->cmnd[0] == 0x2a)) { 889 (workreq->cmnd[0] == 0x0a) || (workreq->cmnd[0] == 0x2a)) {
880 j |= 0x0c; 890 j |= 0x0c;
881 } 891 }
882 atp_writeb_pci(dev, c, 1, j); 892 atp_writeb_pci(dev, c, 1, j);
883 } else if ((dev->dev_id == ATP880_DEVID1) || 893 } else if (is880(dev)) {
884 (dev->dev_id == ATP880_DEVID2)) {
885 if ((workreq->cmnd[0] == 0x08) || (workreq->cmnd[0] == 0x28) || (workreq->cmnd[0] == 0x0a) || (workreq->cmnd[0] == 0x2a)) 894 if ((workreq->cmnd[0] == 0x08) || (workreq->cmnd[0] == 0x28) || (workreq->cmnd[0] == 0x0a) || (workreq->cmnd[0] == 0x2a))
886 atp_writeb_base(dev, 0x3b, (atp_readb_base(dev, 0x3b) & 0x3f) | 0xc0); 895 atp_writeb_base(dev, 0x3b, (atp_readb_base(dev, 0x3b) & 0x3f) | 0xc0);
887 else 896 else
@@ -1285,7 +1294,7 @@ static int atp870u_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1285 shpnt->unique_id = shpnt->io_port; 1294 shpnt->unique_id = shpnt->io_port;
1286 shpnt->irq = pdev->irq; 1295 shpnt->irq = pdev->irq;
1287 1296
1288 if ((ent->device == ATP880_DEVID1)||(ent->device == ATP880_DEVID2)) { 1297 if (is880(atpdev)) {
1289 pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0x80);//JCC082803 1298 pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0x80);//JCC082803
1290 1299
1291 atpdev->ioport[0] = shpnt->io_port + 0x40; 1300 atpdev->ioport[0] = shpnt->io_port + 0x40;
@@ -1296,7 +1305,6 @@ static int atp870u_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1296 1305
1297 printk(KERN_INFO " ACARD AEC-67160 PCI Ultra3 LVD Host Adapter:" 1306 printk(KERN_INFO " ACARD AEC-67160 PCI Ultra3 LVD Host Adapter:"
1298 " IO:%lx, IRQ:%d.\n", shpnt->io_port, shpnt->irq); 1307 " IO:%lx, IRQ:%d.\n", shpnt->io_port, shpnt->irq);
1299 atpdev->dev_id = ent->device;
1300 atpdev->host_id[0] = host_id; 1308 atpdev->host_id[0] = host_id;
1301 1309
1302 atpdev->scam_on = atp_readb_base(atpdev, 0x22); 1310 atpdev->scam_on = atp_readb_base(atpdev, 0x22);
@@ -1384,12 +1392,11 @@ flash_ok_880:
1384 atp_writeb_base(atpdev, 0x38, 0xb0); 1392 atp_writeb_base(atpdev, 0x38, 0xb0);
1385 shpnt->max_id = 16; 1393 shpnt->max_id = 16;
1386 shpnt->this_id = host_id; 1394 shpnt->this_id = host_id;
1387 } else if (ent->device == ATP885_DEVID) { 1395 } else if (is885(atpdev)) {
1388 printk(KERN_INFO " ACARD AEC-67162 PCI Ultra3 LVD Host Adapter: IO:%lx, IRQ:%d.\n" 1396 printk(KERN_INFO " ACARD AEC-67162 PCI Ultra3 LVD Host Adapter: IO:%lx, IRQ:%d.\n"
1389 , shpnt->io_port, shpnt->irq); 1397 , shpnt->io_port, shpnt->irq);
1390 1398
1391 atpdev->pdev = pdev; 1399 atpdev->pdev = pdev;
1392 atpdev->dev_id = ent->device;
1393 atpdev->ioport[0] = shpnt->io_port + 0x80; 1400 atpdev->ioport[0] = shpnt->io_port + 0x80;
1394 atpdev->ioport[1] = shpnt->io_port + 0xc0; 1401 atpdev->ioport[1] = shpnt->io_port + 0xc0;
1395 atpdev->pciport[0] = shpnt->io_port + 0x40; 1402 atpdev->pciport[0] = shpnt->io_port + 0x40;
@@ -1528,7 +1535,6 @@ flash_ok_885:
1528 1535
1529 atpdev->ioport[0] = shpnt->io_port; 1536 atpdev->ioport[0] = shpnt->io_port;
1530 atpdev->pciport[0] = shpnt->io_port + 0x20; 1537 atpdev->pciport[0] = shpnt->io_port + 0x20;
1531 atpdev->dev_id = ent->device;
1532 host_id &= 0x07; 1538 host_id &= 0x07;
1533 atpdev->host_id[0] = host_id; 1539 atpdev->host_id[0] = host_id;
1534 atpdev->scam_on = atp_readb_pci(atpdev, 0, 2); 1540 atpdev->scam_on = atp_readb_pci(atpdev, 0, 2);
@@ -1797,7 +1803,7 @@ static void atp_is(struct atp_unit *dev, unsigned char c, bool wide_chip, unsign
1797 dev->active_id[c] |= m; 1803 dev->active_id[c] |= m;
1798 1804
1799 atp_writeb_io(dev, c, 0x10, 0x30); 1805 atp_writeb_io(dev, c, 0x10, 0x30);
1800 if (dev->dev_id == ATP885_DEVID || dev->dev_id == ATP880_DEVID1 || dev->dev_id == ATP880_DEVID2) 1806 if (is885(dev) || is880(dev))
1801 atp_writeb_io(dev, c, 0x14, 0x00); 1807 atp_writeb_io(dev, c, 0x14, 0x00);
1802 else /* result of is870() merge - is this a bug? */ 1808 else /* result of is870() merge - is this a bug? */
1803 atp_writeb_io(dev, c, 0x04, 0x00); 1809 atp_writeb_io(dev, c, 0x04, 0x00);
@@ -1877,7 +1883,7 @@ inq_ok:
1877 if ((mbuf[7] & 0x60) == 0) { 1883 if ((mbuf[7] & 0x60) == 0) {
1878 goto not_wide; 1884 goto not_wide;
1879 } 1885 }
1880 if (dev->dev_id == ATP885_DEVID || dev->dev_id == ATP880_DEVID1 || dev->dev_id == ATP880_DEVID2) { 1886 if (is885(dev) || is880(dev)) {
1881 if ((i < 8) && ((dev->global_map[c] & 0x20) == 0)) 1887 if ((i < 8) && ((dev->global_map[c] & 0x20) == 0))
1882 goto not_wide; 1888 goto not_wide;
1883 } else { /* result of is870() merge - is this a bug? */ 1889 } else { /* result of is870() merge - is this a bug? */
@@ -2146,7 +2152,7 @@ not_wide:
2146 } 2152 }
2147 continue; 2153 continue;
2148set_sync: 2154set_sync:
2149 if ((dev->dev_id != ATP885_DEVID && dev->dev_id != ATP880_DEVID1 && dev->dev_id != ATP880_DEVID2) || (dev->sp[c][i] == 0x02)) { 2155 if ((!is885(dev) && !is880(dev)) || (dev->sp[c][i] == 0x02)) {
2150 synu[4] = 0x0c; 2156 synu[4] = 0x0c;
2151 synuw[4] = 0x0c; 2157 synuw[4] = 0x0c;
2152 } else { 2158 } else {
@@ -2190,7 +2196,7 @@ try_sync:
2190 while ((atp_readb_io(dev, c, 0x1f) & 0x80) == 0) { 2196 while ((atp_readb_io(dev, c, 0x1f) & 0x80) == 0) {
2191 if ((atp_readb_io(dev, c, 0x1f) & 0x01) != 0) { 2197 if ((atp_readb_io(dev, c, 0x1f) & 0x01) != 0) {
2192 if ((m & dev->wide_id[c]) != 0) { 2198 if ((m & dev->wide_id[c]) != 0) {
2193 if (dev->dev_id == ATP885_DEVID || dev->dev_id == ATP880_DEVID1 || dev->dev_id == ATP880_DEVID2) { 2199 if (is885(dev) || is880(dev)) {
2194 if ((m & dev->ultra_map[c]) != 0) { 2200 if ((m & dev->ultra_map[c]) != 0) {
2195 atp_writeb_io(dev, c, 0x19, synuw[j++]); 2201 atp_writeb_io(dev, c, 0x19, synuw[j++]);
2196 } else { 2202 } else {
@@ -2245,7 +2251,7 @@ phase_outs:
2245 } 2251 }
2246 continue; 2252 continue;
2247phase_ins: 2253phase_ins:
2248 if (dev->dev_id == ATP885_DEVID || dev->dev_id == ATP880_DEVID1 || dev->dev_id == ATP880_DEVID2) 2254 if (is885(dev) || is880(dev))
2249 atp_writeb_io(dev, c, 0x14, 0x06); 2255 atp_writeb_io(dev, c, 0x14, 0x06);
2250 else 2256 else
2251 atp_writeb_io(dev, c, 0x14, 0xff); 2257 atp_writeb_io(dev, c, 0x14, 0xff);
@@ -2303,7 +2309,7 @@ tar_dcons:
2303 if (mbuf[3] > 0x64) { 2309 if (mbuf[3] > 0x64) {
2304 continue; 2310 continue;
2305 } 2311 }
2306 if (dev->dev_id == ATP885_DEVID || dev->dev_id == ATP880_DEVID1 || dev->dev_id == ATP880_DEVID2) { 2312 if (is885(dev) || is880(dev)) {
2307 if (mbuf[4] > 0x0e) { 2313 if (mbuf[4] > 0x0e) {
2308 mbuf[4] = 0x0e; 2314 mbuf[4] = 0x0e;
2309 } 2315 }
@@ -2313,7 +2319,7 @@ tar_dcons:
2313 } 2319 }
2314 } 2320 }
2315 dev->id[c][i].devsp = mbuf[4]; 2321 dev->id[c][i].devsp = mbuf[4];
2316 if (dev->dev_id == ATP885_DEVID || dev->dev_id == ATP880_DEVID1 || dev->dev_id == ATP880_DEVID2) 2322 if (is885(dev) || is880(dev))
2317 if (mbuf[3] < 0x0c) { 2323 if (mbuf[3] < 0x0c) {
2318 j = 0xb0; 2324 j = 0xb0;
2319 goto set_syn_ok; 2325 goto set_syn_ok;
diff --git a/drivers/scsi/atp870u.h b/drivers/scsi/atp870u.h
index 8c47c53aee7f..f9d62a217089 100644
--- a/drivers/scsi/atp870u.h
+++ b/drivers/scsi/atp870u.h
@@ -39,7 +39,6 @@ struct atp_unit
39 unsigned short active_id[2]; 39 unsigned short active_id[2];
40 unsigned short ultra_map[2]; 40 unsigned short ultra_map[2];
41 unsigned short async[2]; 41 unsigned short async[2];
42 unsigned short dev_id;
43 unsigned char sp[2][16]; 42 unsigned char sp[2][16];
44 unsigned char r1f[2][16]; 43 unsigned char r1f[2][16];
45 struct scsi_cmnd *quereq[2][qcnt]; 44 struct scsi_cmnd *quereq[2][qcnt];