diff options
Diffstat (limited to 'drivers/scsi/aacraid/aachba.c')
-rw-r--r-- | drivers/scsi/aacraid/aachba.c | 39 |
1 files changed, 27 insertions, 12 deletions
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 699351c15cc9..37c55ddce214 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c | |||
@@ -175,7 +175,7 @@ MODULE_PARM_DESC(acbsize, "Request a specific adapter control block (FIB) size. | |||
175 | * | 175 | * |
176 | * Query config status, and commit the configuration if needed. | 176 | * Query config status, and commit the configuration if needed. |
177 | */ | 177 | */ |
178 | int aac_get_config_status(struct aac_dev *dev) | 178 | int aac_get_config_status(struct aac_dev *dev, int commit_flag) |
179 | { | 179 | { |
180 | int status = 0; | 180 | int status = 0; |
181 | struct fib * fibptr; | 181 | struct fib * fibptr; |
@@ -219,7 +219,7 @@ int aac_get_config_status(struct aac_dev *dev) | |||
219 | aac_fib_complete(fibptr); | 219 | aac_fib_complete(fibptr); |
220 | /* Send a CT_COMMIT_CONFIG to enable discovery of devices */ | 220 | /* Send a CT_COMMIT_CONFIG to enable discovery of devices */ |
221 | if (status >= 0) { | 221 | if (status >= 0) { |
222 | if (commit == 1) { | 222 | if ((commit == 1) || commit_flag) { |
223 | struct aac_commit_config * dinfo; | 223 | struct aac_commit_config * dinfo; |
224 | aac_fib_init(fibptr); | 224 | aac_fib_init(fibptr); |
225 | dinfo = (struct aac_commit_config *) fib_data(fibptr); | 225 | dinfo = (struct aac_commit_config *) fib_data(fibptr); |
@@ -784,8 +784,9 @@ int aac_get_adapter_info(struct aac_dev* dev) | |||
784 | dev->maximum_num_channels = le32_to_cpu(bus_info->BusCount); | 784 | dev->maximum_num_channels = le32_to_cpu(bus_info->BusCount); |
785 | } | 785 | } |
786 | 786 | ||
787 | tmp = le32_to_cpu(dev->adapter_info.kernelrev); | 787 | if (!dev->in_reset) { |
788 | printk(KERN_INFO "%s%d: kernel %d.%d-%d[%d] %.*s\n", | 788 | tmp = le32_to_cpu(dev->adapter_info.kernelrev); |
789 | printk(KERN_INFO "%s%d: kernel %d.%d-%d[%d] %.*s\n", | ||
789 | dev->name, | 790 | dev->name, |
790 | dev->id, | 791 | dev->id, |
791 | tmp>>24, | 792 | tmp>>24, |
@@ -794,20 +795,21 @@ int aac_get_adapter_info(struct aac_dev* dev) | |||
794 | le32_to_cpu(dev->adapter_info.kernelbuild), | 795 | le32_to_cpu(dev->adapter_info.kernelbuild), |
795 | (int)sizeof(dev->supplement_adapter_info.BuildDate), | 796 | (int)sizeof(dev->supplement_adapter_info.BuildDate), |
796 | dev->supplement_adapter_info.BuildDate); | 797 | dev->supplement_adapter_info.BuildDate); |
797 | tmp = le32_to_cpu(dev->adapter_info.monitorrev); | 798 | tmp = le32_to_cpu(dev->adapter_info.monitorrev); |
798 | printk(KERN_INFO "%s%d: monitor %d.%d-%d[%d]\n", | 799 | printk(KERN_INFO "%s%d: monitor %d.%d-%d[%d]\n", |
799 | dev->name, dev->id, | 800 | dev->name, dev->id, |
800 | tmp>>24,(tmp>>16)&0xff,tmp&0xff, | 801 | tmp>>24,(tmp>>16)&0xff,tmp&0xff, |
801 | le32_to_cpu(dev->adapter_info.monitorbuild)); | 802 | le32_to_cpu(dev->adapter_info.monitorbuild)); |
802 | tmp = le32_to_cpu(dev->adapter_info.biosrev); | 803 | tmp = le32_to_cpu(dev->adapter_info.biosrev); |
803 | printk(KERN_INFO "%s%d: bios %d.%d-%d[%d]\n", | 804 | printk(KERN_INFO "%s%d: bios %d.%d-%d[%d]\n", |
804 | dev->name, dev->id, | 805 | dev->name, dev->id, |
805 | tmp>>24,(tmp>>16)&0xff,tmp&0xff, | 806 | tmp>>24,(tmp>>16)&0xff,tmp&0xff, |
806 | le32_to_cpu(dev->adapter_info.biosbuild)); | 807 | le32_to_cpu(dev->adapter_info.biosbuild)); |
807 | if (le32_to_cpu(dev->adapter_info.serial[0]) != 0xBAD0) | 808 | if (le32_to_cpu(dev->adapter_info.serial[0]) != 0xBAD0) |
808 | printk(KERN_INFO "%s%d: serial %x\n", | 809 | printk(KERN_INFO "%s%d: serial %x\n", |
809 | dev->name, dev->id, | 810 | dev->name, dev->id, |
810 | le32_to_cpu(dev->adapter_info.serial[0])); | 811 | le32_to_cpu(dev->adapter_info.serial[0])); |
812 | } | ||
811 | 813 | ||
812 | dev->nondasd_support = 0; | 814 | dev->nondasd_support = 0; |
813 | dev->raid_scsi_mode = 0; | 815 | dev->raid_scsi_mode = 0; |
@@ -1417,6 +1419,9 @@ static int aac_synchronize(struct scsi_cmnd *scsicmd, int cid) | |||
1417 | return SCSI_MLQUEUE_DEVICE_BUSY; | 1419 | return SCSI_MLQUEUE_DEVICE_BUSY; |
1418 | 1420 | ||
1419 | aac = (struct aac_dev *)scsicmd->device->host->hostdata; | 1421 | aac = (struct aac_dev *)scsicmd->device->host->hostdata; |
1422 | if (aac->in_reset) | ||
1423 | return SCSI_MLQUEUE_HOST_BUSY; | ||
1424 | |||
1420 | /* | 1425 | /* |
1421 | * Allocate and initialize a Fib | 1426 | * Allocate and initialize a Fib |
1422 | */ | 1427 | */ |
@@ -1504,6 +1509,8 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd) | |||
1504 | case INQUIRY: | 1509 | case INQUIRY: |
1505 | case READ_CAPACITY: | 1510 | case READ_CAPACITY: |
1506 | case TEST_UNIT_READY: | 1511 | case TEST_UNIT_READY: |
1512 | if (dev->in_reset) | ||
1513 | return -1; | ||
1507 | spin_unlock_irq(host->host_lock); | 1514 | spin_unlock_irq(host->host_lock); |
1508 | aac_probe_container(dev, cid); | 1515 | aac_probe_container(dev, cid); |
1509 | if ((fsa_dev_ptr[cid].valid & 1) == 0) | 1516 | if ((fsa_dev_ptr[cid].valid & 1) == 0) |
@@ -1529,6 +1536,8 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd) | |||
1529 | } | 1536 | } |
1530 | } else { /* check for physical non-dasd devices */ | 1537 | } else { /* check for physical non-dasd devices */ |
1531 | if(dev->nondasd_support == 1){ | 1538 | if(dev->nondasd_support == 1){ |
1539 | if (dev->in_reset) | ||
1540 | return -1; | ||
1532 | return aac_send_srb_fib(scsicmd); | 1541 | return aac_send_srb_fib(scsicmd); |
1533 | } else { | 1542 | } else { |
1534 | scsicmd->result = DID_NO_CONNECT << 16; | 1543 | scsicmd->result = DID_NO_CONNECT << 16; |
@@ -1584,6 +1593,8 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd) | |||
1584 | scsicmd->scsi_done(scsicmd); | 1593 | scsicmd->scsi_done(scsicmd); |
1585 | return 0; | 1594 | return 0; |
1586 | } | 1595 | } |
1596 | if (dev->in_reset) | ||
1597 | return -1; | ||
1587 | setinqstr(dev, (void *) (inq_data.inqd_vid), fsa_dev_ptr[cid].type); | 1598 | setinqstr(dev, (void *) (inq_data.inqd_vid), fsa_dev_ptr[cid].type); |
1588 | inq_data.inqd_pdt = INQD_PDT_DA; /* Direct/random access device */ | 1599 | inq_data.inqd_pdt = INQD_PDT_DA; /* Direct/random access device */ |
1589 | aac_internal_transfer(scsicmd, &inq_data, 0, sizeof(inq_data)); | 1600 | aac_internal_transfer(scsicmd, &inq_data, 0, sizeof(inq_data)); |
@@ -1739,6 +1750,8 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd) | |||
1739 | case READ_10: | 1750 | case READ_10: |
1740 | case READ_12: | 1751 | case READ_12: |
1741 | case READ_16: | 1752 | case READ_16: |
1753 | if (dev->in_reset) | ||
1754 | return -1; | ||
1742 | /* | 1755 | /* |
1743 | * Hack to keep track of ordinal number of the device that | 1756 | * Hack to keep track of ordinal number of the device that |
1744 | * corresponds to a container. Needed to convert | 1757 | * corresponds to a container. Needed to convert |
@@ -1757,6 +1770,8 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd) | |||
1757 | case WRITE_10: | 1770 | case WRITE_10: |
1758 | case WRITE_12: | 1771 | case WRITE_12: |
1759 | case WRITE_16: | 1772 | case WRITE_16: |
1773 | if (dev->in_reset) | ||
1774 | return -1; | ||
1760 | return aac_write(scsicmd, cid); | 1775 | return aac_write(scsicmd, cid); |
1761 | 1776 | ||
1762 | case SYNCHRONIZE_CACHE: | 1777 | case SYNCHRONIZE_CACHE: |