diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-05 16:30:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-05 16:30:44 -0400 |
commit | 4f7a307dc6e4d8bfeb56f7cf7231b08cb845687c (patch) | |
tree | 3bf90522c87fcb32373cb2a5ff25b1ead33405f5 /drivers/message | |
parent | fabb5c4e4a474ff0f7d6c1d3466a1b79bbce5f49 (diff) | |
parent | 7297824581755593535fc97d2c8b6c47e2dc2db6 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (87 commits)
[SCSI] fusion: fix domain validation loops
[SCSI] qla2xxx: fix regression on sparc64
[SCSI] modalias for scsi devices
[SCSI] sg: cap reserved_size values at max_sectors
[SCSI] BusLogic: stop using check_region
[SCSI] tgt: fix rdma transfer bugs
[SCSI] aacraid: fix aacraid not finding device
[SCSI] aacraid: Correct SMC products in aacraid.txt
[SCSI] scsi_error.c: Add EH Start Unit retry
[SCSI] aacraid: [Fastboot] Panics for AACRAID driver during 'insmod' for kexec test.
[SCSI] ipr: Driver version to 2.3.2
[SCSI] ipr: Faster sg list fetch
[SCSI] ipr: Return better qc_issue errors
[SCSI] ipr: Disrupt device error
[SCSI] ipr: Improve async error logging level control
[SCSI] ipr: PCI unblock config access fix
[SCSI] ipr: Fix for oops following SATA request sense
[SCSI] ipr: Log error for SAS dual path switch
[SCSI] ipr: Enable logging of debug error data for all devices
[SCSI] ipr: Add new PCI-E IDs to device table
...
Diffstat (limited to 'drivers/message')
-rw-r--r-- | drivers/message/fusion/mptbase.c | 27 | ||||
-rw-r--r-- | drivers/message/fusion/mptbase.h | 1 | ||||
-rw-r--r-- | drivers/message/fusion/mptscsih.c | 35 | ||||
-rw-r--r-- | drivers/message/fusion/mptspi.c | 36 |
4 files changed, 51 insertions, 48 deletions
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index 083acfd91d8b..97471af4309c 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c | |||
@@ -1531,6 +1531,7 @@ mpt_resume(struct pci_dev *pdev) | |||
1531 | MPT_ADAPTER *ioc = pci_get_drvdata(pdev); | 1531 | MPT_ADAPTER *ioc = pci_get_drvdata(pdev); |
1532 | u32 device_state = pdev->current_state; | 1532 | u32 device_state = pdev->current_state; |
1533 | int recovery_state; | 1533 | int recovery_state; |
1534 | int err; | ||
1534 | 1535 | ||
1535 | printk(MYIOC_s_INFO_FMT | 1536 | printk(MYIOC_s_INFO_FMT |
1536 | "pci-resume: pdev=0x%p, slot=%s, Previous operating state [D%d]\n", | 1537 | "pci-resume: pdev=0x%p, slot=%s, Previous operating state [D%d]\n", |
@@ -1538,7 +1539,9 @@ mpt_resume(struct pci_dev *pdev) | |||
1538 | 1539 | ||
1539 | pci_set_power_state(pdev, 0); | 1540 | pci_set_power_state(pdev, 0); |
1540 | pci_restore_state(pdev); | 1541 | pci_restore_state(pdev); |
1541 | pci_enable_device(pdev); | 1542 | err = pci_enable_device(pdev); |
1543 | if (err) | ||
1544 | return err; | ||
1542 | 1545 | ||
1543 | /* enable interrupts */ | 1546 | /* enable interrupts */ |
1544 | CHIPREG_WRITE32(&ioc->chip->IntMask, MPI_HIM_DIM); | 1547 | CHIPREG_WRITE32(&ioc->chip->IntMask, MPI_HIM_DIM); |
@@ -4739,12 +4742,8 @@ mpt_readScsiDevicePageHeaders(MPT_ADAPTER *ioc, int portnum) | |||
4739 | } | 4742 | } |
4740 | 4743 | ||
4741 | /** | 4744 | /** |
4742 | * mpt_inactive_raid_list_free | 4745 | * mpt_inactive_raid_list_free - This clears this link list. |
4743 | * | 4746 | * @ioc : pointer to per adapter structure |
4744 | * This clears this link list. | ||
4745 | * | ||
4746 | * @ioc - pointer to per adapter structure | ||
4747 | * | ||
4748 | **/ | 4747 | **/ |
4749 | static void | 4748 | static void |
4750 | mpt_inactive_raid_list_free(MPT_ADAPTER *ioc) | 4749 | mpt_inactive_raid_list_free(MPT_ADAPTER *ioc) |
@@ -4764,15 +4763,11 @@ mpt_inactive_raid_list_free(MPT_ADAPTER *ioc) | |||
4764 | } | 4763 | } |
4765 | 4764 | ||
4766 | /** | 4765 | /** |
4767 | * mpt_inactive_raid_volumes | 4766 | * mpt_inactive_raid_volumes - sets up link list of phy_disk_nums for devices belonging in an inactive volume |
4768 | * | ||
4769 | * This sets up link list of phy_disk_nums for devices belonging in an inactive volume | ||
4770 | * | ||
4771 | * @ioc - pointer to per adapter structure | ||
4772 | * @channel - volume channel | ||
4773 | * @id - volume target id | ||
4774 | * | ||
4775 | * | 4767 | * |
4768 | * @ioc : pointer to per adapter structure | ||
4769 | * @channel : volume channel | ||
4770 | * @id : volume target id | ||
4776 | **/ | 4771 | **/ |
4777 | static void | 4772 | static void |
4778 | mpt_inactive_raid_volumes(MPT_ADAPTER *ioc, u8 channel, u8 id) | 4773 | mpt_inactive_raid_volumes(MPT_ADAPTER *ioc, u8 channel, u8 id) |
@@ -6663,7 +6658,7 @@ union loginfo_type { | |||
6663 | /** | 6658 | /** |
6664 | * mpt_iocstatus_info_config - IOCSTATUS information for config pages | 6659 | * mpt_iocstatus_info_config - IOCSTATUS information for config pages |
6665 | * @ioc: Pointer to MPT_ADAPTER structure | 6660 | * @ioc: Pointer to MPT_ADAPTER structure |
6666 | * ioc_status: U32 IOCStatus word from IOC | 6661 | * @ioc_status: U32 IOCStatus word from IOC |
6667 | * @mf: Pointer to MPT request frame | 6662 | * @mf: Pointer to MPT request frame |
6668 | * | 6663 | * |
6669 | * Refer to lsi/mpi.h. | 6664 | * Refer to lsi/mpi.h. |
diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h index e3a39272aad6..d25d3be8fcd2 100644 --- a/drivers/message/fusion/mptbase.h +++ b/drivers/message/fusion/mptbase.h | |||
@@ -994,6 +994,7 @@ typedef struct _MPT_SCSI_HOST { | |||
994 | int scandv_wait_done; | 994 | int scandv_wait_done; |
995 | long last_queue_full; | 995 | long last_queue_full; |
996 | u16 tm_iocstatus; | 996 | u16 tm_iocstatus; |
997 | u16 spi_pending; | ||
997 | struct list_head target_reset_list; | 998 | struct list_head target_reset_list; |
998 | } MPT_SCSI_HOST; | 999 | } MPT_SCSI_HOST; |
999 | 1000 | ||
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c index 2a3e9e66d4ef..fa0f7761652a 100644 --- a/drivers/message/fusion/mptscsih.c +++ b/drivers/message/fusion/mptscsih.c | |||
@@ -819,10 +819,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) | |||
819 | sc->resid=0; | 819 | sc->resid=0; |
820 | case MPI_IOCSTATUS_SCSI_RECOVERED_ERROR: /* 0x0040 */ | 820 | case MPI_IOCSTATUS_SCSI_RECOVERED_ERROR: /* 0x0040 */ |
821 | case MPI_IOCSTATUS_SUCCESS: /* 0x0000 */ | 821 | case MPI_IOCSTATUS_SUCCESS: /* 0x0000 */ |
822 | if (scsi_status == MPI_SCSI_STATUS_BUSY) | 822 | sc->result = (DID_OK << 16) | scsi_status; |
823 | sc->result = (DID_BUS_BUSY << 16) | scsi_status; | ||
824 | else | ||
825 | sc->result = (DID_OK << 16) | scsi_status; | ||
826 | if (scsi_state == 0) { | 823 | if (scsi_state == 0) { |
827 | ; | 824 | ; |
828 | } else if (scsi_state & MPI_SCSI_STATE_AUTOSENSE_VALID) { | 825 | } else if (scsi_state & MPI_SCSI_STATE_AUTOSENSE_VALID) { |
@@ -1188,20 +1185,7 @@ mptscsih_suspend(struct pci_dev *pdev, pm_message_t state) | |||
1188 | int | 1185 | int |
1189 | mptscsih_resume(struct pci_dev *pdev) | 1186 | mptscsih_resume(struct pci_dev *pdev) |
1190 | { | 1187 | { |
1191 | MPT_ADAPTER *ioc = pci_get_drvdata(pdev); | 1188 | return mpt_resume(pdev); |
1192 | struct Scsi_Host *host = ioc->sh; | ||
1193 | MPT_SCSI_HOST *hd; | ||
1194 | |||
1195 | mpt_resume(pdev); | ||
1196 | |||
1197 | if(!host) | ||
1198 | return 0; | ||
1199 | |||
1200 | hd = (MPT_SCSI_HOST *)host->hostdata; | ||
1201 | if(!hd) | ||
1202 | return 0; | ||
1203 | |||
1204 | return 0; | ||
1205 | } | 1189 | } |
1206 | 1190 | ||
1207 | #endif | 1191 | #endif |
@@ -1537,21 +1521,23 @@ mptscsih_freeChainBuffers(MPT_ADAPTER *ioc, int req_idx) | |||
1537 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 1521 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |
1538 | /** | 1522 | /** |
1539 | * mptscsih_TMHandler - Generic handler for SCSI Task Management. | 1523 | * mptscsih_TMHandler - Generic handler for SCSI Task Management. |
1540 | * Fall through to mpt_HardResetHandler if: not operational, too many | 1524 | * @hd: Pointer to MPT SCSI HOST structure |
1541 | * failed TM requests or handshake failure. | ||
1542 | * | ||
1543 | * @ioc: Pointer to MPT_ADAPTER structure | ||
1544 | * @type: Task Management type | 1525 | * @type: Task Management type |
1526 | * @channel: channel number for task management | ||
1545 | * @id: Logical Target ID for reset (if appropriate) | 1527 | * @id: Logical Target ID for reset (if appropriate) |
1546 | * @lun: Logical Unit for reset (if appropriate) | 1528 | * @lun: Logical Unit for reset (if appropriate) |
1547 | * @ctx2abort: Context for the task to be aborted (if appropriate) | 1529 | * @ctx2abort: Context for the task to be aborted (if appropriate) |
1530 | * @timeout: timeout for task management control | ||
1531 | * | ||
1532 | * Fall through to mpt_HardResetHandler if: not operational, too many | ||
1533 | * failed TM requests or handshake failure. | ||
1548 | * | 1534 | * |
1549 | * Remark: Currently invoked from a non-interrupt thread (_bh). | 1535 | * Remark: Currently invoked from a non-interrupt thread (_bh). |
1550 | * | 1536 | * |
1551 | * Remark: With old EH code, at most 1 SCSI TaskMgmt function per IOC | 1537 | * Remark: With old EH code, at most 1 SCSI TaskMgmt function per IOC |
1552 | * will be active. | 1538 | * will be active. |
1553 | * | 1539 | * |
1554 | * Returns 0 for SUCCESS, or FAILED. | 1540 | * Returns 0 for SUCCESS, or %FAILED. |
1555 | **/ | 1541 | **/ |
1556 | int | 1542 | int |
1557 | mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, int lun, int ctx2abort, ulong timeout) | 1543 | mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, int lun, int ctx2abort, ulong timeout) |
@@ -1650,9 +1636,11 @@ mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, int lun, int c | |||
1650 | * mptscsih_IssueTaskMgmt - Generic send Task Management function. | 1636 | * mptscsih_IssueTaskMgmt - Generic send Task Management function. |
1651 | * @hd: Pointer to MPT_SCSI_HOST structure | 1637 | * @hd: Pointer to MPT_SCSI_HOST structure |
1652 | * @type: Task Management type | 1638 | * @type: Task Management type |
1639 | * @channel: channel number for task management | ||
1653 | * @id: Logical Target ID for reset (if appropriate) | 1640 | * @id: Logical Target ID for reset (if appropriate) |
1654 | * @lun: Logical Unit for reset (if appropriate) | 1641 | * @lun: Logical Unit for reset (if appropriate) |
1655 | * @ctx2abort: Context for the task to be aborted (if appropriate) | 1642 | * @ctx2abort: Context for the task to be aborted (if appropriate) |
1643 | * @timeout: timeout for task management control | ||
1656 | * | 1644 | * |
1657 | * Remark: _HardResetHandler can be invoked from an interrupt thread (timer) | 1645 | * Remark: _HardResetHandler can be invoked from an interrupt thread (timer) |
1658 | * or a non-interrupt thread. In the former, must not call schedule(). | 1646 | * or a non-interrupt thread. In the former, must not call schedule(). |
@@ -2022,6 +2010,7 @@ mptscsih_tm_pending_wait(MPT_SCSI_HOST * hd) | |||
2022 | /** | 2010 | /** |
2023 | * mptscsih_tm_wait_for_completion - wait for completion of TM task | 2011 | * mptscsih_tm_wait_for_completion - wait for completion of TM task |
2024 | * @hd: Pointer to MPT host structure. | 2012 | * @hd: Pointer to MPT host structure. |
2013 | * @timeout: timeout value | ||
2025 | * | 2014 | * |
2026 | * Returns {SUCCESS,FAILED}. | 2015 | * Returns {SUCCESS,FAILED}. |
2027 | */ | 2016 | */ |
diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c index 85f21b54cb7d..d75f7ffbb02e 100644 --- a/drivers/message/fusion/mptspi.c +++ b/drivers/message/fusion/mptspi.c | |||
@@ -96,14 +96,13 @@ static int mptspiTaskCtx = -1; | |||
96 | static int mptspiInternalCtx = -1; /* Used only for internal commands */ | 96 | static int mptspiInternalCtx = -1; /* Used only for internal commands */ |
97 | 97 | ||
98 | /** | 98 | /** |
99 | * mptspi_setTargetNegoParms - Update the target negotiation | 99 | * mptspi_setTargetNegoParms - Update the target negotiation parameters |
100 | * parameters based on the the Inquiry data, adapter capabilities, | ||
101 | * and NVRAM settings | ||
102 | * | ||
103 | * @hd: Pointer to a SCSI Host Structure | 100 | * @hd: Pointer to a SCSI Host Structure |
104 | * @vtarget: per target private data | 101 | * @target: per target private data |
105 | * @sdev: SCSI device | 102 | * @sdev: SCSI device |
106 | * | 103 | * |
104 | * Update the target negotiation parameters based on the the Inquiry | ||
105 | * data, adapter capabilities, and NVRAM settings. | ||
107 | **/ | 106 | **/ |
108 | static void | 107 | static void |
109 | mptspi_setTargetNegoParms(MPT_SCSI_HOST *hd, VirtTarget *target, | 108 | mptspi_setTargetNegoParms(MPT_SCSI_HOST *hd, VirtTarget *target, |
@@ -234,7 +233,7 @@ mptspi_setTargetNegoParms(MPT_SCSI_HOST *hd, VirtTarget *target, | |||
234 | /** | 233 | /** |
235 | * mptspi_writeIOCPage4 - write IOC Page 4 | 234 | * mptspi_writeIOCPage4 - write IOC Page 4 |
236 | * @hd: Pointer to a SCSI Host Structure | 235 | * @hd: Pointer to a SCSI Host Structure |
237 | * @channel: | 236 | * @channel: channel number |
238 | * @id: write IOC Page4 for this ID & Bus | 237 | * @id: write IOC Page4 for this ID & Bus |
239 | * | 238 | * |
240 | * Return: -EAGAIN if unable to obtain a Message Frame | 239 | * Return: -EAGAIN if unable to obtain a Message Frame |
@@ -446,7 +445,7 @@ static int mptspi_target_alloc(struct scsi_target *starget) | |||
446 | return 0; | 445 | return 0; |
447 | } | 446 | } |
448 | 447 | ||
449 | void | 448 | static void |
450 | mptspi_target_destroy(struct scsi_target *starget) | 449 | mptspi_target_destroy(struct scsi_target *starget) |
451 | { | 450 | { |
452 | if (starget->hostdata) | 451 | if (starget->hostdata) |
@@ -677,7 +676,9 @@ static void mptspi_dv_device(struct _MPT_SCSI_HOST *hd, | |||
677 | return; | 676 | return; |
678 | } | 677 | } |
679 | 678 | ||
679 | hd->spi_pending |= (1 << sdev->id); | ||
680 | spi_dv_device(sdev); | 680 | spi_dv_device(sdev); |
681 | hd->spi_pending &= ~(1 << sdev->id); | ||
681 | 682 | ||
682 | if (sdev->channel == 1 && | 683 | if (sdev->channel == 1 && |
683 | mptscsih_quiesce_raid(hd, 0, vtarget->channel, vtarget->id) < 0) | 684 | mptscsih_quiesce_raid(hd, 0, vtarget->channel, vtarget->id) < 0) |
@@ -1203,11 +1204,27 @@ mptspi_dv_renegotiate_work(struct work_struct *work) | |||
1203 | container_of(work, struct work_queue_wrapper, work); | 1204 | container_of(work, struct work_queue_wrapper, work); |
1204 | struct _MPT_SCSI_HOST *hd = wqw->hd; | 1205 | struct _MPT_SCSI_HOST *hd = wqw->hd; |
1205 | struct scsi_device *sdev; | 1206 | struct scsi_device *sdev; |
1207 | struct scsi_target *starget; | ||
1208 | struct _CONFIG_PAGE_SCSI_DEVICE_1 pg1; | ||
1209 | u32 nego; | ||
1206 | 1210 | ||
1207 | kfree(wqw); | 1211 | kfree(wqw); |
1208 | 1212 | ||
1209 | shost_for_each_device(sdev, hd->ioc->sh) | 1213 | if (hd->spi_pending) { |
1210 | mptspi_dv_device(hd, sdev); | 1214 | shost_for_each_device(sdev, hd->ioc->sh) { |
1215 | if (hd->spi_pending & (1 << sdev->id)) | ||
1216 | continue; | ||
1217 | starget = scsi_target(sdev); | ||
1218 | nego = mptspi_getRP(starget); | ||
1219 | pg1.RequestedParameters = cpu_to_le32(nego); | ||
1220 | pg1.Reserved = 0; | ||
1221 | pg1.Configuration = 0; | ||
1222 | mptspi_write_spi_device_pg1(starget, &pg1); | ||
1223 | } | ||
1224 | } else { | ||
1225 | shost_for_each_device(sdev, hd->ioc->sh) | ||
1226 | mptspi_dv_device(hd, sdev); | ||
1227 | } | ||
1211 | } | 1228 | } |
1212 | 1229 | ||
1213 | static void | 1230 | static void |
@@ -1453,6 +1470,7 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1453 | init_waitqueue_head(&hd->scandv_waitq); | 1470 | init_waitqueue_head(&hd->scandv_waitq); |
1454 | hd->scandv_wait_done = 0; | 1471 | hd->scandv_wait_done = 0; |
1455 | hd->last_queue_full = 0; | 1472 | hd->last_queue_full = 0; |
1473 | hd->spi_pending = 0; | ||
1456 | 1474 | ||
1457 | /* Some versions of the firmware don't support page 0; without | 1475 | /* Some versions of the firmware don't support page 0; without |
1458 | * that we can't get the parameters */ | 1476 | * that we can't get the parameters */ |