hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/scsi/aacraid/linit.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Adaptec AAC series RAID controller driver
34 * (c) Copyright 2001 Red Hat Inc.
....@@ -8,20 +9,6 @@
89 * Copyright (c) 2000-2010 Adaptec, Inc.
910 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com)
1011 * 2016-2017 Microsemi Corp. (aacraid@microsemi.com)
11
- *
12
- * This program is free software; you can redistribute it and/or modify
13
- * it under the terms of the GNU General Public License as published by
14
- * the Free Software Foundation; either version 2, or (at your option)
15
- * any later version.
16
- *
17
- * This program is distributed in the hope that it will be useful,
18
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
- * GNU General Public License for more details.
21
- *
22
- * You should have received a copy of the GNU General Public License
23
- * along with this program; see the file COPYING. If not, write to
24
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
2512 *
2613 * Module Name:
2714 * linit.c
....@@ -40,13 +27,13 @@
4027 #include <linux/moduleparam.h>
4128 #include <linux/pci.h>
4229 #include <linux/aer.h>
43
-#include <linux/pci-aspm.h>
4430 #include <linux/slab.h>
4531 #include <linux/mutex.h>
4632 #include <linux/spinlock.h>
4733 #include <linux/syscalls.h>
4834 #include <linux/delay.h>
4935 #include <linux/kthread.h>
36
+#include <linux/msdos_partition.h>
5037
5138 #include <scsi/scsi.h>
5239 #include <scsi/scsi_cmnd.h>
....@@ -243,8 +230,8 @@
243230
244231 /**
245232 * aac_queuecommand - queue a SCSI command
233
+ * @shost: Scsi host to queue command on
246234 * @cmd: SCSI command to queue
247
- * @done: Function to call on command completion
248235 *
249236 * Queues a command for execution by the associated Host Adapter.
250237 *
....@@ -342,9 +329,9 @@
342329 buf = scsi_bios_ptable(bdev);
343330 if (!buf)
344331 return 0;
345
- if(*(__le16 *)(buf + 0x40) == cpu_to_le16(0xaa55)) {
346
- struct partition *first = (struct partition * )buf;
347
- struct partition *entry = first;
332
+ if (*(__le16 *)(buf + 0x40) == cpu_to_le16(MSDOS_LABEL_MAGIC)) {
333
+ struct msdos_partition *first = (struct msdos_partition *)buf;
334
+ struct msdos_partition *entry = first;
348335 int saved_cylinders = param->cylinders;
349336 int num;
350337 unsigned char end_head, end_sec;
....@@ -376,9 +363,10 @@
376363
377364 param->cylinders = cap_to_cyls(capacity, param->heads * param->sectors);
378365 if (num < 4 && end_sec == param->sectors) {
379
- if (param->cylinders != saved_cylinders)
366
+ if (param->cylinders != saved_cylinders) {
380367 dprintk((KERN_DEBUG "Adopting geometry: heads=%d, sectors=%d from partition table %d.\n",
381368 param->heads, param->sectors, num));
369
+ }
382370 } else if (end_head > 0 || end_sec > 0) {
383371 dprintk((KERN_DEBUG "Strange geometry: heads=%d, sectors=%d in partition table %d.\n",
384372 end_head + 1, end_sec, num));
....@@ -405,6 +393,7 @@
405393 int chn, tid;
406394 unsigned int depth = 0;
407395 unsigned int set_timeout = 0;
396
+ int timeout = 0;
408397 bool set_qd_dev_type = false;
409398 u8 devtype = 0;
410399
....@@ -497,10 +486,13 @@
497486
498487 /*
499488 * Firmware has an individual device recovery time typically
500
- * of 35 seconds, give us a margin.
489
+ * of 35 seconds, give us a margin. Thor devices can take longer in
490
+ * error recovery, hence different value.
501491 */
502
- if (set_timeout && sdev->request_queue->rq_timeout < (45 * HZ))
503
- blk_queue_rq_timeout(sdev->request_queue, 45*HZ);
492
+ if (set_timeout) {
493
+ timeout = aac->sa_firmware ? AAC_SA_TIMEOUT : AAC_ARC_TIMEOUT;
494
+ blk_queue_rq_timeout(sdev->request_queue, timeout * HZ);
495
+ }
504496
505497 if (depth > 256)
506498 depth = 256;
....@@ -619,62 +611,69 @@
619611 NULL,
620612 };
621613
622
-static int aac_ioctl(struct scsi_device *sdev, int cmd, void __user * arg)
614
+static int aac_ioctl(struct scsi_device *sdev, unsigned int cmd,
615
+ void __user *arg)
623616 {
617
+ int retval;
624618 struct aac_dev *dev = (struct aac_dev *)sdev->host->hostdata;
625619 if (!capable(CAP_SYS_RAWIO))
626620 return -EPERM;
621
+ retval = aac_adapter_check_health(dev);
622
+ if (retval)
623
+ return -EBUSY;
627624 return aac_do_ioctl(dev, cmd, arg);
628625 }
629626
627
+struct fib_count_data {
628
+ int mlcnt;
629
+ int llcnt;
630
+ int ehcnt;
631
+ int fwcnt;
632
+ int krlcnt;
633
+};
634
+
635
+static bool fib_count_iter(struct scsi_cmnd *scmnd, void *data, bool reserved)
636
+{
637
+ struct fib_count_data *fib_count = data;
638
+
639
+ switch (scmnd->SCp.phase) {
640
+ case AAC_OWNER_FIRMWARE:
641
+ fib_count->fwcnt++;
642
+ break;
643
+ case AAC_OWNER_ERROR_HANDLER:
644
+ fib_count->ehcnt++;
645
+ break;
646
+ case AAC_OWNER_LOWLEVEL:
647
+ fib_count->llcnt++;
648
+ break;
649
+ case AAC_OWNER_MIDLEVEL:
650
+ fib_count->mlcnt++;
651
+ break;
652
+ default:
653
+ fib_count->krlcnt++;
654
+ break;
655
+ }
656
+ return true;
657
+}
658
+
659
+/* Called during SCSI EH, so we don't need to block requests */
630660 static int get_num_of_incomplete_fibs(struct aac_dev *aac)
631661 {
632
-
633
- unsigned long flags;
634
- struct scsi_device *sdev = NULL;
635662 struct Scsi_Host *shost = aac->scsi_host_ptr;
636
- struct scsi_cmnd *scmnd = NULL;
637663 struct device *ctrl_dev;
664
+ struct fib_count_data fcnt = { };
638665
639
- int mlcnt = 0;
640
- int llcnt = 0;
641
- int ehcnt = 0;
642
- int fwcnt = 0;
643
- int krlcnt = 0;
644
-
645
- __shost_for_each_device(sdev, shost) {
646
- spin_lock_irqsave(&sdev->list_lock, flags);
647
- list_for_each_entry(scmnd, &sdev->cmd_list, list) {
648
- switch (scmnd->SCp.phase) {
649
- case AAC_OWNER_FIRMWARE:
650
- fwcnt++;
651
- break;
652
- case AAC_OWNER_ERROR_HANDLER:
653
- ehcnt++;
654
- break;
655
- case AAC_OWNER_LOWLEVEL:
656
- llcnt++;
657
- break;
658
- case AAC_OWNER_MIDLEVEL:
659
- mlcnt++;
660
- break;
661
- default:
662
- krlcnt++;
663
- break;
664
- }
665
- }
666
- spin_unlock_irqrestore(&sdev->list_lock, flags);
667
- }
666
+ scsi_host_busy_iter(shost, fib_count_iter, &fcnt);
668667
669668 ctrl_dev = &aac->pdev->dev;
670669
671
- dev_info(ctrl_dev, "outstanding cmd: midlevel-%d\n", mlcnt);
672
- dev_info(ctrl_dev, "outstanding cmd: lowlevel-%d\n", llcnt);
673
- dev_info(ctrl_dev, "outstanding cmd: error handler-%d\n", ehcnt);
674
- dev_info(ctrl_dev, "outstanding cmd: firmware-%d\n", fwcnt);
675
- dev_info(ctrl_dev, "outstanding cmd: kernel-%d\n", krlcnt);
670
+ dev_info(ctrl_dev, "outstanding cmd: midlevel-%d\n", fcnt.mlcnt);
671
+ dev_info(ctrl_dev, "outstanding cmd: lowlevel-%d\n", fcnt.llcnt);
672
+ dev_info(ctrl_dev, "outstanding cmd: error handler-%d\n", fcnt.ehcnt);
673
+ dev_info(ctrl_dev, "outstanding cmd: firmware-%d\n", fcnt.fwcnt);
674
+ dev_info(ctrl_dev, "outstanding cmd: kernel-%d\n", fcnt.krlcnt);
676675
677
- return mlcnt + llcnt + ehcnt + fwcnt;
676
+ return fcnt.mlcnt + fcnt.llcnt + fcnt.ehcnt + fcnt.fwcnt;
678677 }
679678
680679 static int aac_eh_abort(struct scsi_cmnd* cmd)
....@@ -766,6 +765,7 @@
766765 !(aac->raw_io_64) ||
767766 ((cmd->cmnd[1] & 0x1f) != SAI_READ_CAPACITY_16))
768767 break;
768
+ fallthrough;
769769 case INQUIRY:
770770 case READ_CAPACITY:
771771 /*
....@@ -858,15 +858,14 @@
858858
859859 address = (u64)fib->hw_error_pa;
860860 rst->error_ptr_hi = cpu_to_le32((u32)(address >> 32));
861
- rst->error_ptr_lo = cpu_to_le32
862
- ((u32)(address & 0xffffffff));
861
+ rst->error_ptr_lo = cpu_to_le32((u32)(address & 0xffffffff));
863862 rst->error_length = cpu_to_le32(FW_ERROR_BUFFER_SIZE);
864863 fib->hbacmd_size = sizeof(*rst);
865864
866865 return HBA_IU_TYPE_SATA_REQ;
867866 }
868867
869
-void aac_tmf_callback(void *context, struct fib *fibptr)
868
+static void aac_tmf_callback(void *context, struct fib *fibptr)
870869 {
871870 struct aac_hba_resp *err =
872871 &((struct aac_native_hba *)fibptr->hw_fib_va)->resp.err;
....@@ -1080,7 +1079,7 @@
10801079 * @scsi_cmd: SCSI command block causing the reset
10811080 *
10821081 */
1083
-int aac_eh_host_reset(struct scsi_cmnd *cmd)
1082
+static int aac_eh_host_reset(struct scsi_cmnd *cmd)
10841083 {
10851084 struct scsi_device * dev = cmd->device;
10861085 struct Scsi_Host * host = dev->host;
....@@ -1161,7 +1160,6 @@
11611160
11621161 /**
11631162 * aac_cfg_ioctl - AAC configuration request
1164
- * @inode: inode of device
11651163 * @file: file handle
11661164 * @cmd: ioctl command code
11671165 * @arg: argument
....@@ -1183,62 +1181,6 @@
11831181
11841182 return aac_do_ioctl(aac, cmd, (void __user *)arg);
11851183 }
1186
-
1187
-#ifdef CONFIG_COMPAT
1188
-static long aac_compat_do_ioctl(struct aac_dev *dev, unsigned cmd, unsigned long arg)
1189
-{
1190
- long ret;
1191
- switch (cmd) {
1192
- case FSACTL_MINIPORT_REV_CHECK:
1193
- case FSACTL_SENDFIB:
1194
- case FSACTL_OPEN_GET_ADAPTER_FIB:
1195
- case FSACTL_CLOSE_GET_ADAPTER_FIB:
1196
- case FSACTL_SEND_RAW_SRB:
1197
- case FSACTL_GET_PCI_INFO:
1198
- case FSACTL_QUERY_DISK:
1199
- case FSACTL_DELETE_DISK:
1200
- case FSACTL_FORCE_DELETE_DISK:
1201
- case FSACTL_GET_CONTAINERS:
1202
- case FSACTL_SEND_LARGE_FIB:
1203
- ret = aac_do_ioctl(dev, cmd, (void __user *)arg);
1204
- break;
1205
-
1206
- case FSACTL_GET_NEXT_ADAPTER_FIB: {
1207
- struct fib_ioctl __user *f;
1208
-
1209
- f = compat_alloc_user_space(sizeof(*f));
1210
- ret = 0;
1211
- if (clear_user(f, sizeof(*f)))
1212
- ret = -EFAULT;
1213
- if (copy_in_user(f, (void __user *)arg, sizeof(struct fib_ioctl) - sizeof(u32)))
1214
- ret = -EFAULT;
1215
- if (!ret)
1216
- ret = aac_do_ioctl(dev, cmd, f);
1217
- break;
1218
- }
1219
-
1220
- default:
1221
- ret = -ENOIOCTLCMD;
1222
- break;
1223
- }
1224
- return ret;
1225
-}
1226
-
1227
-static int aac_compat_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)
1228
-{
1229
- struct aac_dev *dev = (struct aac_dev *)sdev->host->hostdata;
1230
- if (!capable(CAP_SYS_RAWIO))
1231
- return -EPERM;
1232
- return aac_compat_do_ioctl(dev, cmd, (unsigned long)arg);
1233
-}
1234
-
1235
-static long aac_compat_cfg_ioctl(struct file *file, unsigned cmd, unsigned long arg)
1236
-{
1237
- if (!capable(CAP_SYS_RAWIO))
1238
- return -EPERM;
1239
- return aac_compat_do_ioctl(file->private_data, cmd, arg);
1240
-}
1241
-#endif
12421184
12431185 static ssize_t aac_show_model(struct device *device,
12441186 struct device_attribute *attr, char *buf)
....@@ -1289,20 +1231,21 @@
12891231 if (nblank(dprintk(x)))
12901232 len = snprintf(buf, PAGE_SIZE, "dprintk\n");
12911233 #ifdef AAC_DETAILED_STATUS_INFO
1292
- len += snprintf(buf + len, PAGE_SIZE - len,
1293
- "AAC_DETAILED_STATUS_INFO\n");
1234
+ len += scnprintf(buf + len, PAGE_SIZE - len,
1235
+ "AAC_DETAILED_STATUS_INFO\n");
12941236 #endif
12951237 if (dev->raw_io_interface && dev->raw_io_64)
1296
- len += snprintf(buf + len, PAGE_SIZE - len,
1297
- "SAI_READ_CAPACITY_16\n");
1238
+ len += scnprintf(buf + len, PAGE_SIZE - len,
1239
+ "SAI_READ_CAPACITY_16\n");
12981240 if (dev->jbod)
1299
- len += snprintf(buf + len, PAGE_SIZE - len, "SUPPORTED_JBOD\n");
1241
+ len += scnprintf(buf + len, PAGE_SIZE - len,
1242
+ "SUPPORTED_JBOD\n");
13001243 if (dev->supplement_adapter_info.supported_options2 &
13011244 AAC_OPTION_POWER_MANAGEMENT)
1302
- len += snprintf(buf + len, PAGE_SIZE - len,
1303
- "SUPPORTED_POWER_MANAGEMENT\n");
1245
+ len += scnprintf(buf + len, PAGE_SIZE - len,
1246
+ "SUPPORTED_POWER_MANAGEMENT\n");
13041247 if (dev->msi)
1305
- len += snprintf(buf + len, PAGE_SIZE - len, "PCI_HAS_MSI\n");
1248
+ len += scnprintf(buf + len, PAGE_SIZE - len, "PCI_HAS_MSI\n");
13061249 return len;
13071250 }
13081251
....@@ -1523,7 +1466,7 @@
15231466 .owner = THIS_MODULE,
15241467 .unlocked_ioctl = aac_cfg_ioctl,
15251468 #ifdef CONFIG_COMPAT
1526
- .compat_ioctl = aac_compat_cfg_ioctl,
1469
+ .compat_ioctl = aac_cfg_ioctl,
15271470 #endif
15281471 .open = aac_cfg_open,
15291472 .llseek = noop_llseek,
....@@ -1536,7 +1479,7 @@
15361479 .info = aac_info,
15371480 .ioctl = aac_ioctl,
15381481 #ifdef CONFIG_COMPAT
1539
- .compat_ioctl = aac_compat_ioctl,
1482
+ .compat_ioctl = aac_ioctl,
15401483 #endif
15411484 .queuecommand = aac_queuecommand,
15421485 .bios_param = aac_biosparm,
....@@ -1558,7 +1501,6 @@
15581501 #else
15591502 .cmd_per_lun = AAC_NUM_IO_FIB,
15601503 #endif
1561
- .use_clustering = ENABLE_CLUSTERING,
15621504 .emulated = 1,
15631505 .no_write_same = 1,
15641506 };
....@@ -1578,7 +1520,7 @@
15781520 struct fib *fib = &aac->fibs[i];
15791521 if (!(fib->hw_fib_va->header.XferState & cpu_to_le32(NoResponseExpected | Async)) &&
15801522 (fib->hw_fib_va->header.XferState & cpu_to_le32(ResponseExpected)))
1581
- up(&fib->event_wait);
1523
+ complete(&fib->event_wait);
15821524 }
15831525 kthread_stop(aac->thread);
15841526 aac->thread = NULL;
....@@ -1614,6 +1556,19 @@
16141556 }
16151557 }
16161558
1559
+void aac_reinit_aif(struct aac_dev *aac, unsigned int index)
1560
+{
1561
+ /*
1562
+ * Firmware may send a AIF messages very early and the Driver may have
1563
+ * ignored as it is not fully ready to process the messages. Send
1564
+ * AIF to firmware so that if there are any unprocessed events they
1565
+ * can be processed now.
1566
+ */
1567
+ if (aac_drivers[index].quirks & AAC_QUIRK_SRC)
1568
+ aac_intr_normal(aac, 0, 2, 0, NULL);
1569
+
1570
+}
1571
+
16171572 static int aac_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
16181573 {
16191574 unsigned index = id->driver_data;
....@@ -1647,7 +1602,7 @@
16471602 goto out;
16481603
16491604 if (!(aac_drivers[index].quirks & AAC_QUIRK_SRC)) {
1650
- error = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
1605
+ error = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
16511606 if (error) {
16521607 dev_err(&pdev->dev, "PCI 32 BIT dma mask set failed");
16531608 goto out_disable_pdev;
....@@ -1666,7 +1621,7 @@
16661621 mask_bits = 32;
16671622 }
16681623
1669
- error = pci_set_consistent_dma_mask(pdev, dmamask);
1624
+ error = dma_set_coherent_mask(&pdev->dev, dmamask);
16701625 if (error) {
16711626 dev_err(&pdev->dev, "PCI %d B consistent dma mask set failed\n"
16721627 , mask_bits);
....@@ -1684,7 +1639,6 @@
16841639 shost->irq = pdev->irq;
16851640 shost->unique_id = unique_id;
16861641 shost->max_cmd_len = 16;
1687
- shost->use_cmd_list = 1;
16881642
16891643 if (aac_cfg_major == AAC_CHARDEV_NEEDS_REINIT)
16901644 aac_init_char();
....@@ -1715,6 +1669,8 @@
17151669 mutex_init(&aac->scan_mutex);
17161670
17171671 INIT_DELAYED_WORK(&aac->safw_rescan_work, aac_safw_rescan_worker);
1672
+ INIT_DELAYED_WORK(&aac->src_reinit_aif_worker,
1673
+ aac_src_reinit_aif_worker);
17181674 /*
17191675 * Map in the registers from the adapter.
17201676 */
....@@ -1770,11 +1726,10 @@
17701726 shost->max_sectors = (shost->sg_tablesize * 8) + 112;
17711727 }
17721728
1773
- error = pci_set_dma_max_seg_size(pdev,
1774
- (aac->adapter_info.options & AAC_OPT_NEW_COMM) ?
1775
- (shost->max_sectors << 9) : 65536);
1776
- if (error)
1777
- goto out_deinit;
1729
+ if (aac->adapter_info.options & AAC_OPT_NEW_COMM)
1730
+ shost->max_segment_size = shost->max_sectors << 9;
1731
+ else
1732
+ shost->max_segment_size = 65536;
17781733
17791734 /*
17801735 * Firmware printf works only with older firmware.
....@@ -1905,8 +1860,8 @@
19051860 struct Scsi_Host *shost = pci_get_drvdata(pdev);
19061861 struct aac_dev *aac = (struct aac_dev *)shost->hostdata;
19071862
1908
- scsi_block_requests(shost);
1909
- aac_cancel_safw_rescan_worker(aac);
1863
+ scsi_host_block(shost);
1864
+ aac_cancel_rescan_worker(aac);
19101865 aac_send_shutdown(aac);
19111866
19121867 aac_release_resources(aac);
....@@ -1941,7 +1896,7 @@
19411896 * aac_send_shutdown() to block ioctls from upperlayer
19421897 */
19431898 aac->adapter_shutdown = 0;
1944
- scsi_unblock_requests(shost);
1899
+ scsi_host_unblock(shost, SDEV_RUNNING);
19451900
19461901 return 0;
19471902
....@@ -1956,7 +1911,8 @@
19561911 static void aac_shutdown(struct pci_dev *dev)
19571912 {
19581913 struct Scsi_Host *shost = pci_get_drvdata(dev);
1959
- scsi_block_requests(shost);
1914
+
1915
+ scsi_host_block(shost);
19601916 __aac_shutdown((struct aac_dev *)shost->hostdata);
19611917 }
19621918
....@@ -1965,7 +1921,7 @@
19651921 struct Scsi_Host *shost = pci_get_drvdata(pdev);
19661922 struct aac_dev *aac = (struct aac_dev *)shost->hostdata;
19671923
1968
- aac_cancel_safw_rescan_worker(aac);
1924
+ aac_cancel_rescan_worker(aac);
19691925 scsi_remove_host(shost);
19701926
19711927 __aac_shutdown(aac);
....@@ -1988,28 +1944,8 @@
19881944 }
19891945 }
19901946
1991
-static void aac_flush_ios(struct aac_dev *aac)
1992
-{
1993
- int i;
1994
- struct scsi_cmnd *cmd;
1995
-
1996
- for (i = 0; i < aac->scsi_host_ptr->can_queue; i++) {
1997
- cmd = (struct scsi_cmnd *)aac->fibs[i].callback_data;
1998
- if (cmd && (cmd->SCp.phase == AAC_OWNER_FIRMWARE)) {
1999
- scsi_dma_unmap(cmd);
2000
-
2001
- if (aac->handle_pci_error)
2002
- cmd->result = DID_NO_CONNECT << 16;
2003
- else
2004
- cmd->result = DID_RESET << 16;
2005
-
2006
- cmd->scsi_done(cmd);
2007
- }
2008
- }
2009
-}
2010
-
20111947 static pci_ers_result_t aac_pci_error_detected(struct pci_dev *pdev,
2012
- enum pci_channel_state error)
1948
+ pci_channel_state_t error)
20131949 {
20141950 struct Scsi_Host *shost = pci_get_drvdata(pdev);
20151951 struct aac_dev *aac = shost_priv(shost);
....@@ -2022,9 +1958,9 @@
20221958 case pci_channel_io_frozen:
20231959 aac->handle_pci_error = 1;
20241960
2025
- scsi_block_requests(aac->scsi_host_ptr);
2026
- aac_cancel_safw_rescan_worker(aac);
2027
- aac_flush_ios(aac);
1961
+ scsi_host_block(shost);
1962
+ aac_cancel_rescan_worker(aac);
1963
+ scsi_host_complete_all_commands(shost, DID_NO_CONNECT);
20281964 aac_release_resources(aac);
20291965
20301966 pci_disable_pcie_error_reporting(pdev);
....@@ -2034,7 +1970,7 @@
20341970 case pci_channel_io_perm_failure:
20351971 aac->handle_pci_error = 1;
20361972
2037
- aac_flush_ios(aac);
1973
+ scsi_host_complete_all_commands(shost, DID_NO_CONNECT);
20381974 return PCI_ERS_RESULT_DISCONNECT;
20391975 }
20401976
....@@ -2075,10 +2011,7 @@
20752011 static void aac_pci_resume(struct pci_dev *pdev)
20762012 {
20772013 struct Scsi_Host *shost = pci_get_drvdata(pdev);
2078
- struct scsi_device *sdev = NULL;
20792014 struct aac_dev *aac = (struct aac_dev *)shost_priv(shost);
2080
-
2081
- pci_cleanup_aer_uncorrect_error_status(pdev);
20822015
20832016 if (aac_adapter_ioremap(aac, aac->base_size)) {
20842017
....@@ -2104,10 +2037,7 @@
21042037 aac->adapter_shutdown = 0;
21052038 aac->handle_pci_error = 0;
21062039
2107
- shost_for_each_device(sdev, shost)
2108
- if (sdev->sdev_state == SDEV_OFFLINE)
2109
- sdev->sdev_state = SDEV_RUNNING;
2110
- scsi_unblock_requests(aac->scsi_host_ptr);
2040
+ scsi_host_unblock(shost, SDEV_RUNNING);
21112041 aac_scan_host(aac);
21122042 pci_save_state(pdev);
21132043