diff options
author | Kashyap, Desai <kashyap.desai@lsi.com> | 2011-04-26 12:09:46 +0530 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2011-05-01 11:57:50 -0500 |
commit | 19fff154e7ee35d1297eb27d7d41e6f8742101ec (patch) | |
tree | ff2e9ef250a2ae64ac8c8dc5632d5c77b6f4d467 /drivers/message/fusion | |
parent | 56cee8d57744ec5782e3a8722c1bc45951d2c037 (diff) | |
download | op-kernel-dev-19fff154e7ee35d1297eb27d7d41e6f8742101ec.zip op-kernel-dev-19fff154e7ee35d1297eb27d7d41e6f8742101ec.tar.gz |
[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/message/fusion')
-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 6d9568d..8f61ba6 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, struct _x_config_parms cfg; struct _CONFIG_PAGE_HEADER hdr; int err = -EBUSY; + u32 nego_parms; + u32 period; + struct scsi_device *sdev; + int i; /* don't allow updating nego parameters on RAID devices */ if (starget->channel == 0 && @@ -904,6 +908,24 @@ static int mptspi_write_spi_device_pg1(struct scsi_target *starget, pg1->Header.PageNumber = hdr.PageNumber; pg1->Header.PageType = hdr.PageType; + nego_parms = le32_to_cpu(pg1->RequestedParameters); + period = (nego_parms & MPI_SCSIDEVPAGE1_RP_MIN_SYNC_PERIOD_MASK) >> + MPI_SCSIDEVPAGE1_RP_SHIFT_MIN_SYNC_PERIOD; + if (period == 8) { + /* Turn on inline data padding for TAPE when running U320 */ + for (i = 0 ; i < 16; i++) { + sdev = scsi_device_lookup_by_target(starget, i); + if (sdev && sdev->type == TYPE_TAPE) { + sdev_printk(KERN_DEBUG, sdev, MYIOC_s_FMT + "IDP:ON\n", ioc->name); + nego_parms |= MPI_SCSIDEVPAGE1_RP_IDP; + pg1->RequestedParameters = + cpu_to_le32(nego_parms); + break; + } + } + } + mptspi_print_write_nego(hd, starget, le32_to_cpu(pg1->RequestedParameters)); if (mpt_config(ioc, &cfg)) { |