aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorKashyap, Desai <kashyap.desai@lsi.com>2011-04-26 02:39:46 -0400
committerJames Bottomley <James.Bottomley@suse.de>2011-05-01 12:57:50 -0400
commit19fff154e7ee35d1297eb27d7d41e6f8742101ec (patch)
treeff2e9ef250a2ae64ac8c8dc5632d5c77b6f4d467 /drivers
parent56cee8d57744ec5782e3a8722c1bc45951d2c037 (diff)
[SCSI] mptfusion: Adding inline data padding support for TAPE drive.
Adding support for inline data padding for TAPE drive when running U320. [jejb: whitespace fixes] Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/message/fusion/mptspi.c22
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)) {