diff options
-rw-r--r-- | drivers/message/fusion/mptscsih.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c index d6ccd6aa4348..2e1c9ff4b028 100644 --- a/drivers/message/fusion/mptscsih.c +++ b/drivers/message/fusion/mptscsih.c | |||
@@ -158,7 +158,7 @@ static int mptscsih_writeIOCPage4(MPT_SCSI_HOST *hd, int target_id, int bus); | |||
158 | int mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r); | 158 | int mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r); |
159 | static int mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTERNAL_CMD *iocmd); | 159 | static int mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTERNAL_CMD *iocmd); |
160 | static void mptscsih_synchronize_cache(MPT_SCSI_HOST *hd, VirtDevice *vdevice); | 160 | static void mptscsih_synchronize_cache(MPT_SCSI_HOST *hd, VirtDevice *vdevice); |
161 | static void mptscsih_negotiate_to_asyn_narrow(MPT_SCSI_HOST *hd, VirtTarget *vtarget); | 161 | static void mptscsih_negotiate_to_asyn_narrow(MPT_SCSI_HOST *hd, VirtDevice *vdevice); |
162 | static int mptscsih_is_phys_disk(MPT_ADAPTER *ioc, int id); | 162 | static int mptscsih_is_phys_disk(MPT_ADAPTER *ioc, int id); |
163 | 163 | ||
164 | #ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION | 164 | #ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION |
@@ -2308,7 +2308,7 @@ mptscsih_slave_destroy(struct scsi_device *sdev) | |||
2308 | vtarget->luns[0] &= ~(1 << vdevice->lun); | 2308 | vtarget->luns[0] &= ~(1 << vdevice->lun); |
2309 | vtarget->num_luns--; | 2309 | vtarget->num_luns--; |
2310 | if (vtarget->num_luns == 0) { | 2310 | if (vtarget->num_luns == 0) { |
2311 | mptscsih_negotiate_to_asyn_narrow(hd, vtarget); | 2311 | mptscsih_negotiate_to_asyn_narrow(hd, vdevice); |
2312 | if (hd->ioc->bus_type == SPI) { | 2312 | if (hd->ioc->bus_type == SPI) { |
2313 | if (mptscsih_is_phys_disk(hd->ioc, vtarget->target_id)) { | 2313 | if (mptscsih_is_phys_disk(hd->ioc, vtarget->target_id)) { |
2314 | hd->ioc->spi_data.forceDv |= MPT_SCSICFG_RELOAD_IOC_PG3; | 2314 | hd->ioc->spi_data.forceDv |= MPT_SCSICFG_RELOAD_IOC_PG3; |
@@ -3899,8 +3899,9 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTERNAL_CMD *io) | |||
3899 | * | 3899 | * |
3900 | */ | 3900 | */ |
3901 | static void | 3901 | static void |
3902 | mptscsih_negotiate_to_asyn_narrow(MPT_SCSI_HOST *hd, VirtTarget *vtarget) | 3902 | mptscsih_negotiate_to_asyn_narrow(MPT_SCSI_HOST *hd, VirtDevice *vdevice) |
3903 | { | 3903 | { |
3904 | VirtTarget *vtarget = vdevice->vtarget; | ||
3904 | MPT_ADAPTER *ioc= hd->ioc; | 3905 | MPT_ADAPTER *ioc= hd->ioc; |
3905 | SCSIDevicePage1_t *pcfg1Data; | 3906 | SCSIDevicePage1_t *pcfg1Data; |
3906 | CONFIGPARMS cfg; | 3907 | CONFIGPARMS cfg; |
@@ -3910,7 +3911,8 @@ mptscsih_negotiate_to_asyn_narrow(MPT_SCSI_HOST *hd, VirtTarget *vtarget) | |||
3910 | int requested, configuration, data,i; | 3911 | int requested, configuration, data,i; |
3911 | u8 flags, factor; | 3912 | u8 flags, factor; |
3912 | 3913 | ||
3913 | if (ioc->bus_type != SPI) | 3914 | if ((ioc->bus_type != SPI) || |
3915 | (!vdevice->configured_lun)) | ||
3914 | return; | 3916 | return; |
3915 | 3917 | ||
3916 | if (!ioc->spi_data.sdp1length) | 3918 | if (!ioc->spi_data.sdp1length) |
@@ -3946,7 +3948,7 @@ mptscsih_negotiate_to_asyn_narrow(MPT_SCSI_HOST *hd, VirtTarget *vtarget) | |||
3946 | } | 3948 | } |
3947 | mptscsih_setDevicePage1Flags(0, MPT_ASYNC, 0, &requested, | 3949 | mptscsih_setDevicePage1Flags(0, MPT_ASYNC, 0, &requested, |
3948 | &configuration, flags); | 3950 | &configuration, flags); |
3949 | dnegoprintk(("syncronize cache: id=%d width=0 factor=MPT_ASYNC " | 3951 | dnegoprintk(("nego asyn narrow: id=%d width=0 factor=MPT_ASYNC " |
3950 | "offset=0 negoFlags=%x request=%x config=%x\n", | 3952 | "offset=0 negoFlags=%x request=%x config=%x\n", |
3951 | id, flags, requested, configuration)); | 3953 | id, flags, requested, configuration)); |
3952 | pcfg1Data->RequestedParameters = cpu_to_le32(requested); | 3954 | pcfg1Data->RequestedParameters = cpu_to_le32(requested); |
@@ -3959,7 +3961,7 @@ mptscsih_negotiate_to_asyn_narrow(MPT_SCSI_HOST *hd, VirtTarget *vtarget) | |||
3959 | flags = vtarget->negoFlags; | 3961 | flags = vtarget->negoFlags; |
3960 | mptscsih_setDevicePage1Flags(0, MPT_ASYNC, 0, &requested, | 3962 | mptscsih_setDevicePage1Flags(0, MPT_ASYNC, 0, &requested, |
3961 | &configuration, flags); | 3963 | &configuration, flags); |
3962 | dnegoprintk(("syncronize cache: id=%d width=0 factor=MPT_ASYNC " | 3964 | dnegoprintk(("nego asyn narrow: id=%d width=0 factor=MPT_ASYNC " |
3963 | "offset=0 negoFlags=%x request=%x config=%x\n", | 3965 | "offset=0 negoFlags=%x request=%x config=%x\n", |
3964 | vtarget->target_id, flags, requested, configuration)); | 3966 | vtarget->target_id, flags, requested, configuration)); |
3965 | pcfg1Data->RequestedParameters = cpu_to_le32(requested); | 3967 | pcfg1Data->RequestedParameters = cpu_to_le32(requested); |