diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-27 13:06:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-27 13:06:30 -0400 |
commit | d459094083c3a23b31514bbe31cc3f4c21ed4445 (patch) | |
tree | 7b4b1c034163898c51272d5fc9f934ec23cdb491 /drivers | |
parent | d0d87aae795bfad0a9f8cc1e8faff5a016e71ad4 (diff) | |
parent | bb9ba31ca3b88fd396e38950d1caedf2f83521c6 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
[SCSI] gdth: fix oops in gdth_copy_cmd()
[SCSI] mptsas: Fix oops for insmod during kexec
[SCSI] lpfc: avoid double-free during PCI error failure
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/message/fusion/mptsas.c | 7 | ||||
-rw-r--r-- | drivers/scsi/gdth.c | 2 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 5 |
3 files changed, 9 insertions, 5 deletions
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index 404c014db1bd..1d2d03f77894 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c | |||
@@ -815,7 +815,7 @@ mptsas_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) | |||
815 | static int | 815 | static int |
816 | mptsas_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) | 816 | mptsas_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) |
817 | { | 817 | { |
818 | MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)ioc->sh->hostdata; | 818 | MPT_SCSI_HOST *hd; |
819 | struct mptsas_target_reset_event *target_reset_list, *n; | 819 | struct mptsas_target_reset_event *target_reset_list, *n; |
820 | int rc; | 820 | int rc; |
821 | 821 | ||
@@ -827,7 +827,10 @@ mptsas_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) | |||
827 | if (reset_phase != MPT_IOC_POST_RESET) | 827 | if (reset_phase != MPT_IOC_POST_RESET) |
828 | goto out; | 828 | goto out; |
829 | 829 | ||
830 | if (!hd || !hd->ioc) | 830 | if (!ioc->sh || !ioc->sh->hostdata) |
831 | goto out; | ||
832 | hd = (MPT_SCSI_HOST *)ioc->sh->hostdata; | ||
833 | if (!hd->ioc) | ||
831 | goto out; | 834 | goto out; |
832 | 835 | ||
833 | if (list_empty(&hd->target_reset_list)) | 836 | if (list_empty(&hd->target_reset_list)) |
diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c index 8c81cec85298..60446b88f721 100644 --- a/drivers/scsi/gdth.c +++ b/drivers/scsi/gdth.c | |||
@@ -3091,6 +3091,7 @@ static int gdth_fill_raw_cmd(int hanum,Scsi_Cmnd *scp,unchar b) | |||
3091 | cmdp->u.raw64.direction = | 3091 | cmdp->u.raw64.direction = |
3092 | gdth_direction_tab[scp->cmnd[0]]==DOU ? GDTH_DATA_OUT:GDTH_DATA_IN; | 3092 | gdth_direction_tab[scp->cmnd[0]]==DOU ? GDTH_DATA_OUT:GDTH_DATA_IN; |
3093 | memcpy(cmdp->u.raw64.cmd,scp->cmnd,16); | 3093 | memcpy(cmdp->u.raw64.cmd,scp->cmnd,16); |
3094 | cmdp->u.raw64.sg_ranz = 0; | ||
3094 | } else { | 3095 | } else { |
3095 | cmdp->u.raw.reserved = 0; | 3096 | cmdp->u.raw.reserved = 0; |
3096 | cmdp->u.raw.mdisc_time = 0; | 3097 | cmdp->u.raw.mdisc_time = 0; |
@@ -3107,6 +3108,7 @@ static int gdth_fill_raw_cmd(int hanum,Scsi_Cmnd *scp,unchar b) | |||
3107 | cmdp->u.raw.direction = | 3108 | cmdp->u.raw.direction = |
3108 | gdth_direction_tab[scp->cmnd[0]]==DOU ? GDTH_DATA_OUT:GDTH_DATA_IN; | 3109 | gdth_direction_tab[scp->cmnd[0]]==DOU ? GDTH_DATA_OUT:GDTH_DATA_IN; |
3109 | memcpy(cmdp->u.raw.cmd,scp->cmnd,12); | 3110 | memcpy(cmdp->u.raw.cmd,scp->cmnd,12); |
3111 | cmdp->u.raw.sg_ranz = 0; | ||
3110 | } | 3112 | } |
3111 | 3113 | ||
3112 | if (scp->use_sg) { | 3114 | if (scp->use_sg) { |
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 9d014e5a81c4..057fd7e0e379 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -1817,10 +1817,9 @@ static pci_ers_result_t lpfc_io_error_detected(struct pci_dev *pdev, | |||
1817 | struct lpfc_sli *psli = &phba->sli; | 1817 | struct lpfc_sli *psli = &phba->sli; |
1818 | struct lpfc_sli_ring *pring; | 1818 | struct lpfc_sli_ring *pring; |
1819 | 1819 | ||
1820 | if (state == pci_channel_io_perm_failure) { | 1820 | if (state == pci_channel_io_perm_failure) |
1821 | lpfc_pci_remove_one(pdev); | ||
1822 | return PCI_ERS_RESULT_DISCONNECT; | 1821 | return PCI_ERS_RESULT_DISCONNECT; |
1823 | } | 1822 | |
1824 | pci_disable_device(pdev); | 1823 | pci_disable_device(pdev); |
1825 | /* | 1824 | /* |
1826 | * There may be I/Os dropped by the firmware. | 1825 | * There may be I/Os dropped by the firmware. |