diff options
Diffstat (limited to 'drivers/message/fusion/mptspi.c')
-rw-r--r-- | drivers/message/fusion/mptspi.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c index 6d9568d2ec59..8f61ba6aac23 100644 --- a/drivers/message/fusion/mptspi.c +++ b/drivers/message/fusion/mptspi.c | |||
@@ -867,6 +867,10 @@ static int mptspi_write_spi_device_pg1(struct scsi_target *starget, | |||
867 | struct _x_config_parms cfg; | 867 | struct _x_config_parms cfg; |
868 | struct _CONFIG_PAGE_HEADER hdr; | 868 | struct _CONFIG_PAGE_HEADER hdr; |
869 | int err = -EBUSY; | 869 | int err = -EBUSY; |
870 | u32 nego_parms; | ||
871 | u32 period; | ||
872 | struct scsi_device *sdev; | ||
873 | int i; | ||
870 | 874 | ||
871 | /* don't allow updating nego parameters on RAID devices */ | 875 | /* don't allow updating nego parameters on RAID devices */ |
872 | if (starget->channel == 0 && | 876 | if (starget->channel == 0 && |
@@ -904,6 +908,24 @@ static int mptspi_write_spi_device_pg1(struct scsi_target *starget, | |||
904 | pg1->Header.PageNumber = hdr.PageNumber; | 908 | pg1->Header.PageNumber = hdr.PageNumber; |
905 | pg1->Header.PageType = hdr.PageType; | 909 | pg1->Header.PageType = hdr.PageType; |
906 | 910 | ||
911 | nego_parms = le32_to_cpu(pg1->RequestedParameters); | ||
912 | period = (nego_parms & MPI_SCSIDEVPAGE1_RP_MIN_SYNC_PERIOD_MASK) >> | ||
913 | MPI_SCSIDEVPAGE1_RP_SHIFT_MIN_SYNC_PERIOD; | ||
914 | if (period == 8) { | ||
915 | /* Turn on inline data padding for TAPE when running U320 */ | ||
916 | for (i = 0 ; i < 16; i++) { | ||
917 | sdev = scsi_device_lookup_by_target(starget, i); | ||
918 | if (sdev && sdev->type == TYPE_TAPE) { | ||
919 | sdev_printk(KERN_DEBUG, sdev, MYIOC_s_FMT | ||
920 | "IDP:ON\n", ioc->name); | ||
921 | nego_parms |= MPI_SCSIDEVPAGE1_RP_IDP; | ||
922 | pg1->RequestedParameters = | ||
923 | cpu_to_le32(nego_parms); | ||
924 | break; | ||
925 | } | ||
926 | } | ||
927 | } | ||
928 | |||
907 | mptspi_print_write_nego(hd, starget, le32_to_cpu(pg1->RequestedParameters)); | 929 | mptspi_print_write_nego(hd, starget, le32_to_cpu(pg1->RequestedParameters)); |
908 | 930 | ||
909 | if (mpt_config(ioc, &cfg)) { | 931 | if (mpt_config(ioc, &cfg)) { |